diff --git a/.build/generate_changelog.sh b/.build/generate_changelog.sh index ea586f4c..2e1d3f5c 100755 --- a/.build/generate_changelog.sh +++ b/.build/generate_changelog.sh @@ -59,6 +59,6 @@ git config --global user.email "jrnl.bot@gmail.com" git config --global user.name "Jrnl Bot" git checkout $BRANCH git add "$FILENAME" -git commit -m "Updating changelog [ci skip]" +git commit -m "Update changelog [ci skip]" git push https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git $BRANCH diff --git a/.build/gitlab-ci.yml b/.build/gitlab-ci.yml new file mode 100644 index 00000000..b4d4f491 --- /dev/null +++ b/.build/gitlab-ci.yml @@ -0,0 +1,36 @@ +# This file is a template, and might need editing before it works on your project. +# Official language image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/python/tags/ +image: python:latest + +# Change pip's cache directory to be inside the project directory since we can +# only cache local items. +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +# Pip's cache doesn't store the python packages +# https://pip.pypa.io/en/stable/reference/pip_install/#caching +# +# If you want to also cache the installed packages, you have to install +# them in a virtualenv and cache it as well. +cache: + paths: + - .cache/pip + +before_script: + - python -V # Print out python version for debugging + - pip install poetry + +release: + rules: + - if: $RELEASE != null + script: + - git config --global user.email "jrnl.bot@gmail.com" + - git config --global user.name "Jrnl Bot" + - git checkout "$CI_COMMIT_BRANCH" + - poetry version "$RELEASE" + - echo __version__ = \"$RELEASE\" > jrnl/__version__.py + - git add pyproject.toml jrnl/__version__.py + - git commit -m "Increment version to ${RELEASE}" + - git tag -a -m "$RELEASE" "$RELEASE" + - git push --follow-tags "https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git" "$CI_COMMIT_BRANCH" diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..d47e847c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.journal text eol=lf +*.feature text eol=lf diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 02c0c251..d93d1422 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,20 +7,36 @@ assignees: '' --- -## Bug report +## Bug Report + -Hello! Thank you for reporting an issue! -If you would fill out the below points, that would make our process a whole lot easier! + +### Environment + - Jrnl version: + - Install method: + - OS -* **Please tell us about your environment:** - - Jrnl version: (run `jrnl -v`) - - How you installed Jrnl - - Operating system [MacOS, Linux, Windows?] +### Current Behavior + -* **What is the current behavior?** +### Expected Behavior + -* **Please provide the steps to reproduce and if possible a minimal demo of the problem** +### Repro Steps + -* **What is the expected behavior?** - -* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) +### Other Information + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 8690ad71..d9061604 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,12 +8,24 @@ assignees: '' --- ## Feature Request + -Hello! Thank you for reporting an issue! -If you would fill out the below points, that would make our process a whole lot easier! +### Use Case/Motivation + -* **What is the motivation / use case for changing the behavior?** +### Example Usage + -* **Please provide examples of the usage** - -* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) +### Other information + diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md index d9608885..04c2a217 100644 --- a/.github/ISSUE_TEMPLATE/support_request.md +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -7,20 +7,33 @@ assignees: '' --- -## Support request +## Support Request + -Hello! Thank you for reporting an issue! -If you would fill out the below points, that would make our process a whole lot easier! +### Environment + + - Jrnl version: + - Install method: + - OS -* **Please tell us about your environment:** +### What are you trying to do? + - - Jrnl version: (run `jrnl -v`) - - How you installed Jrnl +### What have you tried? + - - Operating system [MacOS, Linux, Windows?] - -* **What are you trying to do?** - -* **What have you tried?** - -* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) +### Other Information + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 986f10ee..cea2848c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,19 +1,26 @@ + -*Short block of text containing: -- Relevant changes in text form -- related issues -- Motivation (if applicable) -- Example of usage (if applicable) -- Example of changes to config files (if applicable) -* ### Checklist -- [ ] The code change is tested and works locally. -- [ ] Tests pass. Your PR cannot be merged unless tests pass -- [ ] There is no commented out code in this PR. -- [ ] Have you followed the guidelines in our Contributing document? -- [ ] Have you checked to ensure there aren't other open [Pull Requests](../pulls) for the same update/change? -- [ ] Have you added an explanation of what your changes do and why you'd like us to include them? -- [ ] Have you written new tests for your core changes, as applicable? + +- [ ] I have read the [contributing doc](https://github.com/jrnl-org/jrnl/blob/develop/CONTRIBUTING.md). +- [ ] I have included a link to the relevant issue number. +- [ ] I have tested this code locally. +- [ ] I have checked to ensure there aren't other open [pull requests](../pulls) + for the same issue. +- [ ] I have you written new tests for these changes, as needed. +- [ ] All tests pass. + diff --git a/.github/lock.yml b/.github/lock.yml new file mode 100644 index 00000000..8a093a62 --- /dev/null +++ b/.github/lock.yml @@ -0,0 +1,39 @@ +# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app + +# Number of days of inactivity before a closed issue or pull request is locked +daysUntilLock: 90 + +# Skip issues and pull requests created before a given timestamp. Timestamp must +# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable +skipCreatedBefore: false + +# Issues and pull requests with these labels will be ignored. Set to `[]` to disable +exemptLabels: [] + +# Label to add before locking, such as `outdated`. Set to `false` to disable +lockLabel: ':lock:' + +# Comment to post before locking. Set to `false` to disable +lockComment: > + This thread has been automatically locked since there has not been + any recent activity after it was closed. Please open a new issue for + related bugs. You can link back here from your new issue to continue + the conversation. + +# Assign `resolved` as the reason for locking. Set to `false` to disable +setLockReason: true + +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings just for `issues` or `pulls` +# issues: +# exemptLabels: +# - help-wanted +# lockLabel: outdated + +# pulls: +# daysUntilLock: 30 + +# Repository to extend settings from +# _extends: repo diff --git a/.travis.yml b/.travis.yml index ee6b3a3c..5590ccef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -129,19 +129,9 @@ jobs: env: TZ: America/Edmonton - # Changelog for Unreleased changes - - stage: Update Changelog - if: (tag IS present) OR (branch = develop AND type NOT IN (pull_request)) - install: - - echo 'Skipping install' - script: - - ./.build/generate_changelog.sh - - stage: Deploy if: tag IS present before_deploy: - - poetry version "$TRAVIS_TAG" - - echo __version__ = \"$TRAVIS_TAG\" > jrnl/__version__.py - poetry build script: - echo "Deployment starting..." @@ -150,12 +140,13 @@ jobs: script: poetry publish skip_cleanup: true on: - branch: master - tags: true - after_deploy: - - git config --global user.email "jrnl.bot@gmail.com" - - git config --global user.name "Jrnl Bot" - - git checkout master - - git add pyproject.toml jrnl/__version__.py - - git commit -m "Incrementing version to ${TRAVIS_TAG} [ci skip]" - - git push https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git master + all_branches: true + + # Changelog for Unreleased changes + - stage: Update Changelog + if: (tag IS present) OR (branch = develop AND type NOT IN (pull_request)) + install: + - echo 'Skipping installation step' + script: + - ./.build/generate_changelog.sh + diff --git a/CHANGELOG.md b/CHANGELOG.md index 454e94c6..6c4761c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,25 +21,59 @@ ## [Unreleased](https://github.com/jrnl-org/jrnl/) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3.1...HEAD) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.4.2...HEAD) **Implemented enhancements:** -- Upgrade license to GPLv3 [\#918](https://github.com/jrnl-org/jrnl/pull/918) ([wren](https://github.com/wren)) +- Speed up jrnl by 10%, improve slow imports [\#959](https://github.com/jrnl-org/jrnl/pull/959) ([wotgl](https://github.com/wotgl)) + +**Fixed bugs:** + +- Fix title splitting logic to account for both newlines and periods [\#958](https://github.com/jrnl-org/jrnl/pull/958) ([eshrh](https://github.com/eshrh)) +- Fix editor config when an argument with a space is used [\#953](https://github.com/jrnl-org/jrnl/pull/953) ([wren](https://github.com/wren)) +- Ask for password before adding entry instead of after [\#951](https://github.com/jrnl-org/jrnl/pull/951) ([ollybritton](https://github.com/ollybritton)) +- Fix duplicate text in multiple tag search [\#948](https://github.com/jrnl-org/jrnl/pull/948) ([micahellison](https://github.com/micahellison)) **Build:** -- Update makefile to match pipeline better [\#919](https://github.com/jrnl-org/jrnl/pull/919) ([wren](https://github.com/wren)) +- Fix for hanging Windows tests on Travis [\#969](https://github.com/jrnl-org/jrnl/pull/969) ([wren](https://github.com/wren)) +- Ensure test data is always checked out with LF line endings [\#965](https://github.com/jrnl-org/jrnl/pull/965) ([micahellison](https://github.com/micahellison)) +- Update lockbot comment to encourage linking to issue [\#941](https://github.com/jrnl-org/jrnl/pull/941) ([MinchinWeb](https://github.com/MinchinWeb)) **Updated documentation:** -- Docs: editing config isn't always destructive [\#923](https://github.com/jrnl-org/jrnl/pull/923) ([Epskampie](https://github.com/Epskampie)) +- Cleaned up usage.md for clarity, formatting, and grammar. [\#956](https://github.com/jrnl-org/jrnl/pull/956) ([guydebros](https://github.com/guydebros)) -# Changelog +## [v2.4.2](https://pypi.org/project/jrnl/v2.4.2/) (2020-05-09) -## [Unreleased](https://github.com/jrnl-org/jrnl/) +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.4.1...v2.4.2) -[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3.1...HEAD) +**Fixed bugs:** + +- Prevent filtered delete from deleting journal [\#935](https://github.com/jrnl-org/jrnl/pull/935) ([micahellison](https://github.com/micahellison)) + +**Build:** + +- Make sure testing cleans up after itself [\#940](https://github.com/jrnl-org/jrnl/pull/940) ([wren](https://github.com/wren)) +- Allow most recent pytz version and update dependencies [\#937](https://github.com/jrnl-org/jrnl/pull/937) ([micahellison](https://github.com/micahellison)) +- Use gitlab to trigger releases in pipeline [\#947](https://github.com/jrnl-org/jrnl/pull/947) ([wren](https://github.com/wren)) + +**Updated documentation:** + +- Change jrnl.sh GitHub new issue link to issue template chooser [\#936](https://github.com/jrnl-org/jrnl/pull/936) ([micahellison](https://github.com/micahellison)) +- Improve privacy, security, and encryption documentation \#896 [\#925](https://github.com/jrnl-org/jrnl/pull/925) ([micahellison](https://github.com/micahellison)) + +## [v2.4.1](https://pypi.org/project/jrnl/v2.4.1/) (2020-05-02) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.4...v2.4.1) + +**Fixed bugs:** + +- Disable --delete due to critical bug [\#934](https://github.com/jrnl-org/jrnl/pull/934) ([wren](https://github.com/wren)) + +## [v2.4](https://pypi.org/project/jrnl/v2.4/) (2020-04-25) + +[Full Changelog](https://github.com/jrnl-org/jrnl/compare/v2.3.1...v2.4) **Implemented enhancements:** @@ -67,6 +101,8 @@ - Update twitter buttons, contribution in footer [\#905](https://github.com/jrnl-org/jrnl/pull/905) ([wren](https://github.com/wren)) - Change install doc guideline from pip to pipx [\#904](https://github.com/jrnl-org/jrnl/pull/904) ([micahellison](https://github.com/micahellison)) - Update twitter buttons, contribution in footer [\#905](https://github.com/jrnl-org/jrnl/pull/905) ([wren](https://github.com/wren)) +- Clean up readme file [\#924](https://github.com/jrnl-org/jrnl/pull/924) ([wren](https://github.com/wren)) +- Clarify that editing config isn't always destructive [\#923](https://github.com/jrnl-org/jrnl/pull/923) ([Epskampie](https://github.com/Epskampie)) ## [v2.3](https://pypi.org/project/jrnl/v2.3/) (2020-03-21) diff --git a/docs/encryption.md b/docs/encryption.md index 9909af67..806064b3 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -31,40 +31,20 @@ your journal. If you don’t initially store the password in the keychain but decide to do so at a later point – or maybe want to store it on one computer but -not on another – you can simply run `jrnl --encrypt` on an encrypted +not on another – you can run `jrnl --encrypt` on an encrypted journal and use the same password again. ## A note on security -While jrnl follows best practises, true security is an illusion. -Specifically, jrnl will leave traces in your memory and your shell -history – it’s meant to keep journals secure in transit, for example -when storing it on an -[untrusted](http://techcrunch.com/2014/04/09/condoleezza-rice-joins-dropboxs-board/) -services such as Dropbox. If you’re concerned about security, disable -history logging for journal in your `.bashrc`: +While `jrnl` follows best practices, total security is an illusion. +There are a number of ways that people can at least partially +compromise your `jrnl` data. See the [Privacy and Security](./security.md) +documentation for more information. -``` sh -HISTIGNORE="$HISTIGNORE:jrnl *" -``` +## No password recovery -If you are using zsh instead of bash, you can get the same behaviour by -adding this to your `zshrc`: - -``` sh -setopt HIST_IGNORE_SPACE -alias jrnl=" jrnl" -``` - -If you are using `fish` instead of `bash` or `zsh`, you can get the same behaviour by -adding this to your `fish` configuration: - -``` sh -abbr --add jrnl " jrnl" -``` - -To delete existing `jrnl` commands from `fish`’s history, run -`history delete --prefix 'jrnl '`. +There is no method to recover or reset your `jrnl` password. If you lose it, +your data is inaccessible. ## Manual decryption diff --git a/docs/recipes.md b/docs/recipes.md index a702b9d6..92399591 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -73,7 +73,7 @@ jrnlimport () { !!! note Templates require an [external editor](./advanced.md) be configured. -A template is a code snippet that makes it easier to enter use repeated text +A template is a code snippet that makes it easier to use repeated text each time a new journal entry is started. There are two ways you can utilize templates in your entries. diff --git a/docs/security.md b/docs/security.md new file mode 100644 index 00000000..e8525b78 --- /dev/null +++ b/docs/security.md @@ -0,0 +1,74 @@ +# Privacy and Security + +`jrnl` is designed with privacy and security in mind, but there are some +limitations to be aware of. + +## Password strength + +`jrnl` doesn't enforce password strength requirements. Short or commonly-used +passwords can easily be circumvented by someone with basic security skills +and access to your encrypted `jrnl` file. + +## Shell history + +Since you can enter entries from the command line, any tool +that logs command line actions is a potential security risk. See +below for how to deal with this problem in various shells. + +### bash + +You can disable history logging for jrnl in your `.bashrc`: + +``` sh +HISTIGNORE="$HISTIGNORE:jrnl *" +``` + +### zsh + +Disable history logging by adding this to your `zshrc`: + +``` sh +setopt HIST_IGNORE_SPACE +alias jrnl=" jrnl" +``` + +### fish + +Add this abbreviation to your `fish` configuration to run jrnl with +a space before it, which prevents `fish` from logging it: + +``` sh +abbr --add jrnl " jrnl" +``` + +To delete existing `jrnl` commands from `fish`’s history, run +`history delete --prefix 'jrnl '`. + +### Windows Command Prompt + +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 its +history after journaling. + +## Files in transit from editor to jrnl + +When creating or editing an entry, `jrnl` uses a plain text temporary file on disk +to give your editor access to it. `jrnl` deletes the temporary file when it +saves the entry back to your journal. + +If you save an entry but haven't closed your editor yet, and your computer shuts +off or the `jrnl` process is killed, the entry remains on your disk as a +temporary file. You can mitigate this issue by only saving with your editor +right before closing it. + +## Plausible deniability + +You may be able to hide the contents of your journal behind a layer of encryption, +but if someone has access to your configuration file, then they can figure out that +you have a journal, where that journal file is, and when you last edited it. +With a sufficient power imbalance, someone may be able to force you to unencrypt +it through non-technical means. + +## Notice any other risks? + +Please let the maintainers know by [filing an issue on GitHub](https://github.com/jrnl-org/jrnl/issues). \ No newline at end of file diff --git a/docs/theme/index.html b/docs/theme/index.html index 89aa3641..00391e14 100755 --- a/docs/theme/index.html +++ b/docs/theme/index.html @@ -95,7 +95,7 @@