Commit graph

72 commits

Author SHA1 Message Date
dependabot[bot]
b38d765759
Bump black from 20.8b1 to 21.5b0 (#1241)
* Bump black from 20.8b1 to 21.5b0

Bumps [black](https://github.com/psf/black) from 20.8b1 to 21.5b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/master/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <support@github.com>

* Run make format with latest version of black

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-05-08 12:39:00 -07:00
Suhas
a3f4f6b944
Fix bug that prevented --format pretty and --format short from working (#1177) 2021-03-06 10:47:03 -08:00
Suhas
4f79803885
Allow runtime configuration overrides from the commandline (#1169)
Add --config-override feature

* add test and argument handler for runtime override of configurations.
* identify location to apply override in "main"
* update gitignore
* remove unneeded import
* add jrnl interface test for overriden configurations
* trivial whitespace change
* implement runtime override
* make format
* refactor override unittest
* clean up unused import
* start writing integration test
* add linewrap override scenario
* implement editor override step
* add dev dependencies on pytest -mock and -cov
* make format
* remove unused imports
* make format
* rename --override to --config-override
* move override implementation into own module
* begin TDD of dot notated overrides
* rewrite behavior scenario
* implement recursive config overrides
* clean up unittests
* iterate on behave step
* make format
* cleanup
* move override behave tests out of core
* refactor recursive code
* make format
* code cleanup
* remove unused import
* update test config
* rewrite test for better mock call expect
* make format
* binary search misbehaving windows test
* unittest multiple overrides
* uncomment dot notation unittest
* add multiple override scenario spec
* make format
* make format
* update unittests for new syntax
* update integ tests for new syntax
* update gitignore
* guard override application
* deserialize function as return type
* make format
* organize deserialization unittests
* better, more specific behave tests
* test different editor launch commands
* formatting
* handle datatypes in deserialization and update helptext
* stick to config convention in testbed
* update tests ith better verifications
* make format
* space
* review feedbac
* make format
* skip on win
* update deps
* update tests with better verifications
make format
space
review feedbac
* skip on win
* update deps
* refactor deserialization
organize test_parse_args
make format
* skip on win
* refactor deserialization
organize test_parse_args
make format
* update tests ith better verifications
* make format
* space
* make format
* document apply_overrides
* update gitignore
* document config-override enhancement
* Simplify config override syntax (#5)
* update tests and expected behavior
* clean up arg parsing tests
* update deserialization
* update deserialization
* config argparse action
* update override application logic
* update tests; delete unused imports
* override param must be list
* update docstring
* update test input to SUT
* update remaining override unittests
* make format
* forgot to update CLI syntax
* update documentation to sphinx style
* variable renames
* Lockfile merge (#7)
* Add brew and gitter badges to README
* Update changelog [ci skip]
* Make journal selection behavior more consistent when there's a colon with no date (#1164)
* Simplify config override syntax (#8)
* update tests and expected behavior
* clean up arg parsing tests
* update deserialization
* update deserialization
* config argparse action
* update override application logic
* update tests; delete unused imports
* override param must be list
* update docstring
* update test input to SUT
* update remaining override unittests
* make format
* forgot to update CLI syntax
* formatting
* Update pyproject.toml
* update lockfile to remove pytest-cov and pytest-mock deps
* update docs
* reuse existing mock; delete unneeded code
* move overrides earlier in the execution
use existing configs instead of custom
make format
clean up imports
* update for passworded access
context.parser -> parsed_args
* test that no editor is launched
* remove unnecessary mocks
* rename variable for intent
* reinstate getpass deletion
* update gitignore
* capture failure mode
* remove unneeded imports
* renamed variable
* delete redundant step
* comment on step
* clean up step behavior description
* [WIP] lock down journal access behavior
* skip -> wip
* correct command for overriding journal via dot keys
* update wip test for updating a "temp" journal and then reading baack its entries
* remove "mock" from poetry file
* make CI happy
* complex behavior sequence for default journal override
* separate out smaller pieces of logic
test that apply_overrides acts on base configuration and not the copy
* defer modification of loaded configuration to update_config
remove unused fixtures
delete complicated UT since behavior is covered in overrides.feature integ test
delete redundant UT
* Update .gitignore
* remove skip_win
* forward override unpacking to yaml library
* merge config override step with existing config_var step in core
delete config_override step
unify step description syntax
* delete unused and redundant code
* rebases are hard
* remove wip tag from test
* remove skipped tests for windows
* Address code review
yield -> return
remove needless copy
adjust spacing
re-inline args return
reset packaging info to e6c0a16342
revert package version for this PR
* consolidate imports
* Defer config_override unpacking to dict *after* base config is loaded
store cli overrides without unpacking just yet
move deserialize_config_args to config module
delete custom Action class for config operations
apply [k,v] -> {k, v} for each override
update test data
update import
* rename deserialize_config_args to better express intent
make format
2021-03-02 18:47:57 -08:00
Karim Rahal
f0e8fa2060
Add new -today-in-history, -month, -day, and -year search filters (#1145)
* Introduce -reminisce, -month, -day, and -year
* Update expected_args in parse_args tests
* Add check before creating compare_d
* Misc changes
* Implement testing for -month, -day, -year, and -reminisce
* Compress tests into one Scenario Outline
* Fix failing tests by updating dates_similar journal
* Create 'we set current date and time to' step
* Use time.parse in reminisce
* Update dates_similar journal
* Make 'Searching in a journal' test shorter
* Lint
* Implement reminiscing test
* Add combination tests
* Finalize tests
* Finalize pytests
* Simplify reminisce tests
* Change reminsice help (since it also shows today's entries)
* Re-do tests; use various tests
* Remove old test data
* Better scenario description
* Standardize format for compare_d
* Rename -reminisce to -today-in-history
2021-01-16 14:55:27 -08:00
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
9fe56b9e10
Comply with GPL by acknowledging all authors and including license info in each source file (#1121)
* Update authors to "jrnl contributors" to comply with GPL3
* Include jrnl email address with contributors
* Include GPL notice in jrnl --version
* Apply consistent copyright and license to all Python files
* Add copyright and license to documentation
* Add copyright and license to docs theme
* Wiping poetry cache to try to resolve a test issue
* Testing with Python 3.9.0 in attempt to bypass GitHub Actions failure in 3.9.1
* make format
* Exclude Windows Python 3.9 build which is failing due to a GitHub Actions problem
* Modify testing to get around this 3.9 issue...
* Fix exclude
2020-12-19 22:28:22 -08:00
Jonathan Wren
cfdd05358a
Add ability to put --edit partly through a cli entry to move it to the editor (#1091)
also add some functionality to test suite to see what the editor file contents were and make assertions about it
2020-11-21 15:20:21 -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
joaquin garmendia
8c2de0e6d7
Add display format option to config file. (#1050)
* Add display format option to config file.
* Add tests.
* Fix `black` error.
* Change nested if to top level.
2020-10-17 18:53:34 -07: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
Manuel Ebert
f22ddd706b jrnl.py:cli -> cli.py:run 2013-11-29 10:23:09 -08:00
William Minchin
e176e1145b Change break msg for Windows
for multiline input on Windows, you need Ctrl+Z to exit
2013-11-27 10:07:06 -07:00
Manuel Ebert
e801c62cef Piping data into jrnl and multiline composing 2013-11-24 11:29:45 -08:00
Manuel Ebert
1e9fe2cf1e -short becomes --short 2013-11-04 00:36:10 -08:00
Manuel Ebert
8c31796aa4 Deprecates -date and -star arguments 2013-11-03 20:02:28 -08:00
Manuel Ebert
82336ffe75 Starring entries and looking at the stars 2013-11-03 20:02:18 -08:00
Manuel Ebert
6a81b18544 Attempts to fix common errors in jrnl_config automatically 2013-11-03 14:38:32 -10:00
Manuel Ebert
ab12294777 Only updates config locally on encrypting and decrypting 2013-10-17 16:04:34 -07:00
Manuel Ebert
a96435b6dc Disambiguates jrnl.update_config and install.update_config 2013-10-17 16:00:27 -07:00
Manuel Ebert
34b730a5c9 Saves password to keyring
Closes #96 and deprecates password field in config
2013-10-17 14:55:59 -07:00
Manuel Ebert
de0f3771f3 Fixes #91 2013-09-23 17:24:23 -07:00
Manuel Ebert
4e36d7baf0 Python 2.6 compatibility 2013-08-28 13:48:18 -07:00
Manuel Ebert
2f8d063b5d Failures return exit code 1 2013-08-28 12:29:34 -07:00
Manuel Ebert
c849b03c5c Detectsa DayOne journals that are stored in the Mobile Documents folder 2013-08-28 12:18:39 -07:00
Manuel Ebert
28a5c66193 Soft-deprecates -to and introduces -until 2013-08-14 14:06:39 -07:00
Manuel Ebert
598c0e97ce Prevents journal from printing when composing an entry
This fixes #87
2013-08-14 14:00:32 -07:00
Manuel Ebert
e5ee4e3f97 Filters before exporting 2013-08-06 17:57:21 -07:00
Manuel Ebert
d3edbfd53b Uses stderr for prompts instead stdout 2013-07-22 12:04:01 +02:00
Manuel Ebert
f9bdc13210 Python 3 improvements 2013-07-19 13:24:18 +02:00
Manuel Ebert
13f8e668dc Mock stdin 2013-07-19 12:44:39 +02:00
Manuel Ebert
cb9beac711 Emoji support 2013-07-19 11:46:02 +02:00
Manuel Ebert
b2b842711d Ability to parse in args manually 2013-07-18 22:48:46 +02:00
Manuel Ebert
b0c79d4b3b Simplified exporting logic 2013-07-17 18:19:14 +02:00
Aniket Pant
55fc36a0d2 Improve export functionality
Signed-off-by: Aniket Pant <me@aniketpant.com>
2013-06-26 13:05:13 +05:30
Aniket Pant
a38d9df473 Add new export option
Support for json and md retained
All export types moved to --export except tags

Signed-off-by: Aniket Pant <me@aniketpant.com>
2013-06-21 19:22:02 +05:30
Manuel Ebert
9852f227b7 Better Unicode support
Closes #72
2013-06-09 15:55:03 -07:00
Manuel Ebert
73b09085ee Moves tag export to exporters 2013-06-09 15:07:27 -07:00
Manuel Ebert
90863ecee1 Nicer error message when there is a syntactical error in your config file. 2013-06-09 14:49:02 -07:00
Manuel Ebert
ac7a882142 JSON exports tags
Closes #78. This changes the export format to

{
tags: {tag: count},
entries: [{…}, {…}, …]
}
2013-06-09 14:48:56 -07:00
Manuel Ebert
884881546d Better utf8 support 2013-04-19 17:32:32 +02:00
Manuel Ebert
8842b8589f Updated readme and changelog and changed config path according to discussion 2013-04-19 16:58:19 +02:00
Manuel Ebert
02da463f10 Merge branch 'patch-1' of git://github.com/evaryont/jrnl into evaryont-patch-1 2013-04-19 16:50:27 +02:00
Manuel Ebert
634d84c77e Fixes for Python 3 Support 2013-04-19 15:19:21 +02:00
Manuel Ebert
3052e0cce7 Python 3 compatibility 2013-04-19 14:46:05 +02:00
Manuel Ebert
5b4b1e71d6 Python 2.6 compatibility
Closes #67
2013-04-18 11:51:42 +02:00
Manuel Ebert
c92339e4e2 Merge pull request #61 from alapolloni/master
Update jrnl.py so that a trailing / for a DayOne journal config is seen as a DayOne journal.
2013-04-17 01:32:56 -07:00
Manuel Ebert
dfba03d127 Fixes bug when showing tags when no tags are defined.
Closes #63
2013-04-17 10:27:17 +02:00
Alex Apolloni
06e664d78a allow trailing \ for DayOne journals
https://github.com/maebert/jrnl#dayone-integration
sort of infers that it in the .jrnl_config it should end in a /

but prior to this, if there was a trailing / then jrnl thought it was
looking at a text type journal.
2013-04-15 14:05:04 +02:00
No GUI
b66480ff1d Support a custom location for the config
Export $JRNL_CONFIG to override the location instead of using $HOME. Too many dotfiles are literring it, ya' know?

Linux desktop users, you might like if you follow the XDG standards:

    export JRNL_CONFIG=$XDG_CONFIG_HOME/jrnl/config
2013-04-14 13:19:03 -07:00
Manuel Ebert
61835d88ec Merge pull request #51 from maebert/dayone
Dayone support
2013-03-04 14:57:10 -08:00