Safari Bookmark Folder Sorter

A place for you to show off what you have made with LiveCode

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Safari Bookmark Folder Sorter

Post by marksmithhfx » Wed Jun 01, 2022 3:20 pm

Hello everyone, I just uploaded a macOS app to Dropbox that sorts Safari bookmark folders. I consider this still in beta but if anyone has need of such a tool or would like to test and provide feedback the link is below. Thanks

https://www.dropbox.com/s/mub7eydq3bnfl ... 1.zip?dl=0
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by marksmithhfx » Thu Jun 02, 2022 10:50 pm

BTW, Dropbox appears to represent a Mac application as a folder for some reason, but if you just use the download button on the page it will download and display as a file on your system.

How have others attempted to distributed a macOS (LC) binary?

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by stam » Fri Jun 03, 2022 1:39 am

marksmithhfx wrote:
Thu Jun 02, 2022 10:50 pm
BTW, Dropbox appears to represent a Mac application as a folder for some reason, but if you just use the download button on the page it will download and display as a file on your system.

How have others attempted to distributed a macOS (LC) binary?

Mark
Most would zip the app, or package it as a .dmg - it's unusual to share the bare app as it's essentially a tricked up folder on MacOS, but appears as a normal folder on other platforms...

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by stam » Fri Jun 03, 2022 2:47 am

marksmithhfx wrote:
Wed Jun 01, 2022 3:20 pm
Hello everyone, I just uploaded a macOS app to Dropbox that sorts Safari bookmark folders. I consider this still in beta but if anyone has need of such a tool or would like to test and provide feedback the link is below. Thanks

https://www.dropbox.com/s/mub7eydq3bnfl ... 1.zip?dl=0
Thanks for sharing BTW - seems to work fine: it opens the bookmark export file, produces a table of folders and the 3 sort buttons... sort.

But I must say i'd prefer to sort manually based on what interests me, rather than alphabetical order or number of bookmarks, so for me this has limited utility...
I haven't tested re-importing as the process described has too many steps... i take it it isn't possible to just edit the file rather than having to replace it as described?

