mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-18 03:58:32 +02:00
Merge 4f72619830
into d0f86d398f
This commit is contained in:
commit
03372abde0
2 changed files with 0 additions and 15 deletions
|
@ -146,4 +146,3 @@ class DayOne(Journal.Journal):
|
||||||
edited_uuids = [e.uuid for e in entries]
|
edited_uuids = [e.uuid for e in entries]
|
||||||
self._deleted_entries = [e for e in self.entries if e.uuid not in edited_uuids]
|
self._deleted_entries = [e for e in self.entries if e.uuid not in edited_uuids]
|
||||||
self.entries[:] = [e for e in self.entries if e.uuid in edited_uuids]
|
self.entries[:] = [e for e in self.entries if e.uuid in edited_uuids]
|
||||||
return entries
|
|
||||||
|
|
|
@ -179,20 +179,6 @@ class Journal(object):
|
||||||
and (not start_date or entry.date >= start_date)
|
and (not start_date or entry.date >= start_date)
|
||||||
and (not end_date or entry.date <= end_date)
|
and (not end_date or entry.date <= end_date)
|
||||||
]
|
]
|
||||||
if short:
|
|
||||||
if tags:
|
|
||||||
for e in self.entries:
|
|
||||||
res = []
|
|
||||||
for tag in tags:
|
|
||||||
matches = [m for m in re.finditer(tag, e.body)]
|
|
||||||
for m in matches:
|
|
||||||
date = e.date.strftime(self.config['timeformat'])
|
|
||||||
excerpt = e.body[m.start():min(len(e.body), m.end() + 60)]
|
|
||||||
res.append('{0} {1} ..'.format(date, excerpt))
|
|
||||||
e.body = "\n".join(res)
|
|
||||||
else:
|
|
||||||
for e in self.entries:
|
|
||||||
e.body = ''
|
|
||||||
self.entries = result
|
self.entries = result
|
||||||
|
|
||||||
def new_entry(self, raw, date=None, sort=True):
|
def new_entry(self, raw, date=None, sort=True):
|
||||||
|
|
Loading…
Add table
Reference in a new issue