gingerbeardman / stapler

My take on the classic Macintosh app Stapler (with a little bit of LaunchList)
https://blog.gingerbeardman.com/2024/08/10/stapler-i-remade-a-32-year-old-classic-macintosh-app/
MIT License
215 stars 7 forks source link

adds .webloc support #14

Open kristofer opened 1 month ago

kristofer commented 1 month ago

Adds .webloc support for dropping a web url from browser into a .stapled file. Launching works as well without mods.

It allows a user to include web bookmarks into Stapler files, along with the local files.

kristofer commented 1 month ago

I guess I should add, I was unable to get the weblog stuff to work on 13.6 Ventura. But I see your example in the readme has a weblog item in it.

gingerbeardman commented 4 weeks ago

Thanks for this!

I'd love it if you could remove unrelated files from this commit, to make it easier for me to merge.

The goal would be to keep it as minimal as possible! Thanks @kristofer

gingerbeardman commented 4 weeks ago

Also, sorry this will need to be rebased as I've just implemented some changes to how things are added and launched—sorry!

gingerbeardman commented 3 weeks ago

I guess I should add, I was unable to get the weblog stuff to work on 13.6 Ventura. But I see your example in the readme has a weblog item in it.

My webloc item was dragged from Safari > Finder > Stapler

kristofer commented 3 weeks ago
gingerbeardman commented 3 weeks ago

No rush at all! I think this change will also get us the ability to drag and drop email addresses in the same way #36

kristofer commented 3 weeks ago

Glad you asked me to clean this up.

So the .webloc I'm saving in the StaplerDoc is merely a file (containing the actual target URL) in the temporary directory of the app. SO, when that gets deleted, the weblog file is gone. Bad.

I think there are two options.

hmm.

kristofer commented 3 weeks ago

Since the alias just gets JSON'd when saved, seems like adding typing to them makes the most sense.

gingerbeardman commented 3 weeks ago

See https://github.com/gingerbeardman/stapler/issues/18 for an explanation of filesystem bookmarks and an example of the data they store.

I wonder if we can use webloc:// (or either http:// or https://) and mailto:// URLs?

I'll give it some thought. I might even test a hand-crafted bookmark.

kristofer commented 2 weeks ago

lemme untangle this mess

kristofer commented 2 weeks ago

okay, I think I've cleaned it all up, along with pulling in all your latest commits. @gingerbeardman

gingerbeardman commented 2 weeks ago

Will take a look ASAP!