From ea7357ca26c611c18383b11ce325aee5cfd2547a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Jan 2021 13:27:54 -0800 Subject: [PATCH 1/7] Bump pyyaml from 5.3.1 to 5.4.1 (#1158) Bumps [pyyaml](https://github.com/yaml/pyyaml) from 5.3.1 to 5.4.1. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/5.3.1...5.4.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/poetry.lock b/poetry.lock index fc0f5895..abb802cb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -481,11 +481,11 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.3.1" +version = "5.4.1" description = "YAML parser and emitter for Python" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [[package]] name = "regex" @@ -855,19 +855,27 @@ pyxdg = [ {file = "pyxdg-0.27.tar.gz", hash = "sha256:80bd93aae5ed82435f20462ea0208fb198d8eec262e831ee06ce9ddb6b91c5a5"}, ] pyyaml = [ - {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, - {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, - {file = "PyYAML-5.3.1-cp35-cp35m-win32.whl", hash = "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2"}, - {file = "PyYAML-5.3.1-cp35-cp35m-win_amd64.whl", hash = "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c"}, - {file = "PyYAML-5.3.1-cp36-cp36m-win32.whl", hash = "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2"}, - {file = "PyYAML-5.3.1-cp36-cp36m-win_amd64.whl", hash = "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648"}, - {file = "PyYAML-5.3.1-cp37-cp37m-win32.whl", hash = "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a"}, - {file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"}, - {file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"}, - {file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"}, - {file = "PyYAML-5.3.1-cp39-cp39-win32.whl", hash = "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a"}, - {file = "PyYAML-5.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e"}, - {file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"}, + {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, + {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, + {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, + {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, + {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, + {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, + {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, + {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, ] regex = [ {file = "regex-2020.11.13-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:8b882a78c320478b12ff024e81dc7d43c1462aa4a3341c754ee65d857a521f85"}, From b53578262182788d0a5c4e43584babdd5238ccbc Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 21:29:43 +0000 Subject: [PATCH 2/7] Update changelog [ci skip] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2110f8b..bf2bb051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,18 @@ [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...HEAD) +**Fixed bugs:** + +- Editor can't be launched on Windows when using full path to editor executable [\#1096](https://github.com/jrnl-org/jrnl/issues/1096) + **Build:** - Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) +**Packaging:** + +- Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v2.7-beta](https://pypi.org/project/jrnl/v2.7-beta/) (2021-01-16) [Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...v2.7-beta) From 897943857dde82d53d8d12cd2649e66c1a09158e Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 23 Jan 2021 13:35:32 -0800 Subject: [PATCH 3/7] Simplify VS Code documentation for all platforms and add note about PATH variable (#1160) --- docs/recipes.md | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/docs/recipes.md b/docs/recipes.md index b7d370a4..14e08e14 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -162,10 +162,13 @@ in your `jrnl.yaml` file. (See [advanced usage](./advanced.md) for details). !!! note To save and log any entry edits, save and close the file. +If your editor is not in your operating system's `PATH` environment variable, +then you will have to enter in the full path of your editor. + ### Sublime Text -To use Sublime Text, install the command line tools for Sublime Text and -configure your `jrnl.yaml` like this: +To use [Sublime Text](https://www.sublimetext.com/), install the command line +tools for Sublime Text and configure your `jrnl.yaml` like this: ```yaml editor: "subl -w" @@ -174,9 +177,21 @@ editor: "subl -w" Note the `-w` flag to make sure jrnl waits for Sublime Text to close the file before writing into the journal. +### Visual Studio Code + +[Visual Studio Code](https://code.visualstudio.com) also requires a flag +that tells the process to wait until the file is closed before exiting: + +```yaml +editor: "code --wait" +``` + +On Windows, `code` is not added to the path by default, so you'll need to +enter the full path to your `code.exe` file, or add it to the `PATH` variable. + ### MacVim -Similar to Sublime Text, MacVim must be started with a flag that tells +Also similar to Sublime Text, MacVim must be started with a flag that tells the the process to wait until the file is closed before passing control back to journal. In the case of MacVim, this is `-f`: @@ -219,29 +234,3 @@ editor: "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession The double backslashes are needed so jrnl can read the file path correctly. The `-multiInst -nosession` options will cause jrnl to open its own Notepad++ window. - -### Visual Studio Code - -To set [Visual Studo Code](https://code.visualstudio.com) as your editor on Linux, edit `jrnl.yaml` like this: - -```yaml -editor: "/usr/bin/code --wait" -``` - -The `--wait` argument tells VS Code to wait for files to be written out before handing back control to jrnl. - -On MacOS you will need to add VS Code to your PATH. You can do that by adding: - -```sh -export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" -``` - -to your `.bash_profile`, or by running the **Install 'code' command in PATH** command from the command pallet in VS Code. - -Then you can add: - -```yaml -editor: "code --wait" -``` - -to `jrnl.yaml`. See also the [Visual Studio Code documentation](https://code.visualstudio.com/docs/setup/mac) From 9f386163a42ceb6450bf5e01c782ccf8370d3180 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 21:37:04 +0000 Subject: [PATCH 4/7] Update changelog [ci skip] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2bb051..1dfcd423 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ - Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) +**Documentation:** + +- add instructions to add VSCode as an external editor for Windows [\#1155](https://github.com/jrnl-org/jrnl/issues/1155) +- Clarify editor documentation for PATH variable and VS Code [\#1160](https://github.com/jrnl-org/jrnl/pull/1160) ([micahellison](https://github.com/micahellison)) + **Packaging:** - Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) From a32070b08a640e18033a57cbfb548b75b138b20d Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 22:49:45 +0000 Subject: [PATCH 5/7] Increment version to v2.7 --- jrnl/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jrnl/__version__.py b/jrnl/__version__.py index b9dc436f..57da66a0 100644 --- a/jrnl/__version__.py +++ b/jrnl/__version__.py @@ -1 +1 @@ -__version__ = "v2.7-beta" +__version__ = "v2.7" diff --git a/pyproject.toml b/pyproject.toml index 0bf1460e..e47f27f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jrnl" -version = "v2.7-beta" +version = "v2.7" description = "Collect your thoughts and notes without leaving the command line." authors = [ "jrnl contributors ", From ef563c807f9a4b84e0aedcf48e425a220b91d8e4 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 23 Jan 2021 22:51:22 +0000 Subject: [PATCH 6/7] Update changelog [ci skip] --- CHANGELOG.md | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dfcd423..72eb0379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,46 +1,18 @@ # Changelog -## [Unreleased](https://github.com/jrnl-org/jrnl/) +## [v2.7](https://pypi.org/project/jrnl/v2.7/) (2021-01-23) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...HEAD) - -**Fixed bugs:** - -- Editor can't be launched on Windows when using full path to editor executable [\#1096](https://github.com/jrnl-org/jrnl/issues/1096) - -**Build:** - -- Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) - -**Documentation:** - -- add instructions to add VSCode as an external editor for Windows [\#1155](https://github.com/jrnl-org/jrnl/issues/1155) -- Clarify editor documentation for PATH variable and VS Code [\#1160](https://github.com/jrnl-org/jrnl/pull/1160) ([micahellison](https://github.com/micahellison)) - -**Packaging:** - -- Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) - -## [v2.7-beta](https://pypi.org/project/jrnl/v2.7-beta/) (2021-01-16) - -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.6...v2.7-beta) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.7-beta...v2.7) **Implemented enhancements:** -- Filter for entries from the same date in previous years [\#1143](https://github.com/jrnl-org/jrnl/issues/1143) -- Implement dependency tracker/updater [\#1120](https://github.com/jrnl-org/jrnl/issues/1120) -- Automate Arch deployment [\#1112](https://github.com/jrnl-org/jrnl/issues/1112) -- Change temporary file names for better text editor integration [\#1080](https://github.com/jrnl-org/jrnl/issues/1080) -- Allow custom file extension for `jrnl --edit` command [\#1059](https://github.com/jrnl-org/jrnl/issues/1059) - Add new date format \(`--format date`\) for heatmapping [\#1146](https://github.com/jrnl-org/jrnl/pull/1146) ([KarimPwnz](https://github.com/KarimPwnz)) - Add new `-today-in-history`, `-month`, `-day`, and `-year` search filters [\#1145](https://github.com/jrnl-org/jrnl/pull/1145) ([KarimPwnz](https://github.com/KarimPwnz)) - Allow custom extensions when editing \(for easier syntax highlighting\) [\#1139](https://github.com/jrnl-org/jrnl/pull/1139) ([KarimPwnz](https://github.com/KarimPwnz)) **Fixed bugs:** -- `shlex.split` usage for editor config with commands that have spaces [\#1151](https://github.com/jrnl-org/jrnl/issues/1151) -- YAML Export lacking delimiters [\#1065](https://github.com/jrnl-org/jrnl/issues/1065) -- Error if password exists in keyring, but retrieval fails for any reason [\#1020](https://github.com/jrnl-org/jrnl/issues/1020) +- Editor can't be launched on Windows when using full path to editor executable [\#1096](https://github.com/jrnl-org/jrnl/issues/1096) - Fix OS compatibility issues for editors with spaces, slashes, and quotes [\#1153](https://github.com/jrnl-org/jrnl/pull/1153) ([micahellison](https://github.com/micahellison)) - Add delimiters in YAML format [\#1150](https://github.com/jrnl-org/jrnl/pull/1150) ([Seopril](https://github.com/Seopril)) - Fix keyring error handling [\#1138](https://github.com/jrnl-org/jrnl/pull/1138) ([KarimPwnz](https://github.com/KarimPwnz)) @@ -48,11 +20,13 @@ **Build:** +- Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) - Fix changelog generator [\#1127](https://github.com/jrnl-org/jrnl/pull/1127) ([wren](https://github.com/wren)) **Documentation:** -- Clarify installation docs [\#1097](https://github.com/jrnl-org/jrnl/issues/1097) +- add instructions to add VSCode as an external editor for Windows [\#1155](https://github.com/jrnl-org/jrnl/issues/1155) +- Clarify editor documentation for PATH variable and VS Code [\#1160](https://github.com/jrnl-org/jrnl/pull/1160) ([micahellison](https://github.com/micahellison)) - Emphasize installing dependencies before testing [\#1148](https://github.com/jrnl-org/jrnl/pull/1148) ([gumatias](https://github.com/gumatias)) - Clarify installation documentation \(\#1097\) [\#1137](https://github.com/jrnl-org/jrnl/pull/1137) ([Seopril](https://github.com/Seopril)) - Fix broken search bar in docs site [\#1135](https://github.com/jrnl-org/jrnl/pull/1135) ([wren](https://github.com/wren)) @@ -62,6 +36,7 @@ **Packaging:** +- Bump pyyaml from 5.3.1 to 5.4.1 [\#1158](https://github.com/jrnl-org/jrnl/pull/1158) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump keyring from 21.7.0 to 21.8.0 [\#1136](https://github.com/jrnl-org/jrnl/pull/1136) ([dependabot[bot]](https://github.com/apps/dependabot)) - Bump pytz from 2020.4 to 2020.5 [\#1130](https://github.com/jrnl-org/jrnl/pull/1130) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) - Bump pytest from 6.2.0 to 6.2.1 [\#1129](https://github.com/jrnl-org/jrnl/pull/1129) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) From 8a78c349175da90c7c79e3bec81698a6b910b821 Mon Sep 17 00:00:00 2001 From: eshrh <16175276+eshrh@users.noreply.github.com> Date: Sat, 23 Jan 2021 18:29:43 -0500 Subject: [PATCH 7/7] Support title splitting for fullwidth CJK terminals (#1163) * Split by fullwidth terminals without spaces. * Add test * Update write.feature --- features/write.feature | 14 ++++++++++++++ jrnl/Entry.py | 13 ++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/features/write.feature b/features/write.feature index efa26201..eb22e480 100644 --- a/features/write.feature +++ b/features/write.feature @@ -28,6 +28,20 @@ Feature: Writing new entries. | basic_folder | | basic_dayone | + Scenario Outline: CJK entry should be split at fullwidth period without following space. + Given we use the config ".yaml" + And we use the password "test" if prompted + When we run "jrnl 七転び。八起き" + And we run "jrnl -1" + Then the output should contain "| 八起き" + + Examples: configs + | config_file | + | basic_onefile | + | basic_encrypted | + | basic_folder | + | basic_dayone | + Scenario Outline: Writing an entry from command line should store the entry Given we use the config ".yaml" And we use the password "bad doggie no biscuit" if prompted diff --git a/jrnl/Entry.py b/jrnl/Entry.py index 2a85e015..67ba84f3 100755 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -204,14 +204,17 @@ class Entry: # https://github.com/fnl/segtok SENTENCE_SPLITTER = re.compile( r""" -( # A sentence ends at one of two sequences: - [.!?\u2026\u203C\u203D\u2047\u2048\u2049\u22EF\u3002\uFE52\uFE57\uFF01\uFF0E\uFF1F\uFF61] # Either, a sequence starting with a sentence terminal, + ( + [.!?\u2026\u203C\u203D\u2047\u2048\u2049\u22EF\uFE52\uFE57] # Sequence starting with a sentence terminal, [\'\u2019\"\u201D]? # an optional right quote, - [\]\)]* # optional closing brackets and - \s+ # a sequence of required spaces. -)""", + [\]\)]* # optional closing bracket + \s+ # AND a sequence of required spaces. + ) + |[\uFF01\uFF0E\uFF1F\uFF61\u3002] # CJK full/half width terminals usually do not have following spaces. + """, re.VERBOSE, ) + SENTENCE_SPLITTER_ONLY_NEWLINE = re.compile("\n")