Commit graph

426 commits

Author SHA1 Message Date
MinchinWeb
ad7cf5378a Re-sync version number 2020-03-21 21:51:15 -06:00
Jonathan Wren
4d768ae433
fix up tests and related issues 2020-02-29 15:29:29 -08:00
Aaron Lichtman
47e0305aa0
Pretty print journal entries (#692)
* Pretty print journal entry titles and dates.

Changes appearance of all jrnl viewing commands, such as $ jrnl --short and
$ jrnl -n {NUM}.

Fix #508

* Removed extra newline at end of title

* Use ansiwrap to properly wrap strings with ANSI escapes

* Add ansiwrap to pyproject.toml

* Allow configuration of colors

- Replaced raw escapes with colorama
- Added colors key to config
- Add checks for validity of color values

* Add color configuration documentation

* Fix broken tests due to config change

* Add tests for colors in configs

- Identifying invalid color configs
- Upgrading config from no colors -> colors

* Add colorama dependency for all platforms

* Allow users to disable colorization of output

* Update poetry.lock

* Add tag and body color customization options

* Fix colorization of tags in title and body

* Updated tests to use no color by default

* Change pass to continue in verify_config()

* Better style in Entry.py

* Reduce code duplication for tag highlighting

- Breaks "unreadable date" regression test for unknown reason

* Properly colorize tags and print body

* Reformatting and clean up

* Replace list comprehension with generator

* Handle invalid colors by not using a color

* Process ANSI escapes properly with behave

* Fixed the 'spaces after tags directly next to punctuation' bug

Broke processing of tags next to any punctuation at all

* Closer to working tag colorization but not perfect

* Add tests printing for multiline journals

Fix #717

* Correctly indent first line of multiline entry

* Add test for multiline entries with tags

* Remove redundant UNICODE flag

* Progress towards proper tag colorization and body formatting

* Fix newline colorization bug

Debug code left intact since there are more bugs to fix :/

* And now the space just ends up before the tag instead of after it

* Fix assertion syntax warning

* Moved tag test to tagging.feature file

* Strip out debug code and clean up

* Bold datetimes in title

* Bold all titles

Fix #720

* Remove PY2 and PY3 constants

* Fix regression in features/steps/core.py

* Fix tag_regex

* Remove redundant re.UNICODE flag

* Remove extraneous code
2020-02-29 15:29:16 -08:00
Jonathan Wren
28a4bd8f18
Merge pull request #843 from jrnl-org/v2.5
Add support to save journals to multiple files in a directory
2020-02-29 15:13:28 -08:00
Micah Ellison
da30eaa62f Apply Black linting 2020-02-29 14:03:54 -08:00
Micah Ellison
53c557005c Update FolderJournal reference to entry __unicode__ method to __str__ 2020-02-29 12:35:05 -08:00
micahellison
12eed5c86a
Merge pull request #857 from maebert/manu--better-parsing
Clean up shortcut for Limit
2020-02-27 18:51:07 -08:00
Manuel Ebert
10d2178d5a 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-02-22 17:17:22 -08:00
Jonathan Wren
97cf65e516
Merge branch 'develop' into v2.5 2020-02-08 14:29:10 -08:00
MinchinWeb
e5d7845f18 Listing all entries in DayOne Classic journal throws IndexError (#786)
* Reproduce bug in #780
🎵 I have no body, no body to love me... 🎵
The bug is cause by a DayOne entry that has to entry body.

* Deal with empty bodies
Close #780.

* [Travis-CI] add "tree" command to debug missing files
* Fix file location
I have no idea why, but it ran locally fine without issue. Travis is more particular...
2020-02-08 13:14:33 -08:00
MinchinWeb
550347eab1
Add UTC support for failing DayOne tests (#785)
* [Dayone] don't break if the system timezone is UTC
* [DayOne] re-enable tests that were failing on Travis
* [DayOne] change as per code review to avoid `except: pass`
2020-02-08 12:34:52 -08:00
Stav Shamir
630a8fcaec
Add test scenarios for the export feature (#824)
* Fix behave keyword "and" to correct case "And"
* Extract export_steps module
* Add scenario for XML export
* Add scenario for tags export
* Add scenario for fancy export
* Add scenario for yaml export
* Remove unused module export.py
* Run `make format`
* Fix `create_directory` step
2020-02-08 12:18:01 -08:00
Jonathan Wren
fa971b0f2f
Merge branch 'develop' into master 2020-02-08 11:33:09 -08:00
MinchinWeb
e54da41000 [DayOne] YAML export improvements (#773)
* [YAML Export] code style improvements

* [Dayone] Brings back extended Dayone attributes to YAML export
c.f. 7d3afd811b
reverse fd46ffea23

* [YAML Exporter] switch to f-strings

* [Black] apply black formatter to YAML Exporter

* Code fixes as per review
2020-01-25 17:01:55 -08:00
Jonathan Wren
b71f8fc430
Merge pull request #820 from wren/version-fix
Fix issue where jrnl would always out 'source' for version, fix Poetry config to build and publish properly
2020-01-25 13:44:13 -08:00
Jonathan Wren
a753f53f54
add version file to repo 2020-01-25 11:47:52 -08:00
Jonathan Wren
6ea492e25a
Merge pull request #789 from dbxnr/dbxnr-patch-1
Fix crash while encrypting a journal on first run without saving password
2020-01-16 19:06:58 -08:00
Micah Ellison
41c4c241cc #790 - closing temp file before passing it to editor to prevent file locking issues in Windows 2020-01-09 20:34:38 -08:00
dbxnr
ef18cb4144
Fix for unhandled exception 2020-01-09 18:20:48 +00:00
Jonathan Wren
e984a9a015
Merge branch 'develop' into black 2019-12-21 12:11:05 -08:00
Jonathan Wren
07a633ae51
(#770) run black formatter on codebase for standardization 2019-12-21 11:47:02 -08:00
MinchinWeb
e7cbbecaef [Black] sync to develop branch and apply black
# Conflicts:
#	jrnl/EncryptedJournal.py
#	jrnl/Journal.py
#	jrnl/__init__.py
#	jrnl/cli.py
#	jrnl/install.py
2019-12-14 13:48:17 -07:00
Jonathan Wren
a9e4e09547
Merge pull request #708 from pspeter/simplify-password-logic
Refactor password logic to prevent accidental password leakage
2019-12-10 21:04:59 -08:00
Jonathan Wren
6a8f3edec1
Merge branch 'develop' into maebert-fast-import 2019-12-10 20:47:39 -08:00
Jonathan Wren
cb9d546141
Merge pull request #740 from empireshades/master
Full text search (case insensitive) with "-contains"
2019-12-10 20:25:36 -08:00
MinchinWeb
d8f422151d Apply black formatter to code 2019-12-07 12:32:55 -07:00
Jims
9b6b788af4 Renamed searching to contains. Made changes as per pull-request: https://github.com/jrnl-org/jrnl/pull/740 2019-12-01 23:03:38 -05:00
Manuel Ebert
45384f3c8f Use __version__.py instead of VERSION.txt 2019-12-01 19:41:16 -08:00
Peter Schmidbauer
444d6de9e4 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.
2019-11-29 17:07:35 +01:00
Jonathan Wren
abb81acedb
Merge pull request #706 from pspeter/password-confirmation
🛠 Add password confirmation when encrypting journals
2019-11-29 06:42:38 -08:00
Jonathan Wren
0c1b577208
Merge pull request #751 from micahellison/readline-738
[GH-738] preventing readline usage on Windows
2019-11-25 20:42:33 -08:00
Jonathan Wren
a529b70614 Squashed commit of the following:
commit 75113187432939a51486422c3f70b3a9e2bcf0aa
Merge: 74d1854 47e10fb
Author: Jonathan Wren <9453067+wren@users.noreply.github.com>
Date:   Thu Oct 24 17:02:10 2019 -0700

    Merge pull request #665 from notbalanced/issue_662

    Fixes Issue #662 - Day names not treated consistently for new entry

commit 74d1854a4bba468221b4eee254bdee2bb40f5d5a
Merge: 1bbf074 6a5726a
Author: Jonathan Wren <9453067+wren@users.noreply.github.com>
Date:   Sat Oct 5 15:30:57 2019 -0700

    Merge pull request #418 from philipsd6/2.0-fancy_exporter

    Add exporter to output entries inside unicode box character boxes

commit 47e10fbee7
Author: Craig Moyer <craig.moyer@gmail.com>
Date:   Sun Sep 29 19:06:53 2019 -0400

    Fix issue #662 to properly handle day names as new entry dates and
    command line (-on, -from, -to).

commit 9588913100
Author: Craig Moyer <craig.moyer@gmail.com>
Date:   Sun Sep 29 08:27:27 2019 -0400

    Syncing with jrnl-org/master

commit 4c68eb193d
Merge: 81dfebb 1bbf074
Author: Craig Moyer <craig.moyer@gmail.com>
Date:   Sun Sep 29 07:52:02 2019 -0400

    Merge remote-tracking branch 'upstream/master' into 2.0-rc1-maebert

commit 81dfebb2c0
Author: Manuel Ebert <manuel@1450.me>
Date:   Mon Apr 29 20:34:18 2019 +0200

    export changes

commit 6a5726acd2
Author: Philip Douglass <philip@philipdouglass.com>
Date:   Fri Dec 22 20:56:36 2017 -0500

    Enable FancyExporter plugin

commit 3d1b226871
Author: Philip Douglass <philip@philipdouglass.com>
Date:   Fri Jan 29 11:17:41 2016 -0500

    Add exporter to output entries inside unicode box character boxes
2019-11-25 20:29:34 -08:00
Peter Schmidbauer
e925fe22f9 Add password confirmation dialog 2019-11-19 14:24:36 +01:00
Jonathan Wren
0bd94c7872
Merge pull request #744 from alichtman/exit-after-no-text-entry
Exit jrnl if no text entered into editor
2019-11-18 22:06:04 -08:00
Micah Ellison
3aae43e138 [GH-738] preventing readline usage on Windows - removes autocomplete on the install step for Windows users 2019-11-18 20:32:40 -08:00
Jonathan Wren
5a874eeee7
Merge pull request #699 from pspeter/fix-keyring-without-backend
Fix crash when no keyring backend available
2019-11-18 20:12:16 -08:00
Aaron Lichtman
91dcb812d7
Remove extra space 2019-11-17 01:49:07 +01:00
Aaron Lichtman
7b84935470
Clean up debug statements 2019-11-16 14:53:07 +01:00
Aaron Lichtman
4cfff00d0a
Move sys.exit() down 2019-11-16 14:40:31 +01:00
Aaron Lichtman
87571fa55f
Debug 2019-11-16 14:31:05 +01:00
Aaron Lichtman
ac21a4facb
Merge branch 'master' into exit-after-no-text-entry 2019-11-15 09:34:50 +01:00
Aaron Lichtman
2890e33cac
Exit jrnl if no text entered into editor
Fix #589
2019-11-14 12:00:23 +01:00
Jims
e682d27994 added case-insensitive searching of entry title and body using a -S argument 2019-11-12 11:53:12 -05:00
Jonathan Wren
25c0feaab6
Merge branch 'master' into fix-custom-dates 2019-11-11 21:08:37 -08:00
Jonathan Wren
c098888612
Merge pull request #705 from pspeter/cleanup-py2-leftovers
remove py2 remnants and use mocks in tests
2019-11-11 20:53:10 -08:00
MinchinWeb
971560edac [Upgrade to 2.0] Expand User directory (#704) 2019-11-07 17:20:57 -08:00
Manuel Ebert
80b376b4fb Delay import of asteval 2019-11-07 16:49:01 -08:00
Manuel Ebert
de52081481 Explicitly write Version to file 2019-11-07 16:48:47 -08:00
Peter Schmidbauer
7d9795ace6 fixup! remove py2 remnants and use mocks in tests 2019-11-04 16:36:16 +01:00
Peter Schmidbauer
827a598dd8 Drop use of codecs package
Use builtins.open() instead
2019-11-01 21:48:04 +01:00