feedwarrior

Slim, portable tooling for creating and distributing decentralized append logs
git clone git://git.defalsify.org/logwarrior.git
Log | Files | Refs | README | LICENSE

commit 2409e608f3d7d53196dcf12d1b9fd1b520b9fe28
parent 2ac3398bdb90be3ffb34eb0f944ce16f7aa87678
Author: nolash <dev@holbrook.no>
Date:   Fri,  3 Jul 2020 23:08:56 +0200

WIP just discovered couchdb takes json for data in (fuckers)

Diffstat:
ATODO | 1+
Mfeedwarrior/adapters/fileadapter.py | 8++++----
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/TODO b/TODO @@ -0,0 +1 @@ +- entries returned out of order diff --git a/feedwarrior/adapters/fileadapter.py b/feedwarrior/adapters/fileadapter.py @@ -32,7 +32,7 @@ class fileadapter: self.feeds_uuid = uu - def get(self, uu): + def get(self, uu, **kwargs): entry_path = os.path.join(self.src, 'entries', str(uu)) f = None if entry_path[len(entry_path)-3:] == '.gz': @@ -45,12 +45,12 @@ class fileadapter: return c - def put(self, uu, contents_bytes, compress=False): + def put(self, uu, contents_bytes, **kwargs): entry_path = os.path.join(self.src, 'entries', str(uu)) if os.path.exists(entry_path) or os.path.exists(entry_path + '.gz'): raise FileExistsError('record {} already exists'.format(str(uu))) f = None - if compress: + if kwargs['compress']: entry_path += '.gz' f = gzip.open(entry_path, 'xb') else: @@ -60,6 +60,6 @@ class fileadapter: f.close() feeds_entry_path = os.path.join(self.src, str(self.feeds_uuid), 'entries', str(uu)) - if compress: + if kwargs['compress']: feeds_entry_path += '.gz' os.symlink(entry_path, feeds_entry_path)