Commit graph

1647 commits

Author SHA1 Message Date
Micah Jerome Ellison
0e70a57a67 Add tests for counting combinations of action arguments (change-time, edit, delete) and for change-time counts. Some are failing and should be investigated 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
94d78f3e2d Test combinations of found/deleted messages when using --delete 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
4ad9f58213 Add tests for found count with -n equivalent argument 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
14fd024ed1 Add found/modified counts to edit tests 2023-03-04 13:58:20 -08:00
Jrnl Bot
c8d79d075d Update changelog [ci skip] 2023-03-04 13:58:20 -08:00
Briscoooe
a708c15eb7 Don't save templated journal entries if the received raw text is the same as the template itself (#1653) 2023-03-04 13:58:20 -08:00
David Isaksson
3ec0839748 Add documentation about information leaks in Vim/Neovim (#1674)
* Add documentation about using Vim/Neovim as editor
* Add documentation about information leaks in editors
* Spelling fix

---------

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2023-03-04 13:58:20 -08:00
Jrnl Bot
99c29f2051 Update changelog [ci skip] 2023-03-04 13:58:20 -08:00
Giuseppe D'Andrea
905a9ec37e Update documentation on temporary files naming (#1673) 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
2be80a5fa0 Fix other unit test that did not account for short-circuit 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
8ee1632760 Fix unit test that did not account for new short-circuit when displaying journal with no entries 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
46b7a64549 Reconcile tests with new error message when clearing editor in edit mode 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
cac3b43e19 Preserve existing behavior when editor is empty but make the message more clear 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
742a16b548 Track modification of entries with --change-time 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
80a4b0778f Correct entry edit modified count test 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
1873f69ded Remove unneeded exception when editor is empty and fix test that was testing incorrect message 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
2e06e3d4eb Track journal entry deletion consistently 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
0c439200f4 Track found entry count and remove incorrect modified stat logic 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
d341f3240c Don't show summary if no entries found and prevent extra line break when no entries found by short-circuiting display method 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
752e55d363 Add currently-failing test conditions for count messages when changing time and deleting 2023-03-04 13:58:20 -08:00
Jonathan Wren
c182395fce Clean up controller
- streamline `run` function in `controller.py`
- add debug logging
- fix unnecessary import of Journal class (only needed for typing)
- standardize summary display across different actions
2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
bade98ef0d Fix user input mock - was not appropriately checking return value 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
6e24769294 Fix failing change-time test by using same method signature as base journal class 2023-03-04 13:58:20 -08:00
Micah Jerome Ellison
dc6900e9fe Remove ipdb and remove search mode conditional that added explicit tag search behavior 2023-03-04 13:58:20 -08:00
Jonathan Wren
6eb7d857f0
WIP 2023-01-14 16:30:12 -08:00
Jrnl Bot
17c987c605 Update changelog [ci skip] 2023-01-14 22:44:27 +00:00
Jonathan Wren
fff05eb646
Refactor flow for easier access to some files (avoid things like jrnl.Journal.Journal and jrnl.jrnl co-existing) (#1662)
* run format

* rename cli.py to main.py

* rename jrnl.py to controller.py

* move journal class files into journals dir

* rename start -> run in controller.py
2023-01-14 14:42:29 -08:00
Jrnl Bot
7be67accc1 Update changelog [ci skip] 2023-01-14 21:24:31 +00:00
outa
a13726d4c5
Add more type hints (#1642) 2023-01-14 13:22:31 -08:00
Peter Conrad
9547411390
Update docs to include time and title in arguments with --edit (#1657) 2023-01-07 14:04:33 -08:00
Jrnl Bot
120c54a29e Update changelog [ci skip] 2023-01-07 22:01:41 +00:00
renovate[bot]
a6f2d34b7e
Update dependency rich to v13 (#1654)
* Update dependency rich to v13

* Update pyproject.toml

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2023-01-07 13:59:40 -08:00
Jonathan Ballet
458faff8a8
Fix markup in "Advanced Usage" doc (#1655)
* Fix YAML indentiation in a configuration example
* Improve Markdown markup
2023-01-07 13:58:49 -08:00
Jrnl Bot
2cec8bdc5b Update changelog [ci skip] 2023-01-07 21:41:17 +00:00
Jonathan Wren
8da6029624
Update copyright notices for 2023 (#1660)
* update copyright notice for 2023

* standardize whitespace after copyright notice
2023-01-07 13:39:07 -08:00
Micah Jerome Ellison
9274ab16ed
Add basic template test (#1659)
* Add very basic test template
* Ensure that templates are copied to temporary test workspace
* Add basic template test
* Update copyright for this new file
2023-01-07 13:37:43 -08:00
Jrnl Bot
d5d39971b4 Update changelog [ci skip] 2023-01-07 20:53:14 +00:00
Jonathan van der Steege
907566b39f
Add tag to XML file when edited DayOne entry and is searchable afterward (#1648)
* Add tag to XML file when edited DayOne entry
* Remove forbidden change
* undo edits
* Tags working for DayOne journal
* Correction doentries to prevent time-error
* Add sorting to tags
* Delete test statements
* Revert time changes
2023-01-07 12:51:07 -08:00
Jrnl Bot
7229d77bda Update changelog [ci skip] 2023-01-07 19:48:26 +00:00
Jonathan van der Steege
d94325127f
Update version key in config file after version changes (#1646) 2023-01-07 11:46:12 -08:00
Jrnl Bot
fe08cfd3ab Update changelog [ci skip] 2022-11-19 21:41:41 +00:00
Jonathan Wren
fcc8d8e3fa
Rework Encryption to enable future support of other encryption methods (#1602)
- initial pass through to rework encryption into separate module
- little more cleanup
- rename function, fix some linting issues
- more cleaning
- fix password bug in encryption
- fix linting issue
- more cleanup
- move prompt into prompt.py
- more cleanup
- update the upgrade process for new encryption classes
- general cleanup
- turn into enum instead of strings
- store status code so tests don't fail
- standardize the load and store methods in journals
- get rid of old PlainJournal class
- typing cleanup
- more cleanup
- format
- fix linting issue
- Fix obscure Windows line ending issue with decode
  See https://bugs.python.org/issue40863
- fix for python 3.11
- add more typing
- don't use class variables because that's not what we want
- fix more type hints
- jrnlv1 encryption doesn't support encryption anymore (it's deprecated)
- keep logic for password attemps inside the class that uses it
- take out old line of code
- add some more logging
- update logging statements
- clean up logging statements
- run linters
- fix typo
- Fix for new test from develop branch
  There was a new test added for re-encrypting a journal. This updates the
  refactor to match the old (previously untested) behavior of jrnl.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2022-11-19 13:39:39 -08:00
Jrnl Bot
e6e08e5d3e Update changelog [ci skip] 2022-11-05 23:07:28 +00:00
Micah Jerome Ellison
92a8ec4f68
Remove Windows 7 known issue since jrnl no longer supports (#1636) 2022-11-05 16:05:36 -07:00
Jrnl Bot
b7a3110e7e Update changelog [ci skip] 2022-11-05 22:58:54 +00:00
Jonathan Wren
b508ed6c9a
Add simplify plugin to linting checks (#1630)
* add simplify plugin for flakeheaven

* update lock file

* fix linting issues in current codebase
2022-11-05 15:56:46 -07:00
Jrnl Bot
1e69495728 Update changelog [ci skip] 2022-11-05 22:31:41 +00:00
outa
30b41fdb88
Add type hints (#1614)
* Add type hints

* Fix linters

* Add remaining type hints

* Fix type-checking linter

* Update jrnl/DayOneJournal.py

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2022-11-05 15:29:50 -07:00
Jonathan Wren
c1eb0c54a3
Add type-checking plugin to linting checks (#1629)
* add type-checking plugin for flakeheaven

* update lock file

* fix type-checking issues in current codebase

* run linters
2022-11-03 07:18:35 -07:00
Jrnl Bot
cb7e0ed289 Update changelog [ci skip] 2022-11-03 02:55:34 +00:00