mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-08 09:06:12 +02:00
Exports
This commit is contained in:
parent
3580154f7d
commit
8b64cc95d9
8 changed files with 273 additions and 3 deletions
34
jrnl/templates/json.template
Normal file
34
jrnl/templates/json.template
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
extension: json
|
||||
---
|
||||
|
||||
{% block journal %}
|
||||
{
|
||||
"tags": {
|
||||
{% for tag in tags %}
|
||||
"{{ tag.name }}": {{ tag.count }}{% if not __last_iteration %},{% endif %}
|
||||
{% endfor %}
|
||||
},
|
||||
"entries": [
|
||||
{% for entry in entries %}
|
||||
{% include entry %}{% if not __last_iteration %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block entry %}
|
||||
{
|
||||
"title": "{{ entry.title }}",
|
||||
"body": "{{ entry.body }}",
|
||||
"date": "{{ entry.date.strftime('%Y-%m-%d') }}",
|
||||
"time": "{{ entry.date.strftime('%H:%M') }}",
|
||||
{% if entry.uuid %}
|
||||
"uuid": "{{ entry.uuid }}",
|
||||
{% endif %}
|
||||
"starred": {{ "true" if entry.starred else "false" }}
|
||||
}
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
Hey There
|
Loading…
Add table
Add a link
Reference in a new issue