-
-
Save why0918/5e3cbcb7cc5a95ad3a9cac8a51e34784 to your computer and use it in GitHub Desktop.
Export Reeder starred iterms to csv
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
#!/usr/bin/env python | |
import getpass | |
import sqlite3 | |
import csv | |
RKIT_PATH = "/Users/" + getpass.getuser() + "/Library/Containers/com.reederapp.rkit2.mac/Data/Library/Application Support/Reeder/rkit/" | |
conn = sqlite3.connect(RKIT_PATH + "rkit.db") | |
DATA_DB_PATH = RKIT_PATH + "rkit-data.db" | |
cursor = conn.cursor() | |
cursor.execute("ATTACH DATABASE '%s' AS data" % DATA_DB_PATH) | |
cursor.execute(''' | |
SELECT data.rkitemdata.title, data.rkitemdata.link, data.rkitemdata.content FROM data.rkitemdata | |
INNER JOIN rkitem | |
WHERE data.rkitemdata.id == rkitem.id and rkitem.starred == 1 | |
''') | |
data = cursor.fetchall() | |
with open("starred_items.csv", "w") as f: | |
writer = csv.writer(f) | |
for row in data: | |
writer.writerow(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! I found this discussion and successfully exported my starred items in Reeder 5.