Sonntag, 20. Januar 2013

Shell: Delicious bookmark export with Curl

There are a lot of solution, how we can automate the export of the delicious bookmarks via the API into an XML file, but nothing for exporting the HTML backup file. The advantaqge of the HTML file, it can be imported into Firefox, Chrome ... Here is my solution, which runs fine on my Synology NAS:
       
#!/bin/ash

# By http://tecjunkie.blogspot.com/
# 2013 

CookieFileName=cookies.txt
username=user
password=password

curl --cookie $CookieFileName --cookie-jar $CookieFileName \
  --data "username=$username&password=$password" \
  https://previous.delicious.com/login --silent --insecure --location

curl --cookie $CookieFileName \
  --form "include_notes=yes&include_tags=yes" \
  http://export.delicious.com/settings/bookmarks/export --silent --insecure --location \
  --output "delicious.html"

Keine Kommentare:

Kommentar veröffentlichen