Commit graph

114 commits

Author SHA1 Message Date
Jonathan Wren
a77a3d5a56
Replace flake8 with flakeheaven in linting steps (#1625)
* replace flake8 with flakeheaven

* update pyproject.toml for new flake tool

* update lock file

* change flake8 to flakeheaven in tests

* undo fix for poetry

* remove unused plugin marker for flakeheaven

* remove unused import in markdown file

* Attempt to exclude .venv from flakeheaven runs in CI

* Exclude more dirs from flakeheaven

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2022-10-29 14:21:11 -07:00
Micah Jerome Ellison
6f9a3eb536
Document that editors must be blocking processes (#1624)
* Describe blocking processes in External Editors page
* Add documentation about how the editor must be a blocking process
* Add contextual link to external editor site
* Point to micro editor as an example since it's likely less intimidating than vim
2022-10-29 12:14:28 -07:00
Micah Jerome Ellison
c6479c70c1 Add contextual link to external editors page from overview 2022-10-29 11:51:41 -07:00
DSiekmeier
48c528d76a
Remove wrong option in configuration file reference (#1618) 2022-10-22 14:28:34 -07:00
Kevin
b5a22379b8
Update YAML export description in docs (#1591) 2022-09-10 11:48:20 -07:00
Paul Jimenez
b2f53d48f7
Add hint for how to get vi to go to end-of-file (#1563) 2022-09-03 12:48:37 -07:00
Micah Jerome Ellison
57adea3cc1
Remove note about gh-pages branch that we no longer use (#1566) 2022-08-27 13:56:03 -07:00
Jonathan Wren
4eb9c9fdec
Clean up copyright notices and version screen (#1553)
* update copyright symbols to unicode

* clean up version screen/copyright notice

* small change to make commands more similar

* update imports to appease isort

* fix test

* update one more file merged since PR was open
2022-08-21 14:17:35 -07:00
Jonathan Wren
671f403602
Fix docs pipeline, make docs tests easier to run locally and on different OSes (#1554)
* update docs pipeline to use poe task runner

* move npm dependency into package.json file instead of hardcoding into pipeline

* replace nix-specific call with python version (for windows compat)

* update commands to use python for win compat

* update lock file

* change deps to take out xq and use xmltodict instead

* move script tasks from pyproject into new tasks.py

* run linting on new tasks.py file

* fix typo

* clean up pyproject to make valid toml

* update docs with correct task runner command

* use npx in case node_modules/.bin isn't in the path

* Run pa11y-ci in cross-platform manner (works on Windows)

* Add node_modules to .gitignore

* clean up poe alias

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2022-08-21 13:47:25 -07:00
Jonathan van der Steege
80bfff384e
Add linewrap option 'auto' (#1507)
* Add linewrap option 'auto'

* Specify the exception thrown

* Add BDD test

* Specify name instead of number

* Create test for linewrap auto and fancy format

* Fix linewrap auto for fancy format
2022-07-30 12:22:04 -07:00
Jonathan Wren
51ab747019
Replace make with python alternative (poe) (#1503)
* Get rid of `make` in favor of `poe`

This moves the tasks that were previously in Makefile, into
pyproject.toml (with all the other config)

This is also more inclusive of Windows developers since they only need
Python, and no longer have to install make separately.

* udpate docs

* don't make code blocks also links
2022-06-18 11:36:56 -07:00
Jonathan Wren
f5e052937c
Update copyright year (#1502)
Update copyright year in comment headers and --version output
2022-06-18 11:30:56 -07:00
Jonathan van der Steege
e758986985
Create folder if config ends with (back)slash (#1492)
* Check config if FolderJournal and treat as so

* Add test for end of path is slash

* Code format correction

* Requested changes PR 1482

* Add info to doc about path of folder.

* Small addition to doc about folder journal
2022-06-04 13:20:51 -07:00
Micah Jerome Ellison
11209b4b42
Document --change-time in web-based docs' command line reference (#1471)
* Document change-time in command line reference
* Keep mkdocs version under 1.3 both locally and for readthedocs
2022-05-21 14:13:24 -07:00
Micah Jerome Ellison
972af21bca
Add reference documentation to docs site and separate out "Tips and Tricks" and "External Editors" from "Recipes" (#1332)
* First draft of command line reference, mostly pulled from help screen

* Add first draft of config file reference, mostly pulled from advanced.md

* Clean up config file doc for readability

* Add --config-file and remove examples from CLI reference

* Add warning about time zone in timeformat

* More small changes, and adding template config keyword

* Cleaning up and re-ordering config file reference

* Clean up reference and anything else from advanced documentation that can live elsewhere and linking to config file reference wherever config file is mentioned

* Fix syntax highlighting in command line reference, clean up content a bit, include --diagnostic

* Mention version config key

* Apply minor changes suggested in PR review

* Rename "recipes" to "Tips and Tricks", pull "External Editors" out of it into its own page, and redirect old recipes link to tips-and-tricks

* Revert broken mkdocs-redirects usage from last commit
2022-02-05 12:59:20 -08:00
samuelgregorovic
ae009099ed
Add --config-file argument to use alternate config file at runtime (#1290)
* added new CLI argument option --config-file

* pass argument and fetch alt config file if specified

* argparse argument setting update

* argument alias --cf added

* documentation update - usage of CLI argument

* fixed name-clash + unit tests

* feature test added

* #1170-alternate-config-file: Auto stash before rebase of "refs/heads/#1170-alternate-config-file"

* Update docs/advanced.md

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>

* BDD tests added

* Begin migrating/rewording --cf tests in pytest-bdd.

Uses current directory instead of deep directory structure, but requires a given for each config file referenced

* Fix issue where specifying a config-file that needs to be upgraded ended up upgrading the user config file instead

* Uncomment and rework remaining tests for pytest-bdd instead of behave

* Fix copytree for Python 3.7 (which doesn't support dirs_exist_ok)

* Minor fixes to alternative config examples

* Remove behave tests (behave is no longer in use)

* Move config file unit test to unit test dir and use pytext path fixture instead of current directory to find test data

* Use explicit "given the config exists" for copying config files instead of shoehorning in "given we use the config" twice

* Change when/when to when/and

* Clarify scenarios and fix indentation

* Confirm primary config file isn't modified when encrypting/decrypting a journal in an alternate config file

* Remove try/except on copytree since I'm no longer using the same

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-11-06 14:12:34 -07:00
Micah Jerome Ellison
b1ba88c138
Migrate contributing.md to docs site (#1266)
* Initial migration of contributing.md to docs site
* Update contributing to include pytest-bdd changes
* add top level section support, and h2 support in sidebar
* Incorporate latest changes to contributing.md, clean up language and formatting, and check/add links as necessary
* Add a link to milestones
* Update CONTRIBUTING.md

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2021-10-16 15:21:49 -07:00
Gianluca Mondini
156ddee97c
Fix recipe 'Launch a terminal for rapid logging' (#1351) 2021-10-16 14:37:43 -07:00
Fidel H Viegas
9f5c2f6829
Add recipe for visualizing Markdown in the CLI (#1354)
* Added Recipe for visualizing Markdown in the CLI, fixed some typos and added backticks in all references of jrnl

* mdless recipe changes during review

-condense language
-make it sound less like an endorsement
-add link about less
-minor grammatical change

Co-authored-by: Fidel H Viegas <me@fidelhviegas.com>
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-10-16 13:52:13 -07:00
Micah Jerome Ellison
614be34081
Document journal types (#1331)
* Add docs section for journal types
* Include new journal types docs section in site nav
* Add section on changing a journal type and clean up work from previous commit
2021-09-18 16:26:28 -07:00
Micah Jerome Ellison
31f782e333
Add documentation about saved passwords in Windows (#1301)
* Add note about saved passwords
* Add missing yq dep back in to allow xq to run in mkdocs CI pipeline
2021-07-17 13:22:01 -07:00
Mandar Vaze
b357f935d4
Docs: Add emacs as external editor to recipes (#1220)
Add emacs as external editor to recipes
2021-03-27 13:21:44 -07:00
Suhas
4f79803885
Allow runtime configuration overrides from the commandline (#1169)
Add --config-override feature

* add test and argument handler for runtime override of configurations.
* identify location to apply override in "main"
* update gitignore
* remove unneeded import
* add jrnl interface test for overriden configurations
* trivial whitespace change
* implement runtime override
* make format
* refactor override unittest
* clean up unused import
* start writing integration test
* add linewrap override scenario
* implement editor override step
* add dev dependencies on pytest -mock and -cov
* make format
* remove unused imports
* make format
* rename --override to --config-override
* move override implementation into own module
* begin TDD of dot notated overrides
* rewrite behavior scenario
* implement recursive config overrides
* clean up unittests
* iterate on behave step
* make format
* cleanup
* move override behave tests out of core
* refactor recursive code
* make format
* code cleanup
* remove unused import
* update test config
* rewrite test for better mock call expect
* make format
* binary search misbehaving windows test
* unittest multiple overrides
* uncomment dot notation unittest
* add multiple override scenario spec
* make format
* make format
* update unittests for new syntax
* update integ tests for new syntax
* update gitignore
* guard override application
* deserialize function as return type
* make format
* organize deserialization unittests
* better, more specific behave tests
* test different editor launch commands
* formatting
* handle datatypes in deserialization and update helptext
* stick to config convention in testbed
* update tests ith better verifications
* make format
* space
* review feedbac
* make format
* skip on win
* update deps
* update tests with better verifications
make format
space
review feedbac
* skip on win
* update deps
* refactor deserialization
organize test_parse_args
make format
* skip on win
* refactor deserialization
organize test_parse_args
make format
* update tests ith better verifications
* make format
* space
* make format
* document apply_overrides
* update gitignore
* document config-override enhancement
* Simplify config override syntax (#5)
* update tests and expected behavior
* clean up arg parsing tests
* update deserialization
* update deserialization
* config argparse action
* update override application logic
* update tests; delete unused imports
* override param must be list
* update docstring
* update test input to SUT
* update remaining override unittests
* make format
* forgot to update CLI syntax
* update documentation to sphinx style
* variable renames
* Lockfile merge (#7)
* Add brew and gitter badges to README
* Update changelog [ci skip]
* Make journal selection behavior more consistent when there's a colon with no date (#1164)
* Simplify config override syntax (#8)
* update tests and expected behavior
* clean up arg parsing tests
* update deserialization
* update deserialization
* config argparse action
* update override application logic
* update tests; delete unused imports
* override param must be list
* update docstring
* update test input to SUT
* update remaining override unittests
* make format
* forgot to update CLI syntax
* formatting
* Update pyproject.toml
* update lockfile to remove pytest-cov and pytest-mock deps
* update docs
* reuse existing mock; delete unneeded code
* move overrides earlier in the execution
use existing configs instead of custom
make format
clean up imports
* update for passworded access
context.parser -> parsed_args
* test that no editor is launched
* remove unnecessary mocks
* rename variable for intent
* reinstate getpass deletion
* update gitignore
* capture failure mode
* remove unneeded imports
* renamed variable
* delete redundant step
* comment on step
* clean up step behavior description
* [WIP] lock down journal access behavior
* skip -> wip
* correct command for overriding journal via dot keys
* update wip test for updating a "temp" journal and then reading baack its entries
* remove "mock" from poetry file
* make CI happy
* complex behavior sequence for default journal override
* separate out smaller pieces of logic
test that apply_overrides acts on base configuration and not the copy
* defer modification of loaded configuration to update_config
remove unused fixtures
delete complicated UT since behavior is covered in overrides.feature integ test
delete redundant UT
* Update .gitignore
* remove skip_win
* forward override unpacking to yaml library
* merge config override step with existing config_var step in core
delete config_override step
unify step description syntax
* delete unused and redundant code
* rebases are hard
* remove wip tag from test
* remove skipped tests for windows
* Address code review
yield -> return
remove needless copy
adjust spacing
re-inline args return
reset packaging info to e6c0a16342
revert package version for this PR
* consolidate imports
* Defer config_override unpacking to dict *after* base config is loaded
store cli overrides without unpacking just yet
move deserialize_config_args to config module
delete custom Action class for config operations
apply [k,v] -> {k, v} for each override
update test data
update import
* rename deserialize_config_args to better express intent
make format
2021-03-02 18:47:57 -08:00
Suhas
67682e7e93
Add per-journal config documentation (#1199)
* update documentation with example config

* make format

* clarify meaning of config
2021-02-27 10:53:21 -08:00
Micah Jerome Ellison
897943857d
Simplify VS Code documentation for all platforms and add note about PATH variable (#1160) 2021-01-23 13:35:32 -08:00
Seopril
dbd12fc500
Clarify installation documentation (#1097) (#1137)
* Clarify installation documentation (#1097)
* Update installation docs
2021-01-09 12:39:06 -08:00
Micah Jerome Ellison
9fe56b9e10
Comply with GPL by acknowledging all authors and including license info in each source file (#1121)
* Update authors to "jrnl contributors" to comply with GPL3
* Include jrnl email address with contributors
* Include GPL notice in jrnl --version
* Apply consistent copyright and license to all Python files
* Add copyright and license to documentation
* Add copyright and license to docs theme
* Wiping poetry cache to try to resolve a test issue
* Testing with Python 3.9.0 in attempt to bypass GitHub Actions failure in 3.9.1
* make format
* Exclude Windows Python 3.9 build which is failing due to a GitHub Actions problem
* Modify testing to get around this 3.9 issue...
* Fix exclude
2020-12-19 22:28:22 -08:00
Manuel Ebert
e03021a94c
Fixes lone closing parenthesis in docs (#1118)
Look, this might me my least ambitious commit ever, but having mismatched parentheses has crashed the internet before, so let's rather be safe than sorry!
2020-12-15 17:50:00 -08:00
Jonathan Wren
558d331d66
Make docs site (jrnl.sh) fully meet Web Content Accessibility Guidelines (WCAG) 2.1 (#1105)
* add some attribtutes to docs template for accessbility

* fix colors to meet accessibility guidelines (4.5 contrast ratio for text)

* Fix last remaining pa11y error (no button on search form)

This fix required moving the mkdocs theme out of the docs directory.
It's no in the docs_theme directory, and the mkdocs config is updated
accordingly.

* Re-enable accessibility testing for docs sit

Also, move the pa11y script into the gh actions workflow

* clean up linting issues in css

* fix and standardize link colors across site

* fix twitter button opacity making text fail contrast requirements

* move buttons on docs site index nav, tweak font weights

* fix footer opacity, tweak spacing of the now more visible sections of the page

* change font sizes on index page to meet WCAG

* udpate font sizes site-wide for accessibility

* fix sidebar for accessibility (font sizes and color contrasts)

* restyle code blocks to have dark background, and meet accessibility requirements

* standardize (accessible) colors across docs site
2020-12-12 12:05:12 -08:00
Jonathan Wren
514ee309b8
Add logo to readme (#1085)
* add logo to readme

* update url for image

* rename file to be more clear about where it goes
2020-11-21 11:22:54 -08:00
Micah Jerome Ellison
5b029e6117
Documentation updates (#1032)
* Applying doc changes based on reviews of past several documentation PRs
* Update docs
  Clean up encryption docs
  Clean up security docs
  Delete export.md
  Make new formats.md and add to sidebar. Also add all of the built-in formats, and examples for each.
  Update mkdocs config for new files

* Fix broken docs links
* Correct incomplete sentences and markdown formatting issues
* Make overview a little more concise
* Update some command line arguments to latest version and make it a bit more concise
* Clean up unneeded TOML modifications and other scaffolding not needed for 3.9
* Revert "Clean up unneeded TOML modifications and other scaffolding not needed for 3.9"
  This reverts commit 13b4266ed1.
* Specify that brew is also the easiest way to install jrnl on Linux
* Update docs/security.md
* Update docs/recipes.md
* Doc updates:
- Remove import/export page, fold it into formats
- Rename security to privacy-and-security.md to avoid conflation w/ github security issues
- Various small cleanup and edits from PR review

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
2020-10-24 15:41:58 -07:00
joaquin garmendia
8c2de0e6d7
Add display format option to config file. (#1050)
* Add display format option to config file.
* Add tests.
* Fix `black` error.
* Change nested if to top level.
2020-10-17 18:53:34 -07:00
Jonathan Wren
ced8d251d9
Change styling of terminal on docs site, small copy changes (#1038)
The terminal now overlaps the header (the purple area at the top of the
page) and the main area (the white area underneath). This draws more
focus to it, and quite literally puts the terminal front and center.

This also fixes a few typos, and updates the commands in the terminal to
match jrnl v2.5 updates.
2020-09-05 12:07:47 -07:00
Jonathan Wren
29234ddc35
Documentation updates (Thanks @guydebros!) (#1031)
* updated README.md:

- corrected information about encryption
- made additions based on proposed changes to overview.md
- made other changes for clarity and grammar

* ongoing changes to overview.md

* added note that `pycrypto` is required

made other small changes for grammar and clarity

* added new python decryption script to encryption.md

* updated encryption.md to clarify dependencies

other relatively small changes for clarity

straightened quotes

Co-authored-by: Guy B. deBros <guydebros@users.noreply.github.com>
2020-08-22 12:13:36 -07:00
Dacoda Nelson
5eaf94a18f
Updated advanced.md in docs to reflect all four subkeys under colors in the config files. (#1023) 2020-08-08 11:44:50 -07:00
Jonathan Wren
40a40af952
Fix readthedocs.io build process (#1004)
* fix readthedocs.io build process
2020-07-25 16:34:17 -07:00
Guy B. deBros
ca73c74a8e Extensive modifications to overview.md (#957)
* Extensive modifications to overview.md.

I tried to add clarity and details while maintaining the spirit of the original
document. However, it might be a bit too 'dry' now. I'd be happy to liven it up
a bit. I'm only serious when I feel like I _have_ to be.

One of my opinions (which may be at odds with yours) is that the documentation
should emphasize `jrnl`'s advantages without downplaying any other existing
solutions.

If I have time, I'd like to add more information about the documented benefits
of journaling, particularly the mental health aspects. That will probably need
its own page, but I'm new here, so I don't want to overstay my welcome. :)

* More changes to overview.md in response to feedback

"why keep a journal" section removed -- it could be re-added as its own page,
but it's not front-page material

* More changes to overview.md:
- fixed up the headings
- added information about multi-platform support

This is a work in progress and _not_ ready for prime-time.
- need to add to Command-Line Interface section, among other things

* More changes to overview.md:

- moved "`jrnl` is a simple..." to "Command-Line Interface" section
2020-06-06 12:43:28 -07:00
Guy B. deBros
ce0dd6881c Cleaned up usage.md for clarity, formatting, and grammar. (#956)
* Cleaned up usage.md for clarity, formatting, and grammar.

While working on it, I hard-wrapped the lines to 80 characters. Hope that doesn't complicate things.

Note: I changed the Steve Buscemi quote to maintain compliance with the Code of Conduct.

* more changes to the usage page

Includes information about two new functions (`--delete`) and (`-contains`).
It's starting to look quite different from the original...
2020-05-27 14:07:43 -07:00
Matt Abrams
aad2af1a8d typo in recipes.md (#952)
typo in recipes.md. two verbs in a row. only one is needed :)
cheers
mja
2020-05-16 11:27:52 -07:00
Micah Jerome Ellison
4df4e56a96 Improve privacy, security, and encryption documentation #896 (#925)
* Improve privacy, security, and encryption documentation #896
* Use gentler language and ensuring documentation does not read like legal advice
2020-05-06 18:14:44 -07:00
Micah Jerome Ellison
683a0bac6c Change github new issue link to issue template chooser (#936) 2020-05-05 12:51:03 -07:00
Epskampie
473187f4b8 Docs: editing config isn't always destructive (#923)
Editing the config file doen't always destroy your journal, luckily :-)
2020-04-25 10:31:38 -07:00
Jonathan Wren
333dbca783 Update twitter buttons, contribution in footer (#905) 2020-04-10 16:18:34 -07:00
Micah Jerome Ellison
79d2bd5ec7 Change install doc guideline from pip to pipx and mention minimum Python version 2020-04-10 16:18:34 -07:00
Nathan Genetzky
327af80997 docs: Update url for "beautiful timeline" in export.md (#879)
The previous URL was invalid. Used way back time machine, and at least at some point a redirect was setup to this site.
2020-04-10 11:51:56 -07:00
Aaron Lichtman
9e5d160bbd Pretty print journal entries (#692)
* Pretty print journal entry titles and dates.

Changes appearance of all jrnl viewing commands, such as $ jrnl --short and
$ jrnl -n {NUM}.

Fix #508

* Removed extra newline at end of title

* Use ansiwrap to properly wrap strings with ANSI escapes

* Add ansiwrap to pyproject.toml

* Allow configuration of colors

- Replaced raw escapes with colorama
- Added colors key to config
- Add checks for validity of color values

* Add color configuration documentation

* Fix broken tests due to config change

* Add tests for colors in configs

- Identifying invalid color configs
- Upgrading config from no colors -> colors

* Add colorama dependency for all platforms

* Allow users to disable colorization of output

* Update poetry.lock

* Add tag and body color customization options

* Fix colorization of tags in title and body

* Updated tests to use no color by default

* Change pass to continue in verify_config()

* Better style in Entry.py

* Reduce code duplication for tag highlighting

- Breaks "unreadable date" regression test for unknown reason

* Properly colorize tags and print body

* Reformatting and clean up

* Replace list comprehension with generator

* Handle invalid colors by not using a color

* Process ANSI escapes properly with behave

* Fixed the 'spaces after tags directly next to punctuation' bug

Broke processing of tags next to any punctuation at all

* Closer to working tag colorization but not perfect

* Add tests printing for multiline journals

Fix #717

* Correctly indent first line of multiline entry

* Add test for multiline entries with tags

* Remove redundant UNICODE flag

* Progress towards proper tag colorization and body formatting

* Fix newline colorization bug

Debug code left intact since there are more bugs to fix :/

* And now the space just ends up before the tag instead of after it

* Fix assertion syntax warning

* Moved tag test to tagging.feature file

* Strip out debug code and clean up

* Bold datetimes in title

* Bold all titles

Fix #720

* Remove PY2 and PY3 constants

* Fix regression in features/steps/core.py

* Fix tag_regex

* Remove redundant re.UNICODE flag

* Remove extraneous code
2020-04-10 11:51:56 -07:00
Aurélien Ooms
1b3d2961a1 docs: Fix fish history instructions.
Use `--add` flag in fish `abbr` command.
2020-04-10 11:51:56 -07:00
Leroy van Logchem
55eff3b777 Update recipes.md
Fixed links to various documentation files
2020-04-10 11:51:56 -07:00
Jonathan Wren
4190494a4f Get rid of dumb sex joke (#840)
These kinds of jokes make us look bad, and have gotten this project bad
PR on social media. It's best to get rid of them. We can still be super
glib and funny without crass jokes.
2020-04-10 11:51:56 -07:00
Jonathan Wren
9acdba1ec7 Update old links (#844)
Since we moved the core repo to jrnl-org, the old links no longer work.
2020-04-10 11:51:56 -07:00