jrnl/jrnl/plugins/exporter/text.py
MinchinWeb 79c37401c4 jrnl.__version__ magic works! (#1296)
* `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>
2021-07-17 14:58:15 -07:00

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)