mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
* `jrnl.__version__` magic works! Adjust version imports Update version on GitHub release flow Fix version imports & black issue * escape strings in workflow Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
20 lines
536 B
Python
20 lines
536 B
Python
#!/usr/bin/env python
|
|
# encoding: utf-8
|
|
# Copyright (C) 2012-2021 jrnl contributors
|
|
# License: https://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
from jrnl import __version__
|
|
from jrnl.plugins.base import BaseExporter
|
|
|
|
|
|
class Exporter(BaseExporter):
|
|
"""This Exporter can convert entries and journals into text files."""
|
|
|
|
names = ["text", "txt"]
|
|
extension = "txt"
|
|
version = __version__
|
|
|
|
@classmethod
|
|
def export_entry(cls, entry):
|
|
"""Returns a string representation of a single entry."""
|
|
return str(entry)
|