Commit graph

71 commits

Author SHA1 Message Date
Jonathan Wren
4b58577f1d
Disable --delete due to critical bug (#934) 2020-05-02 13:17:06 -07:00
Jonathan Wren
fae7585e54
Upgrade license to GPLv3 (#918)
The MIT license is a bit outdated, and doesn't provide the protections
we'd like in a modern open-source application.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2020-04-18 13:31:25 -07:00
Jonathan Wren
3dc5999079 fix various small issues in the codebase 2020-04-18 12:35:46 -07:00
Jonathan Wren
0e1f415c97 Fix failing tests and linting issues 2020-04-10 16:18:34 -07:00
Aaron Lichtman
f4fca3e5a4 Add --delete for interactive removal of entries (#698)
* Add --delete for interactive removal of entries
* Add inquirer dependency for fancy prompting
* Fix some minor style issues
* Fix #434 
* Use PyInquirer instead of inquirer for Windows compatibility
* Add WIP (broken) test
* Change deletion interface to be more basic
* Update environment.py

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2020-04-10 16:18:34 -07:00
Manuel Ebert
a3afa112ab Clean up shortcut for Limit
This piece of code has bothered me for more than 6 years! (See #131) - this moves parsing arguments to where it belongs.
2020-04-10 11:51:56 -07:00
Jonathan Wren
46c4c88231 (#770) run black formatter on codebase for standardization 2020-04-10 11:51:56 -07:00
Peter Schmidbauer
9664924096 Move all password handling to EncryptedJournal
This commit should greatly simplify all password handling logic. No passwords are stored in the config dict anymore. Only the Encrypted Journals have any password related logic. I also had to remove some password fields from the test files, which shows how dangerous the previous approach was. A slight code change could've leaked passwords to the config file. However, I had to change the install progress a little bit to make this work. It will now not ask you for a password right away but rather if you want to encrypt or not. Only if you reply 'y' will it ask you for the password later on.
2020-04-10 11:51:56 -07:00
Jims
b8d43db558 Added case-insensitive searching of entry title and body
added search test
Renamed searching to contains. Made changes as per pull-request:
https://github.com/jrnl-org/jrnl/pull/740
2020-04-10 11:51:56 -07:00
Peter Schmidbauer
8eb185f8a2 Add password confirmation dialog 2020-04-10 11:51:55 -07:00
Aaron Lichtman
1fd1fcc00d Exit jrnl if no text entered into editor
Add test for aborting jrnl entry from editor
Use native mocking
Add comment explaining discrepancy between expected and asserted output
Fix check_empty_output method
Check message on stderr and patch subprocess.call
Add _mock_editor_function
Update features/steps/core.py
Add return from mock function
Add debug statements
Debug
Update features/steps/core.py
Move sys.exit() down
Fix test?
Fix test?
Fix test?
Clean up debug statements
Clean up debug statements
Remove extraneous code
Remove extra space
Add test for empty stdin input
Remove extra debug line
Fix test?
Fix test?
Update features/core.feature
Fix test?
Fix no stdin input test

Co-Authored-By: pspeter <peter.schmidb@gmail.com>
2020-04-10 11:51:55 -07:00
Peter Schmidbauer
9d8d6a83ae remove py2 remnants and use mocks in tests
fstring wip
Run pyupgrade
fix broken pyupgrade fstring
run pyupgrade on plugin dir
fixup! remove py2 remnants and use mocks in tests
small print bugfix
The file=sys.stderr was part of the format(), so an error got printed to
stdout
Drop use of codecs package
Use builtins.open() instead
fixup! remove py2 remnants and use mocks in tests
2020-04-10 11:51:55 -07:00
Justin Proffitt
c249c8ded9 Add '-not' flag for excluding tags from filter
Add tests for the excluding tags with -not
2020-04-10 11:51:55 -07:00
Dawid Zych
bd806efb98 Handle KeyboardInterrupt when installing journal 2020-04-10 11:51:55 -07:00
Radomír Bosák
8fe8e00e1b Catch keyboard interrupt when opening journal (#476)
If the journal is encrypted, jrnl asks for a password using the
getpass.getpass function. If user presses the keyboard interrupt (e.g.
ctrl+c) during the password prompt, jrnl crashes and prints a stack
trace. This however is not very user friendly.

This commit adds a check for KeyboardInterrupt Exception and prints a
message whenever this exception occurs and exits. Stack is no longer
printed.

Fixes #450
2017-03-10 08:54:02 -08:00
Manuel Ebert
60a955de20 Template exporting FTW 2016-08-19 23:20:31 +00:00
Manuel Ebert
bdc9dc598d Fix Keyring tests 2016-08-19 21:43:27 +00:00
Manuel Ebert
85934c1980 Exports 2016-07-17 13:35:35 -07:00
Manuel Ebert
7c6b2e4bce Support for templates 2015-07-01 22:23:13 -07:00
MinchinWeb
1a220243bc Colorize error and warning messages 2015-05-05 15:12:02 -06:00
MinchinWeb
cf7b5d95eb [CLI] colour code 'no editor' error message 2015-05-03 21:59:20 -06:00
Manuel Ebert
ca76077e09 Merge branch 'pr/326' into 2.0-rc1 2015-04-20 14:59:47 +02:00
Gregory Crosswhite
60194c7043 Now the list of import types in --help is generated from the plugins. 2015-04-20 14:57:33 +02:00
Manuel Ebert
0d1b381bd1 Merge pull request #347 from MinchinWeb/2.0-rc1-markdown-export-fix
2.0 rc1 markdown export fix
2015-04-20 14:29:17 +02:00
Manuel Ebert
c4b16b7577 Warn user if attempting to write to default journal but not configured
Fixes #343
2015-04-20 14:25:44 +02:00
MinchinWeb
95d920b0bf Unable to run cli.py as a standalone script due to relative imports 2015-04-14 11:07:56 -06:00
flight16
ebee196444 Add single letter alias -s for option --short
--short was being used in a test for date logic, but I added a second
test for explicitness.
2015-04-13 09:08:43 +09:00
Manuel Ebert
76c9006ed3 Python 3 fixes :) 2015-04-05 06:05:46 +04:00
Manuel Ebert
54f8382450 Fix creating non-existent journals 2015-04-05 03:25:17 +04:00
Manuel Ebert
b8ef404453 Cleanup and more logging 2015-04-05 02:28:04 +04:00
Manuel Ebert
a5f08e6081 Introduce legacy classes 2015-04-05 07:25:22 +10:00
Manuel Ebert
df82ad1f4d Properly initialise journal files after creating them 2015-04-04 18:58:33 +11:00
Manuel Ebert
c0ec95679b Make backup of config when upgrading
Fixes #307
2015-04-04 18:36:34 +11:00
Manuel Ebert
2615070df0 Hardcoded salt to fix crypto 2015-04-04 17:50:44 +11:00
Pablo Carranza
640d426b71 Added basic logging feature to understand how is configuration loaded
Conflicts:

	jrnl/cli.py
	jrnl/util.py
2014-11-09 15:55:52 -05:00
Manuel Ebert
163dc04481 Merge pull request #300 from gcgoogle/add-import-plugin-support
Added support for importing entries for 2.0rc1.
2014-10-30 15:03:47 +01:00
Gregory Crosswhite
6258465f5d Added support for importing entries. 2014-10-24 15:21:10 -07:00
Gregory Crosswhite
a1dcb3ed87 Now the list of export types in --help is generated from the plugins. 2014-10-24 14:56:24 -07:00
Manuel Ebert
6fed042b8b Plugin architecture 2014-09-27 15:07:22 -07:00
Manuel Ebert
a1b5a4099e Work on cryptography 2014-09-27 13:15:46 -07:00
Manuel Ebert
51a6ac2d51 Upgrade scaffolding 2014-09-12 14:28:03 -07:00
Manuel Ebert
4563651b71 Deprecate config.password 2014-09-12 14:28:03 -07:00
Matthias Vogelgesang
ae47c5bb80 Fix failing behave tests 2014-09-12 14:27:34 -07:00
Matthias Vogelgesang
9d589f3e64 Make Journal a general interface
This change moves the loading and saving mechanisms into its own
Plain- and EncryptedJournal subclasses for easier maintenance and lazy loading
of all the crypto modules.
2014-09-12 14:26:22 -07:00
Matthias Vogelgesang
afae3d16a7 Use PyXDG to save config and journal in XDG dirs
This change also hides the CONFIG_PATH state information entirely within
the install module. Therefore, the cli module does not have to care about
checking existence of files and paths.
2014-09-12 14:20:05 -07:00
Matthias Vogelgesang
fca3d131bd Require config arguments 2014-09-12 14:18:52 -07:00
Manuel Ebert
4301927b72 Use unicode literals
Fixes #273
2014-09-02 13:26:50 -07:00
Manuel Ebert
2e75713a91 Sort journal entries after editing
Fixes #269
2014-08-12 10:10:15 +02:00
Manuel Ebert
6a16edb67b Introduces -on option
Fixes #246
2014-07-21 13:30:25 +09:00
Manuel Ebert
fadbdc27b9 Restrict --export argument
Fixes #187
2014-06-28 17:55:10 +02:00