mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-19 04:28:31 +02:00
Remove 'importer' or 'exporter' from filenames where not needed
This commit is contained in:
parent
788b32b71c
commit
aa6e0a7c84
11 changed files with 6 additions and 7 deletions
|
@ -49,7 +49,7 @@ entries to a Journal. Here is a basic Importer, assumed to be provided with a
|
||||||
nicely formated JSON file:
|
nicely formated JSON file:
|
||||||
|
|
||||||
~~~ python
|
~~~ python
|
||||||
# pelican\contrib\importer\json_importer.py
|
# pelican\contrib\importer\sample_json.py
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from jrnl import Entry
|
from jrnl import Entry
|
||||||
|
@ -133,7 +133,7 @@ included in jrnl and so this (if installed) would override the built in
|
||||||
exporter.
|
exporter.
|
||||||
|
|
||||||
~~~ python
|
~~~ python
|
||||||
# pelican\contrib\exporter\custom_json_exporter.py
|
# pelican\contrib\exporter\custom_json.py
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from jrnl.plugins.base import BaseExporter
|
from jrnl.plugins.base import BaseExporter
|
||||||
|
@ -187,7 +187,7 @@ Some implementation notes:
|
||||||
Python interpreter running jrnl.
|
Python interpreter running jrnl.
|
||||||
- the exporter should expose at least the following the following members
|
- the exporter should expose at least the following the following members
|
||||||
(there are a few more you will need to define if you don't subclass
|
(there are a few more you will need to define if you don't subclass
|
||||||
`jrnl.plugins.exporter.text_exporter`):
|
`jrnl.plugins.base.BaseExporter`):
|
||||||
- **version** (string): the version of the plugin. Displayed to help the
|
- **version** (string): the version of the plugin. Displayed to help the
|
||||||
user debug their installations.
|
user debug their installations.
|
||||||
- **names** (list of strings): these are the "names" that can be passed to
|
- **names** (list of strings): these are the "names" that can be passed to
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
# Copyright (C) 2012-2021 jrnl contributors
|
# Copyright (C) 2012-2021 jrnl contributors
|
||||||
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
from jrnl.plugins.exporter.text_exporter import Exporter as TextExporter
|
|
||||||
|
from jrnl.plugins.base import BaseExporter
|
||||||
from jrnl.plugins.util import get_tags_count
|
from jrnl.plugins.util import get_tags_count
|
||||||
|
|
||||||
from ... import __version__
|
from ... import __version__
|
||||||
|
|
||||||
|
|
||||||
class Exporter(TextExporter):
|
class Exporter(BaseExporter):
|
||||||
"""This Exporter can lists the tags for entries and journals, exported as a plain text file."""
|
"""This Exporter can lists the tags for entries and journals, exported as a plain text file."""
|
||||||
|
|
||||||
names = ["tags"]
|
names = ["tags"]
|
|
@ -5,14 +5,12 @@
|
||||||
|
|
||||||
from xml.dom import minidom
|
from xml.dom import minidom
|
||||||
|
|
||||||
# from jrnl.plugins.exporter.json_exporter import Exporter as JSONExporter
|
|
||||||
from jrnl.plugins.base import BaseExporter
|
from jrnl.plugins.base import BaseExporter
|
||||||
from jrnl.plugins.util import get_tags_count
|
from jrnl.plugins.util import get_tags_count
|
||||||
|
|
||||||
from ... import __version__
|
from ... import __version__
|
||||||
|
|
||||||
|
|
||||||
# class Exporter(JSONExporter):
|
|
||||||
class Exporter(BaseExporter):
|
class Exporter(BaseExporter):
|
||||||
"""This Exporter can convert entries and journals into XML."""
|
"""This Exporter can convert entries and journals into XML."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue