Merge branch 'develop' into dependabot/pip/pyyaml-6.0

This commit is contained in:
Jonathan Wren 2021-10-16 14:52:04 -07:00 committed by GitHub
commit 66a6d30591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 32 deletions

View file

@ -11,11 +11,14 @@
**Documentation:**
- Document folder journal and DayOne journal types [\#1326](https://github.com/jrnl-org/jrnl/issues/1326)
- Added Recipe for visualizing Markdown in the CLI [\#1354](https://github.com/jrnl-org/jrnl/pull/1354) ([viegasfh](https://github.com/viegasfh))
- Fix recipe 'Launch a terminal for rapid logging' [\#1351](https://github.com/jrnl-org/jrnl/pull/1351) ([zapateo](https://github.com/zapateo))
- Fix readme splash and add changelog link to readme [\#1339](https://github.com/jrnl-org/jrnl/pull/1339) ([micahellison](https://github.com/micahellison))
- Document journal types [\#1331](https://github.com/jrnl-org/jrnl/pull/1331) ([micahellison](https://github.com/micahellison))
**Packaging:**
- Bump mkdocs from 1.2.2 to 1.2.3 [\#1355](https://github.com/jrnl-org/jrnl/pull/1355) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump pytz from 2021.1 to 2021.3 [\#1348](https://github.com/jrnl-org/jrnl/pull/1348) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump cryptography from 3.4.8 to 35.0.0 [\#1345](https://github.com/jrnl-org/jrnl/pull/1345) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump black from 21.8b0 to 21.9b0 [\#1343](https://github.com/jrnl-org/jrnl/pull/1343) ([dependabot[bot]](https://github.com/apps/dependabot))

View file

@ -28,7 +28,7 @@ You can do things like
jrnl @fixed -starred -n 10 -to "jan 2013" --short
```
To get a short summary of the 10 most recent, favourited entries before
To get a short summary of the 10 most recent, favourite entries before
January 1, 2013 that are tagged with `@fixed`.
### Statistics
@ -52,8 +52,8 @@ print exactly one line per entry).
### Importing older files
If you want to import a file as an entry to jrnl, you can just do `jrnl < entry.ext`. But what if you want the modification date of the file to
be the date of the entry in jrnl? Try this
If you want to import a file as an entry to `jrnl`, you can just do `jrnl < entry.ext`. But what if you want the modification date of the file to
be the date of the entry in `jrnl`? Try this
```sh
echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl
@ -91,7 +91,7 @@ Body:
```
The `template.txt` file could be used to create a new entry with these
command line arguements:
command line arguments:
```sh
jrnl < template.txt # Imports template.txt as the most recent entry
@ -159,27 +159,53 @@ jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)"
You can use this to launch a terminal that is the `jrnl` stdin prompt so you can start typing away immediately.
```bash
jrnl now --config-override editor:""
jrnl --config-override editor ""
```
Bind this to a keyboard shortcut.
Map `Super+Alt+J` to launch the terminal with jrnl prompt
Map `Super+Alt+J` to launch the terminal with `jrnl` prompt
- **xbindkeys**
In your `.xbindkeysrc`
```ini
Mod4+Mod1+j
alacritty -t floating-jrnl -e jrnl now --config-override editor:"",
alacritty -t floating-jrnl -e jrnl --config-override editor "",
```
- **I3 WM** Launch a floating terminal with the `jrnl` prompt
```ini
bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor:""
bindsym Mod4+Mod1+j exec --no-startup-id alacritty -t floating-jrnl -e jrnl --config-override editor ""
for_window[title="floating *"] floating enable
```
### Visualize Formatted Markdown in the CLI
Out of the box, `jrnl` can output journal entries in Markdown. To visualize it, you can pipe to [mdless](https://github.com/ttscoff/mdless), which is a [less](https://en.wikipedia.org/wiki/Less_(Unix))-like tool that allows you to visualize your Markdown text with formatting and syntax highlighting from the CLI. You can use this in any shell that supports piping.
The simplest way to visualize your Markdown output with `mdless` is as follows:
```sh
jrnl --export md | mdless
```
This will render your Markdown output in the whole screen.
Fortunately, `mdless` has an option that allows you to adjust the screen width by using the `-w` option as follows:
```sh
jrnl --export md | mdless -w 70
```
If you want Markdown to be your default display format, you can define this in your config file as follows:
```yaml
display_format: md
# or
display_format: markdown
```
For more information on how `jrnl` outputs your entries in Markdown, please visit the [Formats](./formats.md) section.
## External editors
@ -201,7 +227,7 @@ tools for Sublime Text and configure your `jrnl.yaml` like this:
editor: "subl -w"
```
Note the `-w` flag to make sure jrnl waits for Sublime Text to close the
Note the `-w` flag to make sure `jrnl` waits for Sublime Text to close the
file before writing into the journal.
### Visual Studio Code
@ -252,20 +278,20 @@ grep -A 1 CFBundleIdentifier /Applications/iA\ Writer.app/Contents/Info.plist
### Notepad++ on Windows
To set [Notepad++](http://notepad-plus-plus.org/) as your editor, edit
the jrnl config file (`jrnl.yaml`) like this:
the `jrnl` config file (`jrnl.yaml`) like this:
```yaml
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
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.
### emacs
To use `emacs` as your editor, edit the jrnl config file (`jrnl.yaml`) like this:
To use `emacs` as your editor, edit the `jrnl` config file (`jrnl.yaml`) like this:
```yaml
editor: emacsclient -a "" -c

7
poetry.lock generated
View file

@ -397,7 +397,7 @@ python-versions = ">=3.6"
[[package]]
name = "mkdocs"
version = "1.2.2"
version = "1.2.3"
description = "Project documentation with Markdown."
category = "dev"
optional = false
@ -1134,8 +1134,8 @@ mergedeep = [
{file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"},
]
mkdocs = [
{file = "mkdocs-1.2.2-py3-none-any.whl", hash = "sha256:d019ff8e17ec746afeb54eb9eb4112b5e959597aebc971da46a5c9486137f0ff"},
{file = "mkdocs-1.2.2.tar.gz", hash = "sha256:a334f5bd98ec960638511366eb8c5abc9c99b9083a0ed2401d8791b112d6b078"},
{file = "mkdocs-1.2.3-py3-none-any.whl", hash = "sha256:a1fa8c2d0c1305d7fc2b9d9f607c71778572a8b110fb26642aa00296c9e6d072"},
{file = "mkdocs-1.2.3.tar.gz", hash = "sha256:89f5a094764381cda656af4298727c9f53dc3e602983087e1fe96ea1df24f4c1"},
]
mypy-extensions = [
{file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
@ -1281,6 +1281,7 @@ pyyaml = [
{file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"},
{file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"},
{file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"},
]
pyyaml-env-tag = [
{file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"},