But rather than re-ordering my bookmark folders, my biggest issue with bookmarks is that over the decades i've accumulated an unholy number of bookmarks, many of which are now dead. I'd *really* use an app that could determine a URL was dead (probably harder than it sounds as won't necessarily lead to a 404) and say move them to 'extinct' bookmark folder...

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by marksmithhfx » Sun Jun 05, 2022 2:54 pm

stam wrote:
Fri Jun 03, 2022 1:39 am
Most would zip the app, or package it as a .dmg - it's unusual to share the bare app as it's essentially a tricked up folder on MacOS, but appears as a normal folder on other platforms...
Thanks Stam... so that's what all that stuff on DMG and PKG in the LC lesson on stapling and notarising is all about. And here I thought I was out of the woods... so naive 😊

It doesn't look like MrSign'n'NotarizeHelper does this but, just to be sure, I just sent Matthias an email to confirm.

Thanks for letting me know.
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by stam » Sun Jun 05, 2022 3:29 pm

Probably simpler to just zip the snotarised app and distribute the zip file…. No extra work needed…

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by marksmithhfx » Sun Jun 05, 2022 3:38 pm

stam wrote:
Fri Jun 03, 2022 2:47 am
I haven't tested re-importing as the process described has too many steps... i take it it isn't possible to just edit the file rather than having to replace it as described?

But rather than re-ordering my bookmark folders, my biggest issue with bookmarks is that over the decades i've accumulated an unholy number of bookmarks, many of which are now dead. I'd *really* use an app that could determine a URL was dead (probably harder than it sounds as won't necessarily lead to a 404) and say move them to 'extinct' bookmark folder...
Hi Stam,

You are completely right. Someone would have to be really determined (or desperate) to want to re-import the bookmarks using the manual method. But with about 10,000+ bookmarks and 290+ folders I guess I fit into the desperate category :D I used to have a utility that did this (SafariSort) but it's long since been abandoned and no longer supports newer 64-bit Macs. And, somewhat surprisingly, nothing else has come along.

It may be possible to sort the bookmark file directly (it's called bookmarks.plist in the Library/Safari directory) but when I opened the file with a text editor it looked pretty incomprehensible. There is an XML package in LC which I have not tried yet (mostly because I just discovered it) and if it will read binary coded files that might do the trick. Short of that, I think that leaves using an export and edit approach, which while not ideal, does get the job done. Would be nice to read directly though. If you think of anything that might work please let me know.

I like your idea of sorting manually. SafariSort never had that option and it is a complete pita to do it in Safari itself (if you have a lot of folders).

As for testing for dead links, is there anyway to ping a url to see if it's still active? If we could find something like that it would be short work to create a utility like the one you are looking for (I think).

Thanks for all the feedback and suggestions. They are all great and will inspire me to keep poking away at this.

Mark
Last edited by marksmithhfx on Sun Jun 05, 2022 3:51 pm, edited 2 times in total.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by marksmithhfx » Sun Jun 05, 2022 3:48 pm

stam wrote:
Sun Jun 05, 2022 3:29 pm
Probably simpler to just zip the snotarised app and distribute the zip file…. No extra work needed…
Hi Stam,

I tried that but it didn't make a difference. Curious, I asked dropbox about it and got the reply... "keep in mind that Dropbox supports previews of specific archive file types on our website. On supported file types you have the ability to navigate through the archive file structure and preview individual files within the archive." So it looks like it is presenting the contents of the archive to the viewer. Mind you it's complicated. If I look at the file in the dropbox folder on my Mac it looks like a zip archive. If I then select the "View on dropbox" menu option, or get the link to the file and look at it that way, I see the folder representation you saw. I think the solution is to go the DMG route. I should probably know how to do that anyway.

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by marksmithhfx » Sun Jun 05, 2022 10:05 pm

stam wrote:
Sun Jun 05, 2022 3:29 pm
Probably simpler to just zip the snotarised app and distribute the zip file…. No extra work needed…
Hi Stam,

Good thing I sent that email. I was looking at the line in Matthias's program that says "Sign, Notarise and Staple App" and never realised it was a drop-down menu. When I did open it (after speaking with Matthias), all the options for creating and signing DMG's and PKG's is built right in. An even more impressive program than I first thought. Anyway, I tried it with the default DMG option (using hdiUtil) and it worked like a charm. That, and the fact that it remembers all of your settings between invocations, makes it a very useful tool indeed. Can't say enough good things about it (so thanks again for pointing me in the right direction).

I have changed the dropbox file to a DMG for now, although I may explore the PKG option at a later date as well.

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by marksmithhfx » Tue Jun 07, 2022 11:05 am

stam wrote:
Fri Jun 03, 2022 2:47 am
But rather than re-ordering my bookmark folders, my biggest issue with bookmarks is that over the decades i've accumulated an unholy number of bookmarks, many of which are now dead. I'd *really* use an app that could determine a URL was dead (probably harder than it sounds as won't necessarily lead to a 404) and say move them to 'extinct' bookmark folder...
Hi Stam,

I found an app that claims to do just that: locate and (if you want) delete "broken" links. https://www.url-manager.com/tour.html
See the 7th image on the page linked above, in the Manage Bookmarks section.

Best,
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by stam » Tue Jun 07, 2022 12:34 pm

Thanks Mark,

that does seem like a really well thought-out bookmark manager, thanks for the find!

Couldn't test it's validation as it's for-pay feature; would have been a fun LC project if only one had the time... so will probably buy it ;)

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: Safari Bookmark Folder Sorter

Post by marksmithhfx » Wed Jun 15, 2022 8:47 am

stam wrote:
Tue Jun 07, 2022 12:34 pm
Thanks Mark,

that does seem like a really well thought-out bookmark manager, thanks for the find!

Couldn't test it's validation as it's for-pay feature; would have been a fun LC project if only one had the time... so will probably buy it ;)
You'll have to let me know how you like it. But before you do too much tidying up, I have my own app now reading and writing the Safari Bookmarks file directly -- no more export/import. And I do plan on implementing your suggestion of "manual" rearranging so... look for a new version from me shortly.*

*shortly is always a relative term. My own optimistic expectation is about a week.

Cheers,
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply

Return to “Made With LiveCode”