Skip to content

Commit 8da1117

Browse files
author
madhaven
committed
fix #6 , Latest read feature, cleanup
* Added FileManagers, now different file versions can be read with the same method call. #6 * Seperated concerns: architecture consists of DiaryController, Diary, Entry and FileManager classes. * Set up `diary read latest` feature * Set up tests * added ignore files
1 parent fb00905 commit 8da1117

File tree

5 files changed

+237
-103
lines changed

5 files changed

+237
-103
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
__pycache__/*
22
*.pyc
33
diary_config
4-
diary
4+
diary
5+
testdiary
6+
*diaryback*

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ After having added the .py extension and the program directory to path, the Diar
3333
>```
3434
>helps you search for strings in your file. The ```searchall / findall``` also works in a similar fashion except that it fetches those entries that simultaneously have all the search strings in it.
3535
36+
>```
37+
>diary backup [filename]
38+
>```
39+
>creates a backup copy of the diary file.
40+
3641
The `DiaryController` class is responsible for handling user interaction to access the `Diary`.
3742
The `Diary` class contains a list of `Entry` instances that contain a record of the user's input.
43+
The `FileManager` class deals with read and write operations of files.
44+
`DiaryController` is passed an instance of the `Diary`.
3845

0 commit comments

Comments
 (0)