mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
parent
b2542db5e5
commit
849dc89557
2 changed files with 6 additions and 2 deletions
|
@ -36,6 +36,10 @@ class Journal(object):
|
|||
"""Returns the number of entries"""
|
||||
return len(self.entries)
|
||||
|
||||
def __iter__(self):
|
||||
"""Iterates over the journal's entries."""
|
||||
return (entry for entry in self.entries)
|
||||
|
||||
@classmethod
|
||||
def from_journal(cls, other):
|
||||
"""Creates a new journal by copying configuration and entries from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue