Commit graph

112 commits

Author SHA1 Message Date
Micah Jerome Ellison
c155bafa84
Notify user when config directory can't be created because there is already a file with the same name (#1134)
* Moving configuration values and methods from install.py to config.py -- everything is broken right now
* Using context to store config path - still lots broken
* Use mocks and context.config_path to store test configs - many tests still broken though
* Update changelog [ci skip]
* Fix jrnl --ls crash
* Fix crash when no editor configured
* Attempt to patch config path with test data - doesn't appear to be working
* Properly use patched config path and add config given to scenario that wasn't using it
* Fix copypasta
* Fix editor test that needed patched config and trapping for system exit
* Add exception and handling for when configuration directory is actually a file
* Remove extraneous comment
* Use more generic JrnlError with messaging switchboard
* Format code a bit nicer
* Remove unnecessary given in diagnostic test
* Ensure full error message is output
* Remove unnecessary whitespace characters
2021-01-02 15:19:44 -08:00
Micah Jerome Ellison
48cde1b473
Check for readline module instead of Windows when initializing autocomplete in install (#1104) 2020-12-04 15:13:38 -08:00
Micah Jerome Ellison
c38c39efee
Update dependencies - pyxdg, pytest, black (#1076)
* Update version pin on pyxdg and run poetry update
* Update pytest pin and rerun poetry update
* Update black pin to latest version, poetry update, and make format
2020-11-14 12:42:34 -08:00
Jonathan Wren
631e08a557
Clean up help screen, get rid of util.py (#1027)
* More refactoring of cli.py

break up code from cli.py (now in jrnl.py) up into smaller functions
get rid of export mode
move --encrypt and --decrypt to commands.py
clean up the help screen even more
update flag name for import

* reorganize code, move around lots of functions

* clean up import statements

* move run function out of cli and into jrnl

* rename confusingly named function

* move editor function into editor file

* rename parse_args.py to args.py to make room for more args functions

* Fix error in test suite for windows

I accidentally flipped the conditional, so this fixes it.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>

* Update app description on help screen

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2020-08-22 11:40:39 -07:00
Jonathan Wren
a54ed90259 Move import to be standalone command to reduce clutter in cli.py 2020-08-01 15:54:13 -07:00
Jonathan Wren
626a18a6ec Update more arg parsing options and handling 2020-08-01 15:54:13 -07:00
Jonathan Wren
fb184c5f5e Move standalone commands into their own file
Also, cleaned up the way the arg parser handles standalone commands.
Rather than checking individually for each command, you can now register
the command in the proper place, and it will be run with all known
arguments (and cofig if available).
2020-08-01 15:54:13 -07:00
Jonathan Wren
5922ca41ee Update arg parsing to better handle optinal journal name
Fixes #520 -and parameter seems to only work for the default journal
2020-08-01 15:54:13 -07:00
Jonathan Wren
2b2f24449f update tests 2020-08-01 15:54:13 -07:00
Micah Jerome Ellison
8d702fee9d Add unit testing via pytest (#987)
* Add pytest to project

Includes a couple sample tests, a note in CONTRIBUTING, and inclusion in the makefile

* Include pytest in Travis build
2020-06-20 14:30:15 -07:00
Manuel Ebert
13f8e668dc Mock stdin 2013-07-19 12:44:39 +02:00
Manuel Ebert
dfa8278cb5 Experimental new directory structure 2012-05-24 13:23:46 +02:00