Incorporate feedback
This commit is contained in:
parent
f5af1ea569
commit
58420a7ed8
@ -304,7 +304,8 @@ class JoplinExporter:
|
||||
with (self.content_dir / "SUMMARY.md").open("w") as outfile:
|
||||
outfile.write("# Summary\n\n")
|
||||
# Special-case the introduction.
|
||||
outfile.write(introduction.get_summary_line(0) + "\n")
|
||||
if introduction:
|
||||
outfile.write(introduction.get_summary_line(0) + "\n")
|
||||
outfile.write("\n".join(items))
|
||||
|
||||
def export(self):
|
||||
@ -318,12 +319,12 @@ class JoplinExporter:
|
||||
for folder in folder_list:
|
||||
contents = []
|
||||
dir = self.content_dir / folder.get_url()
|
||||
dir.mkdir(parents=True)
|
||||
dir.mkdir(parents=True, exist_ok=True)
|
||||
for note in sorted(self.notes[folder.id], key=lambda n: n.title):
|
||||
print(f"Exporting {folder.title} - {note.title}...")
|
||||
contents.append((note.title, f"{note.get_url()}.html"))
|
||||
with (self.content_dir / (note.get_url() + ".md")).open(
|
||||
mode="w"
|
||||
mode="w", encoding="utf-8"
|
||||
) as outfile:
|
||||
outfile.write(
|
||||
f"""# {note.title}
|
||||
|
Loading…
Reference in New Issue
Block a user