mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 09:28:31 +02:00
merge in develop branch
This commit is contained in:
commit
4a7aeec6fc
11 changed files with 1753 additions and 1493 deletions
|
@ -17,6 +17,8 @@
|
|||
|
||||
- Templated entries should not be saved if the raw text is identical to the original template [\#1652](https://github.com/jrnl-org/jrnl/issues/1652)
|
||||
- jrnl does not update version key in config file [\#1638](https://github.com/jrnl-org/jrnl/issues/1638)
|
||||
- jrnl should not create 0-length "encrypted" file on startup [\#1493](https://github.com/jrnl-org/jrnl/issues/1493)
|
||||
- Save empty journal on install instead of just creating a zero-length file [\#1690](https://github.com/jrnl-org/jrnl/pull/1690) ([micahellison](https://github.com/micahellison))
|
||||
- Don't save templated journal entries if the received raw text is the same as the template itself [\#1653](https://github.com/jrnl-org/jrnl/pull/1653) ([Briscoooe](https://github.com/Briscoooe))
|
||||
- Add tag to XML file when edited DayOne entry and is searchable afterward [\#1648](https://github.com/jrnl-org/jrnl/pull/1648) ([jonakeys](https://github.com/jonakeys))
|
||||
- Update version key in config file after version changes [\#1646](https://github.com/jrnl-org/jrnl/pull/1646) ([jonakeys](https://github.com/jonakeys))
|
||||
|
@ -34,7 +36,12 @@
|
|||
|
||||
**Documentation:**
|
||||
|
||||
- Document template extension behavior [\#1677](https://github.com/jrnl-org/jrnl/issues/1677)
|
||||
- Visual Studio Code may store unencrypted temporary files [\#1675](https://github.com/jrnl-org/jrnl/issues/1675)
|
||||
- Documentation Change [\#1651](https://github.com/jrnl-org/jrnl/issues/1651)
|
||||
- Support mkdocs 1.4.2 and fix its missing breadcrumb [\#1691](https://github.com/jrnl-org/jrnl/pull/1691) ([micahellison](https://github.com/micahellison))
|
||||
- Document temporary file extension behavior when using template [\#1686](https://github.com/jrnl-org/jrnl/pull/1686) ([micahellison](https://github.com/micahellison))
|
||||
- Update documentation about privacy and security in VSCode [\#1680](https://github.com/jrnl-org/jrnl/pull/1680) ([giuseppedandrea](https://github.com/giuseppedandrea))
|
||||
- Update documentation on temporary files naming [\#1673](https://github.com/jrnl-org/jrnl/pull/1673) ([giuseppedandrea](https://github.com/giuseppedandrea))
|
||||
- Update docs to include time and title in arguments with `--edit` [\#1657](https://github.com/jrnl-org/jrnl/pull/1657) ([pconrad-fb](https://github.com/pconrad-fb))
|
||||
- Fix markup in "Advanced Usage" doc [\#1655](https://github.com/jrnl-org/jrnl/pull/1655) ([multani](https://github.com/multani))
|
||||
|
|
|
@ -67,6 +67,22 @@ Windows doesn't log history to disk, but it does keep it in your command prompt
|
|||
session. Close the command prompt or press `Alt`+`F7` to clear your history
|
||||
after journaling.
|
||||
|
||||
## Files in transit from editor to jrnl
|
||||
|
||||
When creating or editing an entry, `jrnl` uses a unencrypted temporary file on
|
||||
disk in order to give your editor access to your journal. After you close your
|
||||
editor, `jrnl` then deletes this temporary file.
|
||||
|
||||
So, if you have saved a journal entry but haven't closed your editor yet, the
|
||||
unencrypted temporary remains on your disk. If your computer were to shut off
|
||||
during this time, or the `jrnl` process were killed unexpectedly, then the
|
||||
unencrypted temporary file will remain on your disk. You can mitigate this
|
||||
issue by only saving with your editor right before closing it. You can also
|
||||
manually delete these files from your temporary folder. By default, they
|
||||
are named `jrnl*.jrnl`, but if you use a
|
||||
[template](reference-config-file.md#template), they will have the same
|
||||
extension as the template.
|
||||
|
||||
## Editor history
|
||||
|
||||
Some editors keep usage history stored on disk for future use. This can be a
|
||||
|
@ -83,7 +99,8 @@ the `workbench.localHistory.enabled` setting in the
|
|||
Alternatively, you can disable this feature for specific files by configuring a
|
||||
[pattern](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)
|
||||
in the `workbench.localHistory.exclude` setting. To exclude unencrypted temporary files generated
|
||||
by `jrnl`, you can set the `**/jrnl*.jrnl` pattern for the `workbench.localHistory.exclude` setting
|
||||
by `jrnl`, you can set the `**/jrnl*.jrnl` (unless you are using a
|
||||
[template](reference-config-file.md#template)) pattern for the `workbench.localHistory.exclude` setting
|
||||
in the [Settings editor](https://code.visualstudio.com/docs/getstarted/settings#_settings-editor).
|
||||
|
||||
!!! note
|
||||
|
@ -129,7 +146,11 @@ autocommand can be used. Place this in your `~/.vimrc`:
|
|||
autocmd BufNewFile,BufReadPre *.jrnl setlocal viminfo= noswapfile noundofile nobackup nowritebackup noshelltemp history=0 nomodeline secure
|
||||
```
|
||||
|
||||
Please see `:h <option>` in Vim for more information about the options mentioned.
|
||||
!!! note
|
||||
If you're using a [template](reference-config-file.md#template), you will
|
||||
have to use the template's file extension instead of `.jrnl`.
|
||||
|
||||
See `:h <option>` in Vim for more information about the options mentioned.
|
||||
|
||||
### Neovim
|
||||
|
||||
|
@ -171,22 +192,12 @@ vim.api.nvim_create_autocmd( {"BufNewFile","BufReadPre" }, {
|
|||
})
|
||||
```
|
||||
|
||||
!!! note
|
||||
If you're using a [template](reference-config-file.md#template), you will
|
||||
have to use the template's file extension instead of `.jrnl`.
|
||||
|
||||
Please see `:h <option>` in Neovim for more information about the options mentioned.
|
||||
|
||||
## Files in transit from editor to jrnl
|
||||
|
||||
When creating or editing an entry, `jrnl` uses a unencrypted temporary file on
|
||||
disk in order to give your editor access to your journal. After you close your
|
||||
editor, `jrnl` then deletes this temporary file.
|
||||
|
||||
So, if you have saved a journal entry but haven't closed your editor yet, the
|
||||
unencrypted temporary remains on your disk. If your computer were to shut off
|
||||
during this time, or the `jrnl` process were killed unexpectedly, then the
|
||||
unencrypted temporary file will remain on your disk. You can mitigate this
|
||||
issue by only saving with your editor right before closing it. You can also
|
||||
manually delete these files (i.e. files named `jrnl*.jrnl`) from your temporary
|
||||
folder.
|
||||
|
||||
## Plausible deniability
|
||||
|
||||
You may be able to hide the contents of your journal behind a layer of encryption,
|
||||
|
|
|
@ -59,7 +59,9 @@ value for journals that already have data in them.
|
|||
|
||||
### template
|
||||
The path to a text file to use as a template for new entries. Only works when you
|
||||
have the `editor` field configured.
|
||||
have the `editor` field configured. If you use a template, the editor's
|
||||
[temporary files](privacy-and-security.md#files-in-transit-from-editor-to-jrnl)
|
||||
will have the same extension as the template.
|
||||
|
||||
### tagsymbols
|
||||
Symbols to be interpreted as tags.
|
||||
|
|
|
@ -118,7 +118,7 @@ div.rst-content {
|
|||
background-size: 100%;
|
||||
}
|
||||
|
||||
a.icon-home:before {
|
||||
.wy-side-nav-search a.icon-home:before {
|
||||
display: block;
|
||||
width: 84px;
|
||||
height: 70px;
|
||||
|
|
49
docs_theme/breadcrumbs.html
Normal file
49
docs_theme/breadcrumbs.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
Copied from https://github.com/mkdocs/mkdocs/blob/master/mkdocs/themes/readthedocs/breadcrumbs.html
|
||||
Then lightly modified for accessibility
|
||||
-->
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="{{ nav.homepage.url|url }}" class="icon icon-home" aria-label="{% trans %}Docs{% endtrans %}"></a> »</li>
|
||||
{%- if page %}
|
||||
{%- for doc in page.ancestors[::-1] %}
|
||||
{%- if doc.link %}
|
||||
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> »</li>
|
||||
{%- else %}
|
||||
<li>{{ doc.title }} »</li>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
<li>{{ page.title }}</li>
|
||||
{%- endif %}
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
{%- block repo %}
|
||||
{%- if page and page.edit_url %}
|
||||
{%- if config.repo_name|lower == 'github' %}
|
||||
<a href="{{ page.edit_url }}" class="icon icon-github"> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||
{%- elif config.repo_name|lower == 'bitbucket' %}
|
||||
<a href="{{ page.edit_url }}" class="icon icon-bitbucket"> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||
{%- elif config.repo_name|lower == 'gitlab' %}
|
||||
<a href="{{ page.edit_url }}" class="icon icon-gitlab"> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||
{%- elif config.repo_name %}
|
||||
<a href="{{ page.edit_url }}">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||
{%- else %}
|
||||
<a href="{{ page.edit_url }}">{% trans %}Edit{% endtrans %}</a>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
</li>
|
||||
</ul>
|
||||
{%- if config.theme.prev_next_buttons_location|lower in ['top', 'both']
|
||||
and page and (page.next_page or page.previous_page) %}
|
||||
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{% trans %}Breadcrumb Navigation{% endtrans %}">
|
||||
{%- if page.previous_page %}
|
||||
<a href="{{ page.previous_page.url|url }}" class="btn btn-neutral float-left" title="{{ page.previous_page.title }}"><span class="icon icon-circle-arrow-left" aria-hidden="true"></span> {% trans %}Previous{% endtrans %}</a>
|
||||
{%- endif %}
|
||||
{%- if page.next_page %}
|
||||
<a href="{{ page.next_page.url|url }}" class="btn btn-neutral float-right" title="{{ page.next_page.title }}">{% trans %}Next{% endtrans %} <span class="icon icon-circle-arrow-right" aria-hidden="true"></span></a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
<hr/>
|
||||
</div>
|
|
@ -1,2 +1,2 @@
|
|||
mkdocs==1.2.4
|
||||
mkdocs>=1.4
|
||||
jinja2==3.1.2
|
||||
|
|
|
@ -123,6 +123,7 @@ class Journal:
|
|||
},
|
||||
)
|
||||
)
|
||||
self.write()
|
||||
|
||||
text = self._load(filename)
|
||||
text = self._decrypt(text)
|
||||
|
|
|
@ -5,6 +5,9 @@ theme:
|
|||
custom_dir: docs_theme
|
||||
static_templates:
|
||||
- index.html
|
||||
watch:
|
||||
- docs
|
||||
- docs_theme
|
||||
extra_css:
|
||||
- https://fonts.googleapis.com/css?family=Open+Sans:300,600
|
||||
- assets/colors.css
|
||||
|
|
3117
poetry.lock
generated
3117
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -51,7 +51,7 @@ flake8-type-checking = ">=2.2.0"
|
|||
flake8-simplify = ">=0.19"
|
||||
ipdb = "*"
|
||||
isort = ">=5.10"
|
||||
mkdocs = ">=1.0,<1.3"
|
||||
mkdocs = ">=1.4"
|
||||
poethepoet = "*"
|
||||
pytest = ">=6.2"
|
||||
pytest-bdd = ">=4.0.1,<6.0"
|
||||
|
|
|
@ -74,3 +74,19 @@ Feature: Installing jrnl
|
|||
date: none
|
||||
tags: none
|
||||
title: none
|
||||
|
||||
Scenario: Install jrnl with encrypted default journal with no entries
|
||||
Given we use no config
|
||||
And we use the password "test" if prompted
|
||||
When we run "jrnl -1" and enter
|
||||
encrypted.txt
|
||||
y
|
||||
n
|
||||
Then the error output should contain "Journal will be encrypted"
|
||||
And the default journal "encrypted.txt" should be in the "." directory
|
||||
And the config should contain "encrypt: true"
|
||||
And the version in the config file should be up-to-date
|
||||
When we run "jrnl -1"
|
||||
Then we should be prompted for a password
|
||||
And the error output should contain "no entries found"
|
||||
And the error output should not contain "Wrong password, try again"
|
||||
|
|
Loading…
Add table
Reference in a new issue