This AppleScript saves all tabs and URLs from the Safari windows to a new Markdown file.
The markdown file contains the tab names and URLs as clickable links. URLs are grouped per browser window and seperated by a horizontal rule. The date and the number of tabs and windows are displayed just below the title. In the title the name of the computer is used to identfy from which computer this file originated.
By default the markdown file is saved in your "Documents" folder. The location can be changed, the target directory is not checked so make sure it exists.
On succesfull creation of the markdown file a notification is displayed.
Next steps:
- Download the zip file or clone this repository.
- Run it from the Script Editor to test the script in your environment, don't forget to set the language to JavaScript.
Once you made sure it works on your system you can:
- Turn it into a Automator workflow to create a Service.
- More information: Use Automator to create a System-Wide service or
- Use BetterTouchTool to set up a keybinding or
- Use BetterTouchTool to create a Touch Bar button.
I went for the last option 😉
Saving browser-tabs is a recurring scripting item, below some links to other scripts to save browser-tabs from Chrome or Safari: