Jump to content

zeitlings

Member
  • Posts

    178
  • Joined

  • Last visited

  • Days Won

    11

Reputation Activity

  1. Like
    zeitlings reacted to pseudometa in PDF summarizer   
    Get summaries of your PDFs via ChatPDF with just one hotkey.
     
    Requires a ChatPDF API key, which is (currently) free for 5000 PDF pages / 500 requests per month.
     
    ➡️ https://github.com/chrisgrieser/pdf-summarizer-alfred

  2. Like
    zeitlings got a reaction from poirpom in Color Picker   
    Pick a color to get its hex, rgba, hsl representation or NSColor initializer.
     

    Usage
    Activate the Color Sampler with the keyword (default: cp) and pick the desired color.

    Color History
    To review previously picked colors, activate the workflow with the keyword preceded by a colon (default: :cp).
  3. Like
    zeitlings got a reaction from cands in Extract Keywords   
    Extract Keywords
    Extract keywords and keyphrases from articles, books or any other document with YAKE!
     

     
     
    Usage
    Send PDF, docx, doc, rtf or txt documents to the workflow’s File Actions Pass the text from your selection in macOS on to the workflow’s Universal Action Use the keyword and paste your text (default: kw) 
    The extracted keywords are presented in a dialog.

    Dependencies
    The workflow relies on Python3 to install the YAKE standalone.
    YAKE!
    pip install git+https://github.com/LIAAD/yake  official installation guide
    pdftotext
    brew install poppler  formula on brew.sh
    Stopwords
     

    Yake has internal stopword handling that cannot be influenced from the command line. However, you can still define a list of words that will be flat out purged from the input text. To set up a ‘purge word’-list, create a text file named as the language identifier for a corresponding language in the workflow root folder: assets/stopwords/de.txt.

    The workflow checks if the file exists and if it does, the words are removed.

    The purge-word files can be quickly accessed through Alfred by prefixing the keyword with a colon (default: :kw).



    YAKE! is a light-weight unsupervised automatic keyword extraction method which rests on text statistical features extracted from single documents to select the most important keywords of a text.
  4. Thanks
    zeitlings reacted to xilopaint in AlfredOCR - Optical Character Recognition   
    I just tried with a second file. This time the process has been completed with the “Word Granularity” strategy but the OCR quality with "Line Oriented" is way better.
     
     
    It doesn't matter. After clearing the cache I always face the same issue with “Word Granularity” if I run the workflow with the first PDF file.
  5. Like
    zeitlings got a reaction from cands in DEVONthink Portal   
    Hey @Epitome, the issue was introduced with a dt3 update a while ago. Other than that, I've been using the workflow quite constantly myself without issues. 
    I've just uploaded an updated version that should work for you, hopefully. Let me know how it works out for you!
     
    Among numerous internal changes, some things are new, e.g.
    Import Memory - Groups previously selected for importing are remembered (configurable) Document Filters (Globally and per Database. Accessible via dvn .) Today (files worked on today) Recently Modified Recently Added Due Soon Overdue If a document is locked, it is indicated using Apple's SF Symbols. These may need to be installed. Internal configuration via dvn :c  
    V1.0.0 Release 🎉
  6. Like
    zeitlings got a reaction from addEdgeBookmarkSearch in How to change a Finder window's "Sort By" option in workflow?   
    Finder's scripting definitions seem to allow for sorting (so no GUI scripting, but AppleScript nonetheless).
     
     
    You can see the documentation via Script Editor (App), File > Open Dictionary (⇧⌘O) > Finder (from the list). 
    By the by, Vitor has a neat workflow to open AppleScript Dictionaries.
  7. Like
    zeitlings reacted to Epitome in DEVONthink Portal   
    Incredible! Thank you so much, it works perfectly now. I haven't had a chance to play with all the features yet, so far though it seems really well thought out. Looking forward to seeing what it can do!
  8. Like
    zeitlings got a reaction from xilopaint in Set Default Browser   
    Sure, why not 😄
     
    v1.3.0
    - Added browser selection to workflow configuration 
     
  9. Like
    zeitlings reacted to spongeblink in Do Slower Part of the Script Later in Script Filter   
    Thank you so much for modifying my code! 👍👍 Than's exactly how I would like it to work!
     
    Looked at my original code and found out that the quick part does not trigger a rerun of itself to let user_prompt and former_user_prompt sync since os.getenv("former_user_prompt") == os.getenv("user_prompt") is no longer true. 
     
    Your solution is way better! Thanks in advance!
  10. Thanks
    zeitlings got a reaction from spongeblink in Do Slower Part of the Script Later in Script Filter   
    This seems to do the trick:
    #!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import os import sys import uuid import time def get_query() -> str: """Join the arguments into a query string.""" return " ".join(sys.argv[1:]) def provide_history(): """Provide the history of the user.""" prompt = get_query() if os.getenv("did_rerun") is None or (prompt != os.getenv("former_user_prompt")): uuid_ = str(uuid.uuid1()) pre_history_dict = { "variables": { "former_user_prompt": prompt, "did_rerun": True }, "rerun": 0.1, "items": [ { "type": "default", "title": prompt, "subtitle": f"Talk to {prompt} 💬".strip(), "arg": [uuid_, prompt], "autocomplete": "prompt", } ], } sys.stdout.write(json.dumps(pre_history_dict)) else: #slow part time.sleep(1) response_dict = { "variables": { "former_user_prompt": prompt, }, "items": [ { "type": "default", "title": "slow part", "subtitle": f"Talk to {prompt} 💬".strip(), "arg": [os.getenv("uuid_"), prompt], "autocomplete": prompt, } ], } sys.stdout.write(json.dumps(response_dict)) provide_history()  

  11. Like
    zeitlings reacted to mgguinne in Request: Telegram   
    Yes, there is now a really good API, and someone could write an Alfred workflow (that's not me), I am sending my Telegram messages via bash scripts currently and it works well.
     
    https://core.telegram.org/bots/api#available-methods
  12. Like
    zeitlings got a reaction from Floating.Point in Do Slower Part of the Script Later in Script Filter   
    You may want to have a look at the "rerun" key.
     
     
    On the first run, return the results that are loaded quickly, immediately rerun, then execute the slow script and return the results. If the Alfred window is still open, the first results will be replaced. (You could pass a variable that acts as a token to indicate that the slow script should be run now).
  13. Like
    zeitlings got a reaction from vitor in Setting keyword *within* a workflow   
    That should be possible with the Script Filter utility. However, that strikes me as an unnecessarily verbose approach.
    Why don't you just open the default Alfred launcher (opt+space or whatever you have configured) and search for the app you want by name? 
    If you want to browse folders, you type "/". To search folders, you could map a file filter to a leading key, say, "f" and have it only search for folders.
  14. Like
    zeitlings got a reaction from vitor in How to change a Finder window's "Sort By" option in workflow?   
    Finder's scripting definitions seem to allow for sorting (so no GUI scripting, but AppleScript nonetheless).
     
     
    You can see the documentation via Script Editor (App), File > Open Dictionary (⇧⌘O) > Finder (from the list). 
    By the by, Vitor has a neat workflow to open AppleScript Dictionaries.
  15. Like
    zeitlings got a reaction from andy4222 in Heads-up Display   
    @andy4222 The recommended way is to use SPM (Swift Package Manager). However, I quickly tested a minimal-effort approach that works. You can compile the script as is without changing anything about the code. 
     
    Navigate to HUD.swift with your terminal (or open the Workflow in Alfred, double-click any of the two objects, then click the little folder icon in the bottom left corner to open the location, select HUD.swift and send it to Alfred’s Universal Action (opt+cmd+#). From the options, choose “Open Terminal Here”.
     
    In the terminal that opens paste and run this to create the executable at the same location.
    swiftc -O HUD.swift  
    In the workflow, open the "Run Script" object and replace 
    ./HUD.swift "$1" 250  
    with
    ./HUD "$1" 250  
    Voilà.
  16. Like
    zeitlings got a reaction from andy4222 in Heads-up Display   
    Or better yet, just replace the contents of the "Run Script" object with this:
     
    [[ -f ./HUD ]] || eval $(swiftc -O ./HUD.swift) ./HUD "$1" 250  
    If the executable does not exist yet, it will be created and then called.
  17. Like
    zeitlings got a reaction from andy4222 in Set Default Browser   
    @andy4222 That is probably the Apple Script taking some time to wake up. MacOS will always ask you if you are sure you want to change the browser. The script focuses that modal window and "clicks" the button to accept the change. If you're switching to an another window before that has happened, the script will fail. So yeah, there might be a delay (also for the swift script to execute if it is called the first time after a while; after that it seems to be cached somewhere and executes faster.)
  18. Like
    zeitlings reacted to YuTang in how to pass variables from javascript to subsequent actions   
    Thank you for your reply! Finally I solve it myself, now I use a simple AppleScript.
     
    tell application "OmniFocus" set theQuery to "atlviq9dkBl" tell default document set theTask to task id theQuery set taskName to name of theTask set taskNote to note of theTask set encodedTaskName to my urlEncode(taskName) set encodedTaskNote to my urlEncode(taskNote) end tell end tell set resultText to encodedTaskName on urlEncode(str) local str try return (do shell script "/bin/echo " & quoted form of str & ¬ " | perl -MURI::Escape -lne 'print uri_escape($_)'") on error eMsg number eNum error "Can't urlEncode: " & eMsg number eNum end try end urlEncode set bluebirdLink to "bluebird://add?title=" & encodedTaskName & "&notes=" & encodedTaskNote open location bluebirdLink  
    Actually, I tried an AppleScript like this at the very beginning, yet I name the variable bluebirdLink as url, which strangely cause an error: Can’t set URL to "bluebird://add?title=" & encodedTaskName & "&notes=" & encodedTaskNote. Access not allowed.
    after I changed it, it's now ok. Thank you again!~!
  19. Like
    zeitlings got a reaction from cands in Define Word - A Better Dictionary   
    Define Word
     
    I wanted a slightly better dictionary for lookups. In particular, I wanted well formatted previews of the entries without having to open the Dictionary app.
    You can choose from all available dictionaries that are installed on your system, define the fallback dictionaries for your lookups, set the font size of the previews, or manually select a dictionary to use. The previews reflect the global appearance, i.e. they have a dark mode! The workflow also includes a preset for looking up synonyms of a word and a convenient keyboard shortcut for quick lookups.

    ‣Download from Github ◂
     
    Usage Note

    Specify the dictionaries you want to use (see Dictionary Options below). Define a fallback dictionary against which possible misspellings will be checked.
    The workflow can be used as a multilingual spell checker.

    Default keyword: def
    Default shortcut:  ⌥+⇧+D 
    Keyword sd: Select a specific dictionary for lookups
    Keyword synd: Find synonyms by consulting the thesauri only (english)
    Cache reset: def ?

    Modifiers
     ⇧  or  ⌘Y  to preview the dictionary entry  ⌃  to see the dictionary associated with the entry  ⌘C  to copy the dictionary entry’s plain text to the clipboard  ⌘⏎  to paste a word to the frontmost application (spell checker)  ⌘L  to view the plain text as large type  
    Preview
            


    Dictionary Options

    Oxford Study Indonesian Dictionary - Inggris-Indonesia • Indonesia-Inggris
    Oxford PWN Polish-English Dictionary / Wielki słownik polsko-angielski
    Oxford Paravia Il Dizionario inglese - italiano/italiano - inglese
    Oxford Portuguese Dictionary - Português-Inglês • Inglês-Português
    Oxford Turkish Dictionary - Türkçe-İngilizce • İngilizce-Türkçe
    Dicionário de Português licenciado para Oxford University Press
    Dizionario italiano da un affiliato di Oxford University Press
    Oxford Russian Dictionary - Русско-Английский • Англо-Русский
    Gran Diccionario Oxford - Español-Inglés • Inglés-Español
    Oxford Arabic Dictionary - عربي-إنجليزي • إنجليزي-عربي
    Oxford Urdu Dictionaries - اردو۔انگریزی • انگریزی-اردو
    Oxford Gujarati Dictionaries - ગુજરાતી-અંગ્રેજી • અંગ્રેજી-ગુજરાતી
    Oxford Tamil Dictionaries - தமிழ்-ஆங்கிலம் • ஆங்கிலம்-தமிழ்
    พจนานุกรมอังกฤษ-ไทย & ไทย-อังกฤษ ฉบับทันสมัยและสมบูรณ์ที่สุด
    Magay Tamás szótár - Magyar-Angol • Angol-Magyar
    Oxford Telugu Dictionaries - తెలుగు-ఇంగ్లీష్ • ఇంగ్లీష్-తెలుగు
    Velký anglicko-český a česko-anglický slovník
    Oxford Bengali Dictionaries - বাংলা-ইংরেজি • ইংরেজি-বাংলা
    Diccionario General de la Lengua Española Vox
    MOT sanakirja suomi-englanti, englanti-suomi
    Oxford Hindi Dictionaries - हिन्दी-अंग्रेज़ी • अंग्रेज़ी-हिन्दी
    מילון אבן-שושן מחודש ומותאם לשנות האלפיים
    Multidictionnaire de la langue française
    PONS Großwörterbuch Französisch Deutsch
    Oxford American Writer’s Thesaurus
    Duden-Wissensnetz deutsche Sprache
    Oxford-Hachette French Dictionary
    Толковый словарь русского языка
    New Oxford American Dictionary
    Prisma Handwoordenboek Engels
    Prisma woordenboek Nederlands
    Oxford Dictionary of English
    พจนานุกรมไทย ฉบับทันสมัยและสมบูรณ์
    Oxford Thesaurus of English
    Politikens Nudansk Ordbog
    Oxford German Dictionary
    超級クラウン中日辞典 / クラウン日中辞典
    Arkadaş Türkçe Sözlük
    뉴에이스 영한사전 / 뉴에이스 한영사전
    ウィズダム英和辞典 / ウィズダム和英辞典
    Apple Dictionary
    Từ điển Lạc Việt
    TTY Dictionary
    Norsk Ordbok
    राजपाल हिन्दी शब्दकोश
    商務新詞典(全新版)
    NE Ordbok
    뉴에이스 국어사전
    譯典通英漢雙向字典
    现代汉语同义词典
    英譯廣東口語詞典
    牛津英汉汉英词典
    漢英對照成語詞典
    现代汉语规范词典
    五南國語活用辭典
    スーパー大辞林
    汉语成语词典
     
     
     
     
  20. Like
    zeitlings reacted to pseudometa in atop – Process Management & System Monitoring   
    Just submitted this to the Alfred Gallery yesterday.
     
    Features
    Process Management: CPU & Memory, kill processes, restart apps Bluetooth Devices: Battery Information (if available), Connection Network Connections Removable Volumes Uptime & Reboots Speedtest Live refreshing  
    ➡️ https://github.com/chrisgrieser/alfred-atop
     


  21. Like
    zeitlings reacted to Faris Najem in AlfredOCR - Optical Character Recognition   
    Ok, I will wait. thank you so much 💐.
  22. Like
    zeitlings got a reaction from andy4222 in Define Word - A Better Dictionary   
    Hey @andy4222, glad to hear you find it useful. The workflow is unlikely to end up in the gallery because it relies on functions that are only available through Objective-C. This means that there can not be a pure Swift version and that the program, on order to work, needs to be compiled into an executable binary, which I'm currently not having notarized by Apple. This in turn is a prerequisite for executables to be included in the gallery (which is a good thing all in all ).
  23. Like
    zeitlings got a reaction from vitor in Define Word - A Better Dictionary   
    Hey @andy4222, glad to hear you find it useful. The workflow is unlikely to end up in the gallery because it relies on functions that are only available through Objective-C. This means that there can not be a pure Swift version and that the program, on order to work, needs to be compiled into an executable binary, which I'm currently not having notarized by Apple. This in turn is a prerequisite for executables to be included in the gallery (which is a good thing all in all ).
  24. Like
    zeitlings got a reaction from andyedin in µBib | Citations, BibTeX, and Research   
    You can remove those from the workflow configuration (the list of identifiers). When they’re gone from there, you can permanently delete them. They are there to ensure that something is present initially. Admittedly, this part is a left-over from an earlier stage of the workflow that didn’t support ad hoc CSL management and could probably go away~
  25. Like
    zeitlings reacted to andyedin in µBib | Citations, BibTeX, and Research   
    Thanks for the prompt reply. I will try the workaround solution as you mentioned. Hail for this fantastic workflow.
×
×
  • Create New...