Forked from rsnemmen/save safari url to markdown.scpt
Last active
July 19, 2020 09:44
-
-
Save iwittkau/a242b65936b55622595220346cd99b2d to your computer and use it in GitHub Desktop.
Apple script to save urls of all currently open safari tabs to markdown file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set output to "" | |
tell application "Safari" | |
--Count the number of Tabs | |
set numTabs to number of tabs in window 1 | |
repeat with t from 1 to numTabs | |
-- Set the Tab Name and URL values | |
set tabName to name of tab t of window 1 | |
set tabURL to URL of tab t of window 1 | |
-- Create the Tab link and write the code | |
set output to (output & "- [" & tabName & "](" & tabURL & ")" as string) & linefeed as string | |
end repeat | |
end tell | |
set the clipboard to output as string | |
return output | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment