5 ms·
Its kinda funny, I have shown 2 people this tool so far. One is another engineer, who we kinda laughed over a tendency to spend an insane amount of time automa
by nerdjon 2y ago
Its kinda funny, I have shown 2 people this tool so far.
One is another engineer, who we kinda laughed over a tendency to spend an insane amount of time automating things that are quick. Like adding a tag to a folder is quick, I just didnt want to do it and things get out of sync.
But he also thought it was really cool and also did not really know about tags until we started talking about this. Kinda like me, he knew they were there but just never did anything with it.
I also showed it to my partner who kinda just keeps laughing every time he sees me glued to my laptop debugging this thing and tweaking it.
It has honestly been a really fun project though. Trying to keep things as native functionality as possible since the entire point of this is to make it so I can more easily work on a script or some other supporting document for a project on my iPad or iPhone and once I get on my Mac everything will just fall into place. I even made it so if I make a folder, it will send the name of that folder to my web app as a new project. (well the web app handles if its new or not, but still).
My only real annoyances so far:
1: Mac doesn't have the ability natively to automatically tag all files in a folder that the tags of the parent folder. I could script this, and I might. But I kinda wish I didn't have too.
2: Why is there no ability in Swift or a Mac app in general to read the contents of a Pages file. Honestly this kinda drives me insane. (I found a workaround by using a github project to turn it into HTML, but that really should not be necessary).
3: I really wish I could make a smart folder that would show me files based on the tags of the parent folder. This way I could have 2 folders in different locations (one that syncs with iCloud and one that syncs with my NAS with very different data, but used in combination) and I could create a smart folder with a single view of all of those files. But this unfortunately seems impossible. (Edit: I guess I could just automatically create symlinks, but a smart folder would be so much cleaner)
- NaOH 2y agoSounds like we do similar organization, though I avoid Tags and use Keywords, which I prefer primarily because they can be embedded in many files types and can be more numerously assigned. Regardless, for much of your work assigning Tags and organizing files, have a look at Hazel for automating these tasks. And yes, it can read the contents of Pages files. https://www.noodlesoft.com https://www.noodlesoft.com
- nerdjon 2y agoI did briefly look at Hazel, I think at this point it would likely be unnecessary. I already have my app which has the custom code to work with the API of my web app and set tags accordingly, at that point it would honestly be trivial to have it go through all of the subdirectories of a folder. I would be quite surprised if I could have Hazel query an API, parse the json, loop through it, and then tag based on the various values. Unless it solves my last issue? I did not think it did when I looked at it, since that is more a limitation of the smart folder filter than anything else. That being said, I am confused by the difference between keywords and tags? Since on Mac a tag can be put on any file, folder, etc and doesn't care about the filetype. A single tag can be on any number of files/folders and a file/folder can have as many tags as I want (at least seemingly, I have not seen a limit yet). When you say keywords, are you just referring to using certain... well keywords... in the filenames?
- NaOH 2y ago>Unless it solves my last issue? I did not think it did when I looked at it, since that is more a limitation of the smart folder filter than anything else. I don't believe Hazel will solve that last issue, but I may be off about that and you're certainly more skilled than I am. >When you say keywords, are you just referring to using certain... well keywords... in the filenames? Keywords are not in the file name, they're embedded in a file's metadata. For example, do a Print to PDF of a web page, but in the last dialog where you can save, note there's a Keyword field. Add something there that's unique, then search on it with Spotlight. Have lots of Keywords in use? Then Spotlight can use a keyword:[search term] search, similar to how there are many other built-in search queries. My primary setup is to have Hazel monitor specific files in specific folders looking for specific content within those files. Based on the results, Hazel runs my Automator Actions to embed the Keywords I want (especially helpful for organizing my business files, but I have plenty of other uses, like Hazel filing documents based on the Keywords I added when using Print to PDF). Ultimately, it sounds like you have a solid system accomplishing most of what you want done. Certainly no need to redo a viable setup. I was just hoping Hazel could help with the Pages files, and maybe secondarily some other parts of your process.
- synthoidzeta 2y agoI'm not in front of my Mac but you could you run `cat`on a Pages file?
- msephton 2y agoSadly not, a pages files is a sort of zip package
- nerdjon 2y agoI am almost positive I tried that, and I want to say no. The problem is that apparently the Pages file is just a hidden bundle. But unlike apps, Final Cut Pro, and other Mac bundles unless you go into Pages and change an advanced setting per file it doesn't have the "Show Package Contents" that the others do.
- aldonius 2y agomsephton's sibling comment notes that Pages files are a ZIP bundle. (I just tested this, and that's the case - actually they're not even compressed, just stored.) Inside this zip file there's a number of things: - three preview JPGs at varying sizes (roughly 50px, 250px, 1000px) - a Metadata folder with a couple of plists and a UUID file - an Index folder which contains a bunch of .iwa files which appear to be some Apple iWork suite specific thing. I'm not sure if there's a real file format there or if they all have a different format keyed on the file name. If you run `strings` on one of them you could plausibly recover document text.
- saagarjha 2y agoHave you tried using Spotlight to ask it what its indexable contents is?
- whartung 2y agoCould this have been done with Folder Actions and AppleScript?