From 9e8c05d80c731f5d60ebf0f0cc3adb2445ee97df Mon Sep 17 00:00:00 2001 From: Steven Stallion Date: Thu, 6 May 2021 20:03:47 -0500 Subject: [PATCH] Update documentation --- .gitignore | 8 ++++---- CONTRIBUTING.md | 33 ++++++++++++++++----------------- LICENSE | 3 +-- README.md | 35 ++++++++++++++++++----------------- docs/demo.cast | 5 ++--- scripts/release_notes.py | 3 +-- tests/conftest.py | 3 +-- tests/test_cli.py | 3 +-- tests/test_editor.py | 3 +-- tests/test_wiki.py | 3 +-- vimwiki_cli/__init__.py | 3 +-- vimwiki_cli/__main__.py | 11 +++++------ vimwiki_cli/context.py | 3 +-- vimwiki_cli/diary.py | 3 +-- vimwiki_cli/editor.py | 5 ++--- vimwiki_cli/tags.py | 3 +-- vimwiki_cli/wiki.py | 3 +-- 17 files changed, 58 insertions(+), 72 deletions(-) diff --git a/.gitignore b/.gitignore index 2d33879..e723b9c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ *.py[co] __pycache__/ /.coverage -/.pytest_cache -/build -/dist -/venv +/.pytest_cache/ +/build/ +/dist/ +/venv/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f5e022..0de7fc5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,15 +1,15 @@ # Contributing -If you have an idea or feature request please open an [issue], even if you don't -have time to contribute! +If you have an idea or feature request please open an [issue][1], even if you +don't have time to contribute! ## Making Changes > **Note**: This guide assumes you have a working Python installation (most > versions are supported) and have the Python Package Installer available in -> your PATH. +> your $PATH. -To get started, [fork] this repository on GitHub and clone a working copy for +To get started, [fork][2] this repository on GitHub and clone a working copy for development: $ git clone git@github.com:YOUR-USERNAME/vimwiki-cli.git @@ -20,7 +20,7 @@ and activate the environment: $ virtualenv venv $ source venv/bin/activate -> **Note**: If the `virtualenv` command is not available, it can be installed +> **Note**: If the `virtualenv` package is not available, it can be installed > locally by issuing `pip install --user virtualenv`. Dependencies are managed via `setuptools`; to set up the environment for @@ -32,10 +32,10 @@ Once you are finished making changes, be sure to check the output of `pycodestyle` and `pytest`. At a minimum, there should be no test regressions and additional tests should be added for new functionality. If user-facing changes are introduced, be sure add an entry to the `Unreleased` section in -[CHANGELOG.md] as well. +[CHANGELOG.md]. -With that out of the way, you can now commit your changes and create a [pull -request] against the `master` branch for review! +With that out of the way, you may now commit your changes and create a +[pull request][3] against the `master` branch for review! ## Making New Releases @@ -45,15 +45,13 @@ passing tests at all times. To make a new release, follow these steps: -1. Install dependencies by issuing `pip install -e ".[deploy]"` in an existing - virtualenv (see above). +1. Install deploy dependencies by issuing `pip install -e ".[deploy]"`. 2. Verify `pycodestyle` and `pytest` are passing locally. 3. Increment the version number by issuing `bump2version `. 4. Create a new section in [CHANGELOG.md] for the new version, and move items from `Unreleased` to this section. Links should also be updated to point to - the correct tags for comparisons. -5. Verify release notes by issuing `scripts/release_notes.py v` and - make adjustments as needed. + the correct tags for comparison. +5. Verify release notes by issuing `scripts/release_notes.py v`. 6. Commit changes by issuing `git commit -a -m "Release v"`. 7. Create a release tag by issuing `git tag -a -m "Release v" v`. @@ -65,7 +63,8 @@ To make a new release, follow these steps: By contributing to this repository, you agree that your contributions will be licensed under its Simplified BSD License. -[CHANGELOG.md]: https://github.com/sstallion/vimwiki-cli/blob/master/CHANGELOG.md -[fork]: https://docs.github.com/en/github/getting-started-with-github/fork-a-repo -[issue]: https://github.com/sstallion/vimwiki-cli/issues -[pull request]: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request +[1]: https://github.com/sstallion/vimwiki-cli/issues +[2]: https://docs.github.com/en/github/getting-started-with-github/fork-a-repo +[3]: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request + +[CHANGELOG.md]: CHANGELOG.md diff --git a/LICENSE b/LICENSE index 8eb914b..a94d0ad 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,4 @@ -Copyright (c) 2021 Steven Stallion -All rights reserved. +Copyright (C) 2021 Steven Stallion Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/README.md b/README.md index 52e2896..37b37e1 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ # Vimwiki Command-Line Interface -[![](https://img.shields.io/travis/com/sstallion/vimwiki-cli)][Travis] -[![](https://img.shields.io/pypi/v/vimwiki-cli)][PyPI] -[![](https://img.shields.io/pypi/pyversions/vimwiki-cli)][PyPI] +[![](https://img.shields.io/travis/com/sstallion/vimwiki-cli)][1] +[![](https://img.shields.io/pypi/v/vimwiki-cli)][2] +[![](https://img.shields.io/pypi/pyversions/vimwiki-cli)][2] [![](https://img.shields.io/github/license/sstallion/vimwiki-cli)][LICENSE] -`vimwiki-cli` is a command-line interface to [Vimwiki], a plugin for the [Vim] -text editor. It provides a front-end for interactive editor commands and can be -used to automate repetitive tasks such as rebuilding tag metadata and generating -links, all from the command line. +`vimwiki-cli` is a command-line interface to [Vimwiki][3], a plugin for the +[Vim][4] text editor. It provides a front-end for interactive editor commands +and can be used to automate repetitive tasks such as rebuilding tag metadata and +generating links, all from the command line. -[![](https://asciinema.org/a/411893.svg)](https://asciinema.org/a/411893?autoplay=1) +[![](https://asciinema.org/a/413921.svg)](https://asciinema.org/a/413921?autoplay=1) ## Installation -`vimwiki-cli` is available on [PyPI] and can be installed locally using the +`vimwiki-cli` is available on [PyPI][2] and can be installed locally using the Python Package Installer: $ pip install --user vimwiki-cli @@ -73,7 +73,7 @@ startup file to provide completion: ### Git Integration -For wikis managed with git, a pre-commit hook script is available that executes +For wikis managed with Git, a pre-commit hook script is available that executes non-interactive commands to rebuild tag metadata and generate links before commit. @@ -108,10 +108,11 @@ Pull requests are welcome! See [CONTRIBUTING.md] for more details. Source code in this repository is licensed under a Simplified BSD License. See [LICENSE] for more details. -[CONTRIBUTING.md]: https://github.com/sstallion/vimwiki-cli/blob/master/CONTRIBUTING.md -[LICENSE]: https://github.com/sstallion/vimwiki-cli/blob/master/LICENSE -[pre-commit.sh]: https://github.com/sstallion/vimwiki-cli/blob/master/scripts/pre-commit.sh -[PyPI]: https://pypi.org/project/vimwiki-cli/ -[Travis]: https://travis-ci.com/sstallion/vimwiki-cli -[Vim]: https://www.vim.org/ -[Vimwiki]: https://vimwiki.github.io/ +[1]: https://travis-ci.com/sstallion/vimwiki-cli +[2]: https://pypi.org/project/vimwiki-cli/ +[3]: https://vimwiki.github.io/ +[4]: https://www.vim.org/ + +[CONTRIBUTING.md]: CONTRIBUTING.md +[LICENSE]: LICENSE +[pre-commit.sh]: scripts/pre-commit.sh diff --git a/docs/demo.cast b/docs/demo.cast index 601325d..aef9208 100644 --- a/docs/demo.cast +++ b/docs/demo.cast @@ -947,7 +947,7 @@ [58.778272, "o", "-"] [58.993868, "o", "m"] [59.10482, "o", " "] -[59.268853, "o", "'"] +[59.268853, "o", "\""] [59.548293, "o", "U"] [59.708867, "o", "p"] [59.796098, "o", "d"] @@ -967,7 +967,7 @@ [61.520288, "o", "k"] [61.695677, "o", "i"] [62.05812, "o", "!"] -[62.318457, "o", "'"] +[62.318457, "o", "\""] [63.567055, "o", "\u001b[?2004l\r\r\n"] [63.653316, "o", "\u001b[90mvim\u001b[92m|\u001b[37mwiki\u001b[0m: Generating links..."] [66.050112, "o", "done.\r\n"] @@ -979,4 +979,3 @@ [73.022411, "o", "done.\r\n"] [73.035142, "o", "[master 593e5ec] Update vimwikiwiki!\r\n 2 files changed, 6 insertions(+), 2 deletions(-)\r\n"] [73.035556, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J> \u001b[K\u001b[67C \u001b[68D"] -[75.268685, "o", "\u001b[?2004l\r\r\n"] diff --git a/scripts/release_notes.py b/scripts/release_notes.py index 211aa87..43fe807 100755 --- a/scripts/release_notes.py +++ b/scripts/release_notes.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/tests/conftest.py b/tests/conftest.py index 917bfd7..3172928 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/tests/test_cli.py b/tests/test_cli.py index 8f9eee2..122a44a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/tests/test_editor.py b/tests/test_editor.py index b1c0a3c..20477cc 100644 --- a/tests/test_editor.py +++ b/tests/test_editor.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/tests/test_wiki.py b/tests/test_wiki.py index e18cbce..1490d59 100644 --- a/tests/test_wiki.py +++ b/tests/test_wiki.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/vimwiki_cli/__init__.py b/vimwiki_cli/__init__.py index ad74d1d..ed1c58f 100644 --- a/vimwiki_cli/__init__.py +++ b/vimwiki_cli/__init__.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/vimwiki_cli/__main__.py b/vimwiki_cli/__main__.py index b1e273b..c543636 100644 --- a/vimwiki_cli/__main__.py +++ b/vimwiki_cli/__main__.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -54,10 +53,10 @@ logger = logging.getLogger(__name__) def cli(ctx, *args, **kwargs): """Vimwiki Command-Line Interface - vimwiki is a command-line interface to Vimwiki, a plugin for the Vim text - editor. It provides a front-end for interactive editor commands and can - be used to automate repetitive tasks such as rebuilding tag metadata and - generating links, all from the command line. + vimwiki-cli is a command-line interface to Vimwiki, a plugin for the Vim + text editor. It provides a front-end for interactive editor commands and + can be used to automate repetitive tasks such as rebuilding tag metadata + and generating links, all from the command line. Global options may also be configured using environment variables: diff --git a/vimwiki_cli/context.py b/vimwiki_cli/context.py index 7bb5428..37ef17c 100644 --- a/vimwiki_cli/context.py +++ b/vimwiki_cli/context.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/vimwiki_cli/diary.py b/vimwiki_cli/diary.py index d8704f0..233dd76 100644 --- a/vimwiki_cli/diary.py +++ b/vimwiki_cli/diary.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/vimwiki_cli/editor.py b/vimwiki_cli/editor.py index 00eb820..97631bc 100644 --- a/vimwiki_cli/editor.py +++ b/vimwiki_cli/editor.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -114,7 +113,7 @@ class GlobalCommand(Command): elif wiki.select: args.insert(0, 'VimwikiUISelect') - # Force interactive if VimwikiUISelect executed: + # Force interactive if VimwikiUISelect will be executed: options['interactive'] = True Command.__init__(self, wiki, *args, **options) diff --git a/vimwiki_cli/tags.py b/vimwiki_cli/tags.py index 7ba1989..4105535 100644 --- a/vimwiki_cli/tags.py +++ b/vimwiki_cli/tags.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions diff --git a/vimwiki_cli/wiki.py b/vimwiki_cli/wiki.py index 5069822..9ab3f8d 100644 --- a/vimwiki_cli/wiki.py +++ b/vimwiki_cli/wiki.py @@ -1,5 +1,4 @@ -# Copyright (c) 2021 Steven Stallion -# All rights reserved. +# Copyright (C) 2021 Steven Stallion # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions