Created
September 14, 2019 06:53
-
-
Save firexcy/c1930841c29f32d5ab722052f2323615 to your computer and use it in GitHub Desktop.
This file contains 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
-- 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