Jump to content

sepulchra

Member
  • Posts

    395
  • Joined

  • Last visited

  • Days Won

    25

Reputation Activity

  1. Like
    sepulchra got a reaction from zeitlings in apple mail and markdown links   
    I keep my todo list in Taskpaper (plain text) so I often keep links to emails I want to respond to later. I built this little workflow is based on something i found on Macstories: https://www.macstories.net/stories/generating-markdown-links-to-mail-messages-with-shortcuts-and-applescript/
     
    It is a simple applescript that gets triggered by a keyword or snippet object.

     
    @vitor Is this something that would be useful users of the gallery or does it feel a little niche?
  2. Haha
    sepulchra got a reaction from zeitlings in New File   
    You are on a tear!
  3. Thanks
    sepulchra reacted to akrabat in apple mail and markdown links   
    FWIW, I also have a workflow that does this.

     
  4. Like
    sepulchra got a reaction from akrabat in Playing With Fire   
    Dark
     

    https://www.alfredapp.com/extras/theme/zbCCokE2zP/
  5. Thanks
    sepulchra reacted to zeitlings in AlfredOCR - Optical Character Recognition   
    It's true, the increase in file size can be significant. I did some comparisons with DEVONthink's OCR for your usual text-based PDF documents, which uses Abbyy's engine in the background. In some cases, I was able to get better results in terms of file size with the workflow, so I guess it can hardly be avoided. Abbyy's in-house application can export PDFs by applying MCR compression to the images, which is great and would be awesome to have access to. But that goes way beyond what I had in mind for the workflow 😂.
     
    What I find interesting is that the screenshots most likely don't have any previous text embedded in them, which should allow for a more efficient way to create the new PDF pages, and that the file size still escalates as it does. There is a difference between real-world image dimensions and device-specific metrics. Perhaps what looks like a rather modest screenshot could be a 4K ∞-DPI monstrosity? 
     
    Image compression is its own subgenre, I suppose, and another rabbit hole to get lost in for sure. Maybe I'll look into it sometime in a moment of muse.
     
    You may want to take a look at @xilopaint's Alfred PDF Tools to reduce the pixel density of your document or to scale the images down before attempting the OCR. For really large documents, however, I would recommend to use, and I myself will continue use, the professional tools.
  6. Like
    sepulchra reacted to zeitlings in AlfredOCR - Optical Character Recognition   
    Alfred OCR
    I noticed that Apple's Vision framework finally produces some usable results.
    This means: No external dependencies are required to perform the OCR.
     

     
       Alfred OCR Light
     
    The workflow allows you to copy text from images using optical character recognition.
    Take a snapshot with your mouse or trackpad to automatically copy the recognized text to the clipboard. 

     
       Alfred OCR+
     
    The workflow allows you to copy text from images, or to convert PDF files into searchable PDF documents
    using optical character recognition, and to apply compression to PDF documents.
     
    1 / Snapshot
    Take a snapshot with your mouse or trackpad to automatically copy the recognized text to the clipboard. 
    Default shortcut: ⌘+⇧+6  Default keyword: ocr  
    2 / PDF Document
    To convert a PDF into a searchable PDF document, pass it to the workflow’s Universal Action.  To compress the resulting PDF, pass the source document on while pressing the ⌘+⇧ keys. To open the resulting PDF, pass the source document on while pressing the ⌥+⇧ keys. To force the replacement of a source document, pass it on while pressing the ⌥+⌘ keys. To compress a PDF without performing OCR, pass it to the Compress PDF Document File Action. To view the progress tracker, re-enable the workflow with the Keyword (default: ocr).
     
     
    Configuration
    To open the OCR Workflow Configuration, type the keyword preceeded by a colon (default: ocr).

     
    Languages
    Specify the languages you want the OCR process to consider by adding the appropriate RFC-5646 language tag. The following languages (and regions) are currently supported: en-US, fr-FR, it-IT, de-DE, es-ES, pt-BR, zh-Hans, zh-Hant, yue-Hans, yue-Hant, ko-KR, ja-JA, ru-RU, uk-UA

    Explanations:
    en-US: (English as used in the United States) de-DE: (German as used in Germany) fr-FR: (French as used in France) it-IT: (Italian as used in Italy) es-ES: (Spanish as used in Spain) pt-BR: (Portuguese as used in Brazil) ko-KR: (Korean as used in South Korea) uk-UA: (Ukrainian as used in Ukraine) ja-JA: (Japanese as used in Japan) ru-RU: (Russian as used in Russia) yue-Hant: (Traditional Cantonese) yue-Hans: (Simplified Cantonese) zh-Hant: (Traditional Chinese) zh-Hans: (Simplified Chinese)  
    Change Log
     
    v1.4.0 (OCR+)
    Added bitmap compression and compression facets Added embedding strategy options "Word Granularity" attempts to embed the text word by word "Line Oriented" is the strategy previously used (use if you encounter unexpected results) Improved OCR embedding granularity Fixed 'Recognizer init' error v1.3.0 (OCR+)
    Added PDF compression Added a keyword for quick access to the workflow configuration (Alfred 5.1+) Added Universal Action modifier option to apply compression to PDFs (⇧⌘) Added Universal Action modifier option to open converted PDFs in the default application (⌥⇧) Added a configuration option to open converted PDFs in the default application Added a configuration option to specify how text should be joined when taking a snapshot Added a File Action to compress PDF documents Changed the modifier keys to replace a PDF and added noticeable visual cues (⌥⌘) Changed the way an export strategy is specified by using a pop-up selection box Improved performance v1.2.3 (OCR+)
    Fixed an error thrown due to missing workflow cache directory Fixed snapshot tasks queuing up if they are started before the previous task has finished Added explicit opt-out of Snapshot tasks while PDF conversions are running v1.2.2 (OCR+)
    Fixed low contrast output images produced for some PDF documents Added progress tracker for the document recognition process Added three options to handle document output: export to location, copy to same location and replace. Priority behavior: Replace > Copy > Export. Added new icons Improved output file size for PDF documents that do not already contain text  
    v1.2.0 (OCR Light)
    Add File Action to extract text from images Fix for macOS Sonoma (Compiles the script en passant to compensate for the failure to link objc symbols on macOS 14). v1.1.1 (OCR Light)
    Adds if #available check to accommodate macOS 12.0 v1.1.0 (OCR Light)
    Updated configuration and documentation Added new icon
  7. Like
    sepulchra got a reaction from vitor in Appreciation for work…   
    I second that sentiment. There are so many additions and responses to user requests in the this forum that I'm sure were sudden additions to your roadmap.. Kudos.
  8. Like
    sepulchra reacted to Stephen_C in Alfred requires me to set my hotkey after every reboot   
    I'm glad everything is now working for you. If you've not updated to Ventura 13.3 I recommend it because it seems to retain granted permissions rather better than did previous versions of Ventura.
     
    Stephen
  9. Like
    sepulchra reacted to Stephen_C in Send a Message template workflow   
    Version 1.01: icon changed.
     
    Edit: …with no offence intended by using another idea!
     
    Stephen
  10. Thanks
    sepulchra reacted to Stephen_C in messages workflow and emojis   
    Sorry for the hasty and less than helpful responses yesterday! I've now been able to do some more work and can confirm the result you discovered with your first workflow variant. I see exactly the same problem with emojis when using that form of workflow.
     
    As a result I prefer to use this workflow:
     

     
    The script is as follows:
     
    on run argv set targetFriend to item 1 of argv set textMessage to item 2 of argv tell application "Messages" set targetService to (id of 1st account whose service type = iMessage) set theFriend to participant targetFriend of account id targetService send textMessage to theFriend end tell tell application "Messages" quit end tell end run  
    Obviously there are some differences between what you did and what I have done:
    I have a list filter listing various friends' numbers. At the end of my script I've added a quit command to Messages to emulate what you were trying to do (i.e., send messages without opening Messages)—but I find the end result very similar to yours. I hope this is a rather more helpful than yesterday's posts. 😀
     
    Stephen
  11. Like
    sepulchra got a reaction from vitor in Note Taker — Keep small bits of text   
    Ooooh! I hadn't thought of that. I already have a workflow that appends text using variables and alfred's append to file function. I didn't think of just making it a universal action to do this. 
     
    Thank you for the advice and making such an incredibly useful workflow.
     
     
  12. Thanks
    sepulchra reacted to vitor in Note Taker — Keep small bits of text   
    No worries. Your requests are reasonable and well explained.
     
    I see the utility in this feature, but that’s one of those simple things which requires a high degree of specificity. E.g. should the append happen directly, have a newline between the old result, a custom separator? It becomes more cumbersome to insert the feature and its configuration into the workflow than for each person to build the one they want: Notes are shown with a File Filer so you can use Universal Actions on them. Including one you build yourself in a separate workflow (so changes are not overridden) to append exactly like you want.
  13. Like
    sepulchra got a reaction from vitor in Playing With Fire   
    Dark
     

    https://www.alfredapp.com/extras/theme/zbCCokE2zP/
  14. Thanks
    sepulchra reacted to BenjaminO in File Explorer   
    @sepulchra with v2.3 you’ll not be limited to 1 048 575 files in the scan. The script will create new sheets when maximum number of rows is reached.
  15. Like
    sepulchra reacted to vitor in Coffee Coffee — Prevent your computer from going to sleep   
    Updated to 2023.1.
    Rewritten in JXA. When setting a time, show the end point. New repository. New icon. New About. Add configurable keywords. Remove OneUpdater in favour of Gallery updating.

  16. Haha
    sepulchra got a reaction from Stephen_C in Note Taker — Keep small bits of text   
    Amazing!!! Thank you and please tell me where to send the thank you package of Bacalao.
  17. Like
    sepulchra reacted to vitor in Note Taker — Keep small bits of text   
    @sepulchra I’m changing the open method to an Open File Action so you can go in there and change it. It will be available later today.
     

  18. Like
    sepulchra reacted to Vero in Search Scope and External Volumes   
    @sepulchra There's no need to add the volume to Alfred's default search scope.
     
    To use the File Filter, first make sure your external volume is indexed by Spotlight: The success and reliability of this will vary based on the particular scenario in which you use the drive. For example, a drive that is always connected and always on will be easier for Spotlight to maintain as it'll have regular access to it to keep the index up to date.
     
    Meanwhile if it's a shared drive where someone else might modify files, a drive that gets taken in your bag to work and back, etc... the reliability of the index itself will be affected as Spotlight will essentially have to reindex it every time you connect to it.  You can use Alfred's File Troubleshooting tool to check that the drive is indexed and returning the right metadata.
     
    Next, you can create your File Filter workflow, adding the Volume to the object's Search Scope. There's no need to include the volume to Alfred's main search scope in the Default Results preferences.
     
    Given an external volume may be slower at returning results, keeping it as a file filter ensures that your default results are always fast and efficient, and the external volume can be accessed specifically using the File Filter's keyword only when needed. Makes sense?  
  19. Thanks
    sepulchra reacted to luckman212 in List file metadata   
    Maybe I'm late to this party but, just in case: @sepulchra you don't need regex to extract a single piece of metadata as a plain string. You can use e.g. 
     
    mdls -raw -name kMDItemFSCreatorCode /path/to/file  
  20. Like
    sepulchra reacted to Stephen_C in The power of shortcuts   
    There is another useful way in which to use Shortcuts which I have discovered this morning. Sometimes I need to translate foreign text displayed on my Mac. Instinctively I reach for a Universal Action in Alfred…and if you link one to this Shortcut you can use the Universal Action to provide the translation:
     

     
    Stephen
  21. Like
    sepulchra reacted to Stephen_C in The power of shortcuts   
    An AirDrop Universal Action links really well with Shortcuts. You can use file, text and URL Shortcuts within that Universal Action so that you see the relevant action depending upon what you have selected.
     
    Stephen
  22. Thanks
    sepulchra reacted to Stephen_C in Default Universal Action to zip files and folders   
    In the meantime what I do is to use a Universal Action linked to a Make Archive shortcut—which works well.
     
    Stephen
  23. Thanks
    sepulchra reacted to BenjaminO in Alfred Plex Workflow   
    Hey @sepulchra, here it is 😄 : https://www.alfredapp.com/extras/theme/RojxyirrEH/
  24. Like
    sepulchra got a reaction from vitor in Shrieking Chimes — Set Timers and Alarms   
    ok this is cool!!!
  25. Thanks
    sepulchra got a reaction from Vero in Show all items in a list   
    @Stephen_C's workflow will provide a good example but if i understand what might be happening, I think you just need to set your keyword (if it has one) to no argument. and it should display all items when triggered.  @vitor's KeyCodes workflow is a good example of a list filter that packs in lots of items and functions the way you are looking for
     
     
×
×
  • Create New...