Skip to content

Commit

Permalink
fix #6 , Latest read feature, cleanup
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
madhaven committed Sep 26, 2022
1 parent fb00905 commit 8da1117
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 103 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
__pycache__/*
*.pyc
diary_config
diary
diary
testdiary
*diaryback*
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ After having added the .py extension and the program directory to path, the Diar
>```
>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.
>```
>diary backup [filename]
>```
>creates a backup copy of the diary file.
The `DiaryController` class is responsible for handling user interaction to access the `Diary`.
The `Diary` class contains a list of `Entry` instances that contain a record of the user's input.
The `FileManager` class deals with read and write operations of files.
`DiaryController` is passed an instance of the `Diary`.
Loading

0 comments on commit 8da1117

Please sign in to comment.