Aaron is back
This commit is contained in:
parent
a1085d714c
commit
3172622360
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -136,3 +136,4 @@ Pipfile.lock
|
||||||
|
|
||||||
migration/data
|
migration/data
|
||||||
migration/content/**/*.md
|
migration/content/**/*.md
|
||||||
|
.obsidian
|
|
@ -112,7 +112,7 @@ def migrate(entry):
|
||||||
else:
|
else:
|
||||||
body_html = str(BeautifulSoup(
|
body_html = str(BeautifulSoup(
|
||||||
body_orig, features="html.parser"))
|
body_orig, features="html.parser"))
|
||||||
r['body'] = body_html # html2text(body_html).replace('****', '**')
|
r['body'] = html2text(body_html).replace('****', '**')
|
||||||
r['old_id'] = entry.get('_id')
|
r['old_id'] = entry.get('_id')
|
||||||
else:
|
else:
|
||||||
print(r['slug'] + ': literature has no media')
|
print(r['slug'] + ': literature has no media')
|
||||||
|
@ -134,7 +134,7 @@ def migrate(entry):
|
||||||
if r.get('body') is None:
|
if r.get('body') is None:
|
||||||
body_orig = entry.get('body', '')
|
body_orig = entry.get('body', '')
|
||||||
body_html = str(BeautifulSoup(body_orig, features="html.parser"))
|
body_html = str(BeautifulSoup(body_orig, features="html.parser"))
|
||||||
r['body'] = body_html # html2text(body_html).replace('****', '**')
|
r['body'] = html2text(body_html).replace('****', '**')
|
||||||
r['old_id'] = entry.get('_id')
|
r['old_id'] = entry.get('_id')
|
||||||
body = r.get('body')
|
body = r.get('body')
|
||||||
user = None
|
user = None
|
||||||
|
@ -178,7 +178,7 @@ def migrate(entry):
|
||||||
r['authors'].append({
|
r['authors'].append({
|
||||||
'slug': slug,
|
'slug': slug,
|
||||||
'name': name,
|
'name': name,
|
||||||
'pic': userpic
|
'userpic': userpic
|
||||||
})
|
})
|
||||||
|
|
||||||
r['layout'] = type2layout[entry['type']]
|
r['layout'] = type2layout[entry['type']]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user