loop through all folders and find notes that have a -blog- tag
This commit is contained in:
parent
b5224937d2
commit
aa224afbdb
@ -1,3 +1,7 @@
|
|||||||
|
# Joplin to mdbook Website Generator
|
||||||
|
Export your joplin notes into a [mdbook](https://rust-lang.github.io/mdBook/index.html) compatible format for easy website creation.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -9,6 +13,10 @@
|
|||||||
- Instead of checking if a notebook/note is tagged with "private", instead checks if the notebook/note is tagged with "blog"
|
- Instead of checking if a notebook/note is tagged with "private", instead checks if the notebook/note is tagged with "blog"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Stavros' notes
|
Stavros' notes
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
@ -8,6 +8,6 @@ title = "Yuriy's Notes"
|
|||||||
[output.html]
|
[output.html]
|
||||||
curly-quotes = true
|
curly-quotes = true
|
||||||
no-section-label = true
|
no-section-label = true
|
||||||
git-repository-url = "https://zinchuk.xyz"
|
git-repository-url = "https://git.zinchuk.xyz/yuriy/joplin-mdbooks-website"
|
||||||
git-repository-icon = "fa-gitlab"
|
git-repository-icon = "fa-gitlab"
|
||||||
additional-css = ["static/custom.css"]
|
additional-css = ["static/custom.css"]
|
||||||
|
@ -192,7 +192,7 @@ class JoplinExporter:
|
|||||||
# Add the resource to the set of used resources, so we can only copy
|
# Add the resource to the set of used resources, so we can only copy
|
||||||
# the resources that are used.
|
# the resources that are used.
|
||||||
self.used_resources.add(resource_id)
|
self.used_resources.add(resource_id)
|
||||||
return "content/resources/" + resource_id + resource.derived_ext
|
return "resources/" + resource_id + resource.derived_ext
|
||||||
|
|
||||||
def copy_resources(self):
|
def copy_resources(self):
|
||||||
"""Copy all the used resources to the output directory."""
|
"""Copy all the used resources to the output directory."""
|
||||||
@ -218,7 +218,9 @@ class JoplinExporter:
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.folders = {
|
self.folders = {
|
||||||
id: folder for id, folder in self.folders.items() if folder.is_for_blog()
|
# id: folder for id, folder in self.folders.items() if folder.is_for_blog()
|
||||||
|
# For the moment, instead of checking if Folder is for blog, check all folders
|
||||||
|
id: folder for id, folder in self.folders.items() if True
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get the tags by ID.
|
# Get the tags by ID.
|
||||||
@ -255,7 +257,7 @@ class JoplinExporter:
|
|||||||
datetime.fromtimestamp(updated_time / 1000),
|
datetime.fromtimestamp(updated_time / 1000),
|
||||||
tags=note_tags[id],
|
tags=note_tags[id],
|
||||||
)
|
)
|
||||||
if note.is_for_blog():
|
if not note.is_for_blog():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.notes[note.folder.id].append(note)
|
self.notes[note.folder.id].append(note)
|
||||||
|
Loading…
Reference in New Issue
Block a user