diff --git a/CHANGELOG.md b/CHANGELOG.md index f2110f8b..72eb0379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,33 +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) - -**Build:** - -- Fix homebrew release, add options for release pipeline [\#1154](https://github.com/jrnl-org/jrnl/pull/1154) ([wren](https://github.com/wren)) - -## [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)) @@ -35,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)) @@ -49,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)) 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) 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") 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 ddf8b2ba..2d337d9d 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 ",