Reading List Export
-
Problem
I saw someone wanted to be able to export their reading list: https://forum.vivaldi.net/topic/79087/reading-list-exportChrome's support forum says it can't be done and isn't accessible in the filesystem: https://support.google.com/chrome/thread/118051507/how-to-export-reading-list?hl=en.
Solution
Here is code you can paste into the browser console.
(it's not a mod you add to browser.html, unless you want it running every time you start vivaldi)Uncomment the 3rd line if you want CSV.
vivaldi.readingListPrivate.getAll(items => { let FORM = "HTML"; // FORM = "CSV"; let listitems,head,tail; if(FORM==="HTML"){ listitems = items.map(item => "<a class='" + (item.read ? "read" : "unread") + "' href='" + item.url + "' data-time='"+item.lastUpdate+"'>"+item.title+"</a><br>"); head = `<!doctype HTML><html><head><title>Exported Reading List</title></head><body>`; tail = `</body></html>`; filename = `exported_readinglist.html`; } else { listitems = items.map(item => [item.url,item.title.indexOf(",")>=0 ? '"'+item.title+'"' : item.title,item.read,item.lastUpdate].join(",")); head = `url,title,read,update`; tail = ``; filename = `exported_readinglist.csv`; } const textfile = new File([[head,listitems.join("\n"),tail].join("\n")], filename, {type: "text/plain"}); const dl = document.createElement("a"); dl.download = filename; dl.setAttribute("href", window.URL.createObjectURL(textfile)); dl.click(); });
Based on a related idea for OPML export: https://forum.vivaldi.net/topic/59763/opml-export
-
@LonM said in Reading List Export:
-
@Fever You need to run this in the devtools for the UI, see ☛ https://forum.vivaldi.net/post/135732