Skip to content

Instantly share code, notes, and snippets.

@firexcy
Created September 14, 2019 06:53
Show Gist options
  • Save firexcy/c1930841c29f32d5ab722052f2323615 to your computer and use it in GitHub Desktop.
Save firexcy/c1930841c29f32d5ab722052f2323615 to your computer and use it in GitHub Desktop.
-- Front matters
set urlList to {}
set listTitle to "# Vivaldi URL List | " & ((current date) as string)
-- Get tabs
tell application "Vivaldi"
activate
set windowList to window 1
repeat with w in windowList
try
repeat with t in (tabs of w)
set tabTitle to (title of t)
set tabURL to (URL of t)
set tabInfo to ("- [ ] [" & tabTitle & "](" & tabURL & ")" & return)
copy TabInfo to the end of urlList
end repeat
end try
end repeat
end tell
-- Convert the urlList array to text
set text item delimiters to return
set output to (listTitle & return & return & urlList) as text
-- Write to file
set folerPath to "/Users/yourname/OneDrive/Documents/Notes/"
set fileName to folerPath & "VivaldiTabs-" & (do shell script "date +%m%d" & "-" & (do shell script "date +%H%M%S" & ".md"))
do shell script "echo " & quoted form of output & " > " & quoted form of fileName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment