Created
May 31, 2025 09:58
-
-
Save v-p-b/05a251efa5011b8096b850b303c5412e to your computer and use it in GitHub Desktop.
Raindrop to Readeck converter
This file contains hidden or 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
import csv | |
import json | |
import sys | |
with open(sys.argv[1], "r") as csvfile: | |
reader=csv.DictReader(csvfile) | |
with open("readeck.csv","w") as outfile: # You may want to make the output file name dynamic | |
writer = csv.DictWriter(outfile, fieldnames=["url","title","created","state","labels"]) | |
writer.writeheader() | |
for l in reader: | |
item = {} | |
item["url"]=l["url"] | |
item["title"]=l["title"] | |
item["created"]=l["created"] | |
item["state"]="archive" | |
item["labels"]=json.dumps(list(l["tags"].split(","))) # labels have glitches, still experimenting... | |
writer.writerow(item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment