Skip to content

Instantly share code, notes, and snippets.

@prenagha
Created January 24, 2020 00:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prenagha/3abc82056ab4eb766561cd63de6adff0 to your computer and use it in GitHub Desktop.
Save prenagha/3abc82056ab4eb766561cd63de6adff0 to your computer and use it in GitHub Desktop.
Eagle Filer export to Bookmark HTML file
#
# Export items from Eagle Filer into standard Netscape bookmark HTML format
# Suitable for importing into other services like Raindrop
# Select all records in Eagle Filer then run this script
#
set _filename to choose file name with prompt "Export Bookmarks" default name "eagle-bookmarks.html"
tell application "EagleFiler"
set _records to selected records of browser window 1
set _file to open for access _filename with write permission
set _lf to ASCII character 10
write "<html><title>Eagle Filer Bookmarks</title><h1>Eagle Filer Bookmarks</h1><dl>" to _file
write _lf to _file
log "start loop"
set cnt to 0
repeat with _record in _records
set cnt to cnt + 1
write "<dt><a href=\"" to _file
set _url to _record's source URL
write _url to _file as «class utf8»
write "\" ADD_DATE=\"" to _file
#http://www.macdrifter.com/2011/12/timestamps-in-applescript.html
set _added to _record's added date
set df to (do shell script "date -j -f '%A, %B %e, %Y at %l:%M:%S %p' '" & _added & "' '+%s'")
write df to _file
write "\">" to _file
set _title to _record's title
write _title to _file as «class utf8»
write "</a>" to _file
write _lf to _file
log cnt
end repeat
log "end loop"
write "</dl></html>" to _file
write _lf to _file
close access _file
end tell
@prenagha
Copy link
Author

Export a set of selected records in Eagle Filer into a standard "Netscape" bookmarks HTML format
Suitable for importing into a variety of bookmarking services
I am trying this with @raindropio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment