moved images/graphics resources to subfolder of markdown files location
This commit is contained in:
parent
9ffccfbeb7
commit
b5224937d2
BIN
ce1808db00914c9f9d60b0b18b9906da.png
Normal file
BIN
ce1808db00914c9f9d60b0b18b9906da.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 128 KiB |
@ -136,7 +136,7 @@ class JoplinExporter:
|
||||
"""The main exporter class."""
|
||||
|
||||
content_dir = Path("content")
|
||||
static_dir = Path("static/resources")
|
||||
static_dir = Path("content/resources")
|
||||
joplin_dir = Path.home() / ".config/joplin-desktop"
|
||||
|
||||
def __init__(self):
|
||||
@ -192,13 +192,13 @@ class JoplinExporter:
|
||||
# Add the resource to the set of used resources, so we can only copy
|
||||
# the resources that are used.
|
||||
self.used_resources.add(resource_id)
|
||||
return "resources/" + resource_id + resource.derived_ext
|
||||
return "content/resources/" + resource_id + resource.derived_ext
|
||||
|
||||
def copy_resources(self):
|
||||
"""Copy all the used resources to the output directory."""
|
||||
for resource_id in self.used_resources:
|
||||
resource = self.resources[resource_id]
|
||||
print(f"{resource_id}.{resource.extension}")
|
||||
print(f"Exporting Resource: {resource_id}.{resource.extension}")
|
||||
copy(
|
||||
self.joplin_dir / "resources" / (f"{resource_id}.{resource.extension}"),
|
||||
self.static_dir / f"{resource_id}{resource.derived_ext}",
|
||||
@ -358,7 +358,7 @@ class JoplinExporter:
|
||||
|
||||
<p style="font-size:80%; font-style: italic">
|
||||
Last updated on {note.updated_time:%B %d, %Y}. For any questions/feedback,
|
||||
email me at <a href="mailto:hi@stavros.io">hi@stavros.io</a>.
|
||||
email me at <a href="mailto:blog@zinchuk.xyz">blog@zinchuk.xyz</a>.
|
||||
</p>
|
||||
"""
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user