Created
April 8, 2021 19:04
-
-
Save eighteyes/882bc423e1eb9490210547d9cf98f086 to your computer and use it in GitHub Desktop.
TiddlyWiki CSV Export to txt/md in Python/Pandas
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
import pandas as pd | |
df = pd.read_csv('./tiddlers.csv') | |
for i, t in df.iterrows(): | |
first = t.title[0] | |
# no tw junk | |
if ( first == '.' or first == '/'): | |
continue | |
# md | |
name = './out/'+t.title.replace('/','-') +'.md' | |
txt = t.text | |
try: | |
f = open(name, 'w') | |
f.write(txt); | |
f.close(); | |
except: | |
print(name,txt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment