-
-
Save why0918/5e3cbcb7cc5a95ad3a9cac8a51e34784 to your computer and use it in GitHub Desktop.
#!/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) |
No errors, but also no result for Reeder 5.
Reeder 5 seems to have switched from an sqlite database to RealmDB, the file is at this location:
~/Library/Containers/com.reederapp.5.macOS/Data/Library/Application Support/default.realm
You can backup or copy that file elsewhere and open it with Realm Studio
Under the class Item
, It's possible to query the starred items by writing "starred == 1" in the query field.
Unfortunately I'm stuck at that point, I can't seem to be able to export that data out of there, unless it's all the data in a json format.
I've also tried this realm-exporter node package but no luck installing it.
I might look into this a bit more next week.
Nevermind I found the solution with this app:
https://github.com/aromajoin/realm-to-csv
The database should be converted to a csv file for each class, you can import the output file Item.csv into a google sheet. From that workbook, create another sheet, you can then add simple filter functions to get only the starred
items for each columns you need, (column E here is the starred
column):
=FILTER(Item!K:K,Item!E:E=1)
// Title
=FILTER(Item!J:J,Item!E:E=1)
// Link
=FILTER(Item!O:O,Item!E:E=1)
// Content
and there you have it!
Thanks! I found this discussion and successfully exported my starred items in Reeder 5.
No errors, but also no result for Reeder 5.