-
Posts
896 -
Joined
-
Last visited
-
Days Won
24
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by xilopaint
-
-
6 hours ago, zeitlings said:
Whatever kind of certificate Apple grants you for development when you log in with your Apple-ID I guess ¯\_(ツ)_/¯
Could you guide me on how to sign a binary the way you did?
-
2 minutes ago, zeitlings said:
I know there’s an annual cost for the enrollment. My question was about the codesign output for your binary:
Authority=Apple Development: pat****@*****.com (W2VCU4XR6K) Authority=Apple Worldwide Developer Relations Certification Authority Authority=Apple Root CA
I thought this kind of output implied that you were already enrolled, which means you have already paid for the annual membership and are able to notarize binaries without any additional costs. If it's not true, what kind of certificate is this?
-
6 hours ago, zeitlings said:
I would prefer to have them notarized, but alas, Apple charges for that
Authority=Apple Development: pat****@*****.com (W2VCU4XR6K) Authority=Apple Worldwide Developer Relations Certification Authority Authority=Apple Root CA
Doesn’t the codesign output above indicate that you’re already enrolled in the Apple Developer Program, which grants you the privilege of notarizing the app without additional costs?
-
2 minutes ago, zeitlings said:
The piece of code you're referring to isn't very useful on its own, and I haven't uploaded any of my more complex Xcode projects yet. There are various reasons why I haven't shared them at the moment, but I appreciate your interest.
It's up to you to decide what to do with your code, as long as you're transparent. The problem here is that you use a MIT license. When it comes to Alfred's workflows, transparency is important for security reasons, of course.
-
18 minutes ago, zeitlings said:
I've checked out what it is you're doing with your optimize action. It looks like you're just tweaking the DPI/ PPI, right? (k2pdfopt <> -ui- -as -mode copy -dpi <>) Since I’ve also been checking out K2pdfopt, I came across the -bpc option btw., which reduces the number of bits per color plane. Maybe you already know about it, but this looks like it could be interesting for your implementation 😄
While it can often be used this way, the optimize action is not really intended to compress PDF files, but rather to improve the readability of low-quality scanned PDFs.
-
13 minutes ago, zeitlings said:On 4/27/2023 at 5:37 PM, xilopaint said:
I'm absolutely in love with this workflow. I like everything, even the icon color tone is appealing to me. Haven't you committed the code for the compression feature @zeitlings?
Thanks! 😁 The project is becoming more and more interesting for me as well. What I mean when I say that the compression utility is decoupled is just that I've rewritten the code internally so that it can be called independently of the OCR routine - as opposed to being an ad hoc change to the output content stream that writes the PDF to disk. It's still baked into the program.
I actually asked why you didn't add that piece of code to the repository.
-
14 hours ago, zeitlings said:
@TomBenz I just updated the workflow to include compression.
If you remember the 1.2 MB sample you sent me, it blew up to 7.9 MB uncompressed. With compression, we level off at 589 KB on my machine without butchering the file 😁. However, compressing a PDF does not always result in a smaller file size, so I've decided to keep the uncompressed PDF document around if compression does not actually produce the desired result. Let me know what happens to the 1.15 GB document!
I've decoupled the compression utility, which means you can now compress any PDF without having to run OCR on it. For some documents this works really well, for others it may inflate the file size even more. Which factors play a role here remains a task for future experiments to find out... There are also some internal improvements, additions to the workflow and tweaks:
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 queues (⌥⌘)
- Changed the way an export strategy is specified by using a pop-up selection box
- Improved performance
I'm absolutely in love with this workflow. I like everything, even the icon color tone is appealing to me. Haven't you committed the code for the compression feature @zeitlings?
What kind of compression are you doing, btw? Is it similar to the work of my workflow’s optimize action you mentioned earlier?
-
Update (v4.3)
- Replace PyPDF2 with pypdf.
- Update Notificator.
- Improve flow for PyCryptodome installation.
-
2 hours ago, David Moe said:
@xilopaint no specific reason, I just didn't consider Intel Macs. I'll update the workflow on my GitHub, not sure what the process is for updating on Alfred Gallery. Thanks for the feedback!
Actually, /usr/local/bin is more commonly used on Intel Macs than on ARM. If you install VS Code by Homebrew in an ARM Mac, for example, the binary will be placed in /opt/homebrew/bin.
-
@David MoeThanks for this simple and useful workflow. Any reason for using /usr/local/bin/code as the default path of the CLI instead of just using code, which would make it work for Homebrew installations in both ARM and Intel Macs?
-
21 minutes ago, vitor said:
Yes, custom document icons are specifically a problem (see the last link from my list above) but that’s not all. I don’t have an issue with PDF icons but I do have it with PNGs. Both of those open with Preview.
Do you remember changing PNG filetype association anytime in the past?
-
-
-
54 minutes ago, pseudometa said:
I personally use JetBrains Mono, but the icons are available in all nerdfonts. The name is a bit misleading, "nerdfonts" just means "font that has the nerd-icons added to it".
I have the Hack Nerd Font installed, but I'm not very familiar with the icons. Is there any practical way to search the icons without using the website?
-
@pseudometa what nerd font specifically have you installed to get these icons?
-
Update (v2.0):
- The workflow has been rewritten in JXA.
-
An Alfred workflow to search YouTube.
Setup
The workflow requires an API key, which can be requested and set up by following the steps 1–3 that you can find here.
UsageSearch videos via the yt keyword, channels via the ytc keyword, and zplaylists via the ytp keyword.
When displaying channels, select one of them and use the ⌘ modifier key to show its description.
Contribute
To report a bug or request a feature, please create an issue or submit a pull request. -
On 4/7/2023 at 7:36 AM, zeitlings said:
v1.2.3
• 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 runningThanks for the fix. I'm very impressed with the code simplicity given the quality of the text recognition. We can see Apple has done a great job with the Vision framework.
-
On 4/6/2023 at 8:13 PM, zeitlings said:
@xilopaint yes! 😁
The new version doesn't work for me. It fails when checking for a path that does not exist:
[02:20:57.247] Optical Character Recognition[Universal Action] Processing complete [02:20:57.254] Optical Character Recognition[Universal Action] Passing output '/Users/xxxx/Desktop/test.pdf' to Arg and Vars [02:20:57.257] Optical Character Recognition[Arg and Vars] Processing complete [02:20:57.258] Optical Character Recognition[Arg and Vars] Passing output '' to Run Script [02:20:57.369] STDERR: Optical Character Recognition[Run Script] 2023-04-07 02:20:57.365 ocr[2995:28153] The folder “progress.txt” doesn’t exist. [02:20:57.376] Optical Character Recognition[Run Script] Processing complete [02:20:57.378] Optical Character Recognition[Run Script] Passing output '- Error Domain=NSCocoaErrorDomain Code=4 "The folder “progress.txt” doesn’t exist." UserInfo={NSFilePath=/Users/xxxx/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.zeitlings.ocr/progress.txt, NSUserStringVariant=Folder, NSUnderlyingError=0x600000e7a760 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} #0 - super: NSObject ' to Conditional [02:20:57.379] Optical Character Recognition[Conditional] Processing complete [02:20:57.380] Optical Character Recognition[Conditional] Passing output '- Error Domain=NSCocoaErrorDomain Code=4 "The folder “progress.txt” doesn’t exist." UserInfo={NSFilePath=/Users/xxxx/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.zeitlings.ocr/progress.txt, NSUserStringVariant=Folder, NSUnderlyingError=0x600000e7a760 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} #0 - super: NSObject ' to Post Notification
I’ve also tried to create progress.txt myself. The workflow ran with no errors but the OCR’d PDF file has not been created.
-
4 hours ago, vitor said:
At a glance that looks like it should be app.move(toDo, {to: trashList});.
It returns the same error. There's a Stack Overflow question about this. I start to think it might be a bug in Thing's JXA API.
-
Hey @vitor, I managed to translate everything to JXA except this small AppleScript handle:
on deleteToDo(argv) tell application id "com.culturedcode.ThingsMac" set toDo to to do id (item 2 of argv as text) move toDo to list id "TMTrashListSource" end tell end deleteToDo
This was my try:
function deleteToDo(argv) { const app = Application("com.culturedcode.ThingsMac"); const toDo = app.toDos.byId(argv[1]); const trashList = app.lists.byId("TMTrashListSource"); toDo.move({to: trashList}); }
But I’m getting this error in the toDo.move({to: trashList}); line:
ERROR: Things[Run Script] ./things.js: execution error: Error: Error: Can't convert types. (-1700)
This is the JavaScript dictionary of the move method of the ToDo object:
move method : Move a to do to a different list. move specifier : the to do(s) to move to: List : List to use as target
And this is the dictionary of the ToDo object:
ToDo Object : Represents a Things to do. elements contains tags; contained by application, areas, lists, contacts, projects, tags. properties id (text, r/o) : The unique identifier of the to do. name (text) : Name of the to do creationDate (date) : Creation date of the to do modificationDate (date) : Modification date of the to do dueDate (date) : Due date of the to do activationDate (date, r/o) : Activation date of the scheduled to do completionDate (date) : Completion date of the to do cancellationDate (date) : Cancellation date of the to do status ("open"/"completed"/"canceled") : Status of the to do tagNames (text) : Tag names separated by comma notes (text) : Notes of the to do project (Project) : Project the to do belongs to area (Area) : Area the to do belongs to contact (Contact) : Contact the to do is assigned to methods move, schedule, show, edit.
Any ideas?
-
7 hours ago, zeissdistagon said:
Hello:
Is there a downloadable PDF instruction manual for Alfred? Maybe it's just me (chorus: "It's you!"), but I end up with a bunch of open window tabs open as each page seems to reference something else I need or wan to know
Thanks
The Help page is not enough for you?
You still can use the ? keyword to quickly find what you want to learn about.
-
5 hours ago, vitor said:
You can call it from Zsh or Bash like any other script; the arguments will be sent to the function.
Do you mean by using this osascript -l JavaScript things.js showLists ?
-
@vitor, I'm translating this workflow to JXA. This is how the original AppleScript version calls the script:
This passes a list of parameters to a run handler in things.applescript.
What is the equivalent way in JXA of passing an array of parameters to the run function of an uncompiled script named things.js?
AlfredOCR - Optical Character Recognition
in Share your Workflows
Posted · Edited by xilopaint
Never mind, I just managed to do it by configuring the "Signing and Capabilities" section in Xcode.