panvimwiki 0.5__tar.gz → 0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. panvimwiki-0.7/.editorconfig +47 -0
  2. panvimwiki-0.7/.github/workflows/ci.yml +200 -0
  3. {panvimwiki-0.5 → panvimwiki-0.7}/CHANGELOG.md +17 -1
  4. {panvimwiki-0.5 → panvimwiki-0.7}/CONTRIBUTING.md +18 -7
  5. {panvimwiki-0.5 → panvimwiki-0.7}/Makefile +2 -1
  6. {panvimwiki-0.5/src/panvimwiki.egg-info → panvimwiki-0.7}/PKG-INFO +45 -31
  7. {panvimwiki-0.5 → panvimwiki-0.7}/README.md +41 -30
  8. {panvimwiki-0.5 → panvimwiki-0.7}/after/ftplugin/vimwiki.vim +16 -13
  9. {panvimwiki-0.5 → panvimwiki-0.7}/autoload/panvimwiki.vim +7 -6
  10. {panvimwiki-0.5 → panvimwiki-0.7}/doc/panvimwiki.txt +50 -35
  11. {panvimwiki-0.5 → panvimwiki-0.7}/environment.yml +1 -1
  12. {panvimwiki-0.5 → panvimwiki-0.7}/plugin/panvimwiki.vim +5 -3
  13. {panvimwiki-0.5 → panvimwiki-0.7}/setup.cfg +5 -1
  14. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/__init__.py +1 -1
  15. panvimwiki-0.7/src/panvimwiki/convert.py +142 -0
  16. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/prefilter.py +7 -4
  17. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/reference_citation.py +32 -22
  18. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/vimwiki_week.py +2 -0
  19. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/wiki2pandoc.py +20 -25
  20. {panvimwiki-0.5 → panvimwiki-0.7/src/panvimwiki.egg-info}/PKG-INFO +45 -31
  21. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki.egg-info/SOURCES.txt +2 -0
  22. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki.egg-info/entry_points.txt +1 -1
  23. {panvimwiki-0.5/tests/vim → panvimwiki-0.7/tests/func}/reference_citation.md +13 -5
  24. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/reference_citation.out.md +15 -14
  25. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/test_convert.py +35 -8
  26. panvimwiki-0.7/tests/unit/prefilter/reference_citation.out.md +8 -0
  27. panvimwiki-0.7/tests/vim/ExpandCiteproc.vader +86 -0
  28. {panvimwiki-0.5/tests/func → panvimwiki-0.7/tests/vim}/reference_citation.md +12 -5
  29. panvimwiki-0.7/tests/vim/run.sh +2 -0
  30. panvimwiki-0.7/tests/vim/vimrc +108 -0
  31. {panvimwiki-0.5 → panvimwiki-0.7}/tox.ini +5 -1
  32. panvimwiki-0.5/src/panvimwiki/convert.py +0 -99
  33. panvimwiki-0.5/tests/unit/prefilter/reference_citation.out.md +0 -8
  34. panvimwiki-0.5/tests/vim/ExpandCiteproc.vader +0 -67
  35. panvimwiki-0.5/tests/vim/run.sh +0 -2
  36. panvimwiki-0.5/tests/vim/vimrc +0 -60
  37. {panvimwiki-0.5 → panvimwiki-0.7}/.circleci/config.yml +0 -0
  38. {panvimwiki-0.5 → panvimwiki-0.7}/.codacy.yml +0 -0
  39. {panvimwiki-0.5 → panvimwiki-0.7}/.coveragerc +0 -0
  40. {panvimwiki-0.5 → panvimwiki-0.7}/.gitattributes +0 -0
  41. {panvimwiki-0.5 → panvimwiki-0.7}/.gitignore +0 -0
  42. {panvimwiki-0.5 → panvimwiki-0.7}/.isort.cfg +0 -0
  43. {panvimwiki-0.5 → panvimwiki-0.7}/.pre-commit-config.yaml +0 -0
  44. {panvimwiki-0.5 → panvimwiki-0.7}/.readthedocs.yml +0 -0
  45. {panvimwiki-0.5 → panvimwiki-0.7}/.travis.yml +0 -0
  46. {panvimwiki-0.5 → panvimwiki-0.7}/.vim/coc-settings.json +0 -0
  47. {panvimwiki-0.5 → panvimwiki-0.7}/AUTHORS.md +0 -0
  48. {panvimwiki-0.5 → panvimwiki-0.7}/LICENSE.txt +0 -0
  49. {panvimwiki-0.5 → panvimwiki-0.7}/appveyor.yml +0 -0
  50. {panvimwiki-0.5 → panvimwiki-0.7}/docs/Makefile +0 -0
  51. {panvimwiki-0.5 → panvimwiki-0.7}/docs/_static/.gitignore +0 -0
  52. {panvimwiki-0.5 → panvimwiki-0.7}/docs/authors.md +0 -0
  53. {panvimwiki-0.5 → panvimwiki-0.7}/docs/changelog.md +0 -0
  54. {panvimwiki-0.5 → panvimwiki-0.7}/docs/conf.py +0 -0
  55. {panvimwiki-0.5 → panvimwiki-0.7}/docs/contributing.md +0 -0
  56. {panvimwiki-0.5 → panvimwiki-0.7}/docs/index.md +0 -0
  57. {panvimwiki-0.5 → panvimwiki-0.7}/docs/license.md +0 -0
  58. {panvimwiki-0.5 → panvimwiki-0.7}/docs/readme.md +0 -0
  59. {panvimwiki-0.5 → panvimwiki-0.7}/docs/requirements.txt +0 -0
  60. {panvimwiki-0.5 → panvimwiki-0.7}/junit.xml +0 -0
  61. {panvimwiki-0.5 → panvimwiki-0.7}/pyproject.toml +0 -0
  62. {panvimwiki-0.5 → panvimwiki-0.7}/setup.py +0 -0
  63. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/catvimwiki.py +0 -0
  64. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/__init__.py +0 -0
  65. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/delete_bullet_star.py +0 -0
  66. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/delete_empty_heading.py +0 -0
  67. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/delete_tag_lines.py +0 -0
  68. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/delete_task_pending.py +0 -0
  69. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/delete_taskwiki_heading.py +0 -0
  70. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki/filter/do_nothing.py +0 -0
  71. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki.egg-info/dependency_links.txt +0 -0
  72. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki.egg-info/not-zip-safe +0 -0
  73. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki.egg-info/requires.txt +0 -0
  74. {panvimwiki-0.5 → panvimwiki-0.7}/src/panvimwiki.egg-info/top_level.txt +0 -0
  75. {panvimwiki-0.5 → panvimwiki-0.7}/tests/__init__.py +0 -0
  76. {panvimwiki-0.5 → panvimwiki-0.7}/tests/conftest.py +0 -0
  77. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/__init__.py +0 -0
  78. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/convert.docx +0 -0
  79. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/convert.md +0 -0
  80. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/convert_shift.docx +0 -0
  81. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/convert_shift.md +0 -0
  82. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/test_catvimwiki.py +0 -0
  83. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/test_vimwiki_week.py +0 -0
  84. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/vimwiki/diary/2017-04-24.wiki +0 -0
  85. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/vimwiki/diary/2017-04-26.wiki +0 -0
  86. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/vimwiki/non-diary.wiki +0 -0
  87. {panvimwiki-0.5 → panvimwiki-0.7}/tests/func/vimwiki_html/templates/reference.docx +0 -0
  88. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/__init__.py +0 -0
  89. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/filter/delete_empty_heading.out.md +0 -0
  90. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/filter/delete_empty_heading.wiki +0 -0
  91. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/filter/delete_tag_lines.out.md +0 -0
  92. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/filter/delete_tag_lines.wiki +0 -0
  93. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/filter/delete_taskwiki_heading.out.md +0 -0
  94. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/filter/delete_taskwiki_heading.wiki +0 -0
  95. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/prefilter/delete_bullet_star.out.md +0 -0
  96. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/prefilter/delete_bullet_star.wiki +0 -0
  97. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/prefilter/delete_task_pending.out.md +0 -0
  98. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/prefilter/delete_task_pending.wiki +0 -0
  99. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/prefilter/do_nothing.out.md +0 -0
  100. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/prefilter/do_nothing.wiki +0 -0
  101. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/prefilter/reference_citation.wiki +0 -0
  102. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/test_catvimwiki.py +0 -0
  103. {panvimwiki-0.5 → panvimwiki-0.7}/tests/unit/test_filters.py +0 -0
  104. {panvimwiki-0.5 → panvimwiki-0.7}/tests/vim/VimwikiConvert.vader +0 -0
  105. {panvimwiki-0.5 → panvimwiki-0.7}/tests/vim/__init__.py +0 -0
  106. {panvimwiki-0.5 → panvimwiki-0.7}/tests/vim/test_vimwiki_convert.py +0 -0
  107. {panvimwiki-0.5 → panvimwiki-0.7}/tests/vim/vimwiki/diary/2017-04-24.wiki +0 -0
  108. {panvimwiki-0.5 → panvimwiki-0.7}/tests/vim/vimwiki/diary/2017-04-26.wiki +0 -0
  109. {panvimwiki-0.5 → panvimwiki-0.7}/tests/vim/vimwiki/non-diary.wiki +0 -0
@@ -0,0 +1,47 @@
1
+
2
+ EditorrConfig is awesome: http://EditorConfig.org
3
+
4
+ # top-most EditorConfig file
5
+ root = true
6
+
7
+ [*]
8
+ indent_style = space
9
+ indent_size = 2
10
+ end_of_line = lf
11
+ trim_trailing_whitespace = true
12
+ insert_final_newline = true
13
+
14
+ [*.{js,py,html,html5}]
15
+ charset = utf-8
16
+
17
+ [*.{md,mdpp,diff,vim}]
18
+ trim_trailing_whitespace = false
19
+
20
+ [{vimrc,gvimrc}]
21
+ trim_trailing_whitespace = false
22
+
23
+ [*.py]
24
+ indent_style = space
25
+ indent_size = 4
26
+
27
+ [Makefile]
28
+ indent_style = tab
29
+
30
+ [*.{json,yml}]
31
+ indent_style = space
32
+ indent_size = 2
33
+
34
+ [*.{cs}]
35
+ indent_size = 4
36
+ trim_trailing_whitespace = true
37
+
38
+ [*.{json}]
39
+ indent_size = 2
40
+ trim_trailing_whitespace = true
41
+
42
+ [*.{ps1,psm1,psd1}]
43
+ indent_size = 4
44
+ trim_trailing_whitespace = true
45
+
46
+ [*.{ps1xml,props,xml,yaml}]
47
+ indent_size = 2
@@ -0,0 +1,200 @@
1
+ # GitHub Actions configuration **EXAMPLE**,
2
+ # MODIFY IT ACCORDING TO YOUR NEEDS!
3
+ # Reference: https://docs.github.com/en/actions
4
+
5
+ name: Test and Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
6
+
7
+ on:
8
+ push:
9
+ # Avoid using all the resources/limits available by checking only
10
+ # relevant branches and tags. Other branches can be checked via PRs.
11
+ branches: [main]
12
+ tags: ["v[0-9]*", "[0-9]+.[0-9]+*"] # Match tags that resemble a version
13
+ pull_request: # Run in every PR
14
+ workflow_dispatch: # Allow manually triggering the workflow
15
+ schedule:
16
+ # Run roughly every 15 days at 00:00 UTC
17
+ # (useful to check if updates on dependencies break the package)
18
+ - cron: "0 0 1,16 * *"
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ concurrency:
24
+ group: >-
25
+ ${{ github.workflow }}-${{ github.ref_type }}-
26
+ ${{ github.event.pull_request.number || github.sha }}
27
+ cancel-in-progress: true
28
+
29
+ jobs:
30
+ prepare:
31
+ runs-on: ubuntu-latest
32
+ outputs:
33
+ wheel-distribution: ${{ steps.wheel-distribution.outputs.path }}
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ with: { fetch-depth: 0 } # deep clone for setuptools-scm
37
+ - uses: actions/setup-python@v5
38
+ id: setup-python
39
+ with: { python-version: "3.11" }
40
+ - name: Run static analysis and format checkers
41
+ run: pipx run pre-commit run --all-files --show-diff-on-failure
42
+ - name: Build package distribution files 📦
43
+ run: >-
44
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
45
+ tox -e clean,build
46
+ - name: Record the path of wheel distribution
47
+ id: wheel-distribution
48
+ run: echo "path=$(ls dist/*.whl)" >> $GITHUB_OUTPUT
49
+ - name: Store the distribution files for use in other stages
50
+ # `tests` and `publish` will use the same pre-built distributions,
51
+ # so we make sure to release the exact same package that was tested
52
+ uses: actions/upload-artifact@v3
53
+ with:
54
+ name: python-distribution-files
55
+ path: dist/
56
+ retention-days: 1
57
+
58
+ test:
59
+ needs: prepare
60
+ strategy:
61
+ matrix:
62
+ python:
63
+ # - "3.8" # oldest Python supported by PSF
64
+ - "3.10" # Required by rhysd/action-setup-vim@v1 on ubuntu-latest
65
+ # - "3.11" # newest Python that is stable
66
+ platform:
67
+ - ubuntu-latest
68
+ # - macos-latest
69
+ # - windows-latest
70
+ runs-on: ${{ matrix.platform }}
71
+ steps:
72
+ - uses: actions/checkout@v4
73
+ - uses: nikeee/setup-pandoc@v1
74
+ with:
75
+ pandoc-version: '3.1.3' # Compatible with tests for reference_citation.py
76
+ - uses: actions/setup-python@v5
77
+ id: setup-python
78
+ with:
79
+ python-version: ${{ matrix.python }}
80
+ - uses: rhysd/action-setup-vim@v1
81
+ - name: Retrieve pre-built distribution files
82
+ uses: actions/download-artifact@v3
83
+ with: { name: python-distribution-files, path: dist/ }
84
+ - name: Run tests
85
+ run: >-
86
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
87
+ tox --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
88
+ -- -rFEx --durations 10 --color yes -vv # pytest args
89
+ - name: Generate coverage report
90
+ run: pipx run coverage lcov -o coverage.lcov
91
+ - name: Upload partial coverage report
92
+ uses: coverallsapp/github-action@master
93
+ with:
94
+ path-to-lcov: coverage.lcov
95
+ github-token: ${{ secrets.GITHUB_TOKEN }}
96
+ flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
97
+ parallel: true
98
+
99
+ finalize:
100
+ needs: test
101
+ runs-on: ubuntu-latest
102
+ steps:
103
+ - name: Finalize coverage report
104
+ uses: coverallsapp/github-action@master
105
+ with:
106
+ github-token: ${{ secrets.GITHUB_TOKEN }}
107
+ parallel-finished: true
108
+
109
+ publish-to-testpypi:
110
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
111
+ needs: finalize
112
+ runs-on: ubuntu-latest
113
+
114
+ environment:
115
+ name: testpypi
116
+ url: https://test.pypi.org/p/panvimwiki
117
+
118
+ permissions:
119
+ id-token: write # IMPORTANT: mandatory for trusted publishing
120
+
121
+ steps:
122
+ - name: Retrieve pre-built distribution files
123
+ uses: actions/download-artifact@v3
124
+ with: { name: python-distribution-files, path: dist/ }
125
+ - name: Publish distribution 📦 to TestPyPI
126
+ uses: pypa/gh-action-pypi-publish@release/v1
127
+ with:
128
+ repository-url: https://test.pypi.org/legacy/
129
+
130
+ publish-to-pypi:
131
+ name: >-
132
+ Publish Python 🐍 distribution 📦 to PyPI
133
+ needs: [finalize, publish-to-testpypi]
134
+ if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
135
+ runs-on: ubuntu-latest
136
+ environment:
137
+ name: pypi
138
+ url: https://pypi.org/p/panvimwiki # Replace <package-name> with your PyPI project name
139
+ permissions:
140
+ # contents: write
141
+ id-token: write # IMPORTANT: mandatory for trusted publishing
142
+ steps:
143
+ # - uses: actions/checkout@v4
144
+ # - uses: actions/setup-python@v5
145
+ # with: {python-version: "3.11"}
146
+ - name: Retrieve pre-built distribution files
147
+ uses: actions/download-artifact@v3
148
+ with: { name: python-distribution-files, path: dist/ }
149
+ - name: Publish distribution 📦 to PyPI
150
+ uses: pypa/gh-action-pypi-publish@release/v1
151
+ # - name: Publish Package
152
+ # env:
153
+ # # TODO: Set your PYPI_TOKEN as a secret using GitHub UI
154
+ # # - https://pypi.org/help/#apitoken
155
+ # # - https://docs.github.com/en/actions/security-guides/encrypted-secrets
156
+ # TWINE_REPOSITORY: pypi
157
+ # TWINE_USERNAME: __token__
158
+ # TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
159
+ # run: pipx run tox -e publish
160
+
161
+ github-release:
162
+ name: >-
163
+ Sign the Python 🐍 distribution 📦 with Sigstore
164
+ and upload them to GitHub Release
165
+ needs:
166
+ - publish-to-pypi
167
+ runs-on: ubuntu-latest
168
+
169
+ permissions:
170
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
171
+ id-token: write # IMPORTANT: mandatory for sigstore
172
+
173
+ steps:
174
+ - name: Download all the dists
175
+ uses: actions/download-artifact@v3
176
+ with: { name: python-distribution-files, path: dist/ }
177
+ - name: Sign the dists with Sigstore
178
+ uses: sigstore/gh-action-sigstore-python@v2.1.0
179
+ with:
180
+ inputs: >-
181
+ ./dist/*.tar.gz
182
+ ./dist/*.whl
183
+ - name: Create GitHub Release
184
+ env:
185
+ GITHUB_TOKEN: ${{ github.token }}
186
+ run: >-
187
+ gh release create
188
+ '${{ github.ref_name }}'
189
+ --repo '${{ github.repository }}'
190
+ --notes ""
191
+ - name: Upload artifact signatures to GitHub Release
192
+ env:
193
+ GITHUB_TOKEN: ${{ github.token }}
194
+ # Upload to GitHub Release using the `gh` CLI.
195
+ # `dist/` contains the built packages, and the
196
+ # sigstore-produced signatures and certificates.
197
+ run: >-
198
+ gh release upload
199
+ '${{ github.ref_name }}' dist/**
200
+ --repo '${{ github.repository }}'
@@ -1,6 +1,22 @@
1
1
  # Changelog
2
2
 
3
- ## Version 0.6 (development)
3
+ ## Version 0.8 (development)
4
+
5
+ ## Version 0.7 (2024-01-13)
6
+
7
+ - `:VimwikiReference` no longer converts to reference-links, preferring
8
+ compatibility with pandoc conversion to `HTML`.
9
+ - DOCS: Update `:help panvimwiki`.
10
+ - DOCS: Host at http://panvimwiki.readthedocs.io/
11
+
12
+ ## Version 0.6 (2024-01-01)
13
+
14
+ - Vim command `:VimwikiReference` converts
15
+ [Pandoc Citations](https://pandoc.org/MANUAL.html#citation-syntax)
16
+ to [reference links](https://pandoc.org/MANUAL.html#reference-links),
17
+ e.g.,`[anchor:]`, replacing the current file.
18
+ - DOCS: Update `:help`.
19
+ - BUILD: Use pre-commit to remove trailing spaces from Vim help.
4
20
 
5
21
  ## Version 0.5 (2023-12-04)
6
22
 
@@ -73,13 +73,21 @@ and use Python's built-in web server for a preview in your web browser
73
73
  python3 -m http.server --directory 'docs/_build/html' --bind localhost
74
74
  ```
75
75
 
76
+ Tox runs `make` and `pre-commit` to build Vim help documentation in
77
+ `doc/panvimwiki.txt`; you may need to run tox twice to resolve the following
78
+ `pre-commit` error message:
79
+
80
+ :::{error}
81
+ trim trailing whitespace.................................................Failed
82
+ :::
83
+
76
84
  ## Code Contributions
77
85
 
78
86
  Pandoc filters rely on [Panflute](http://scorreia.com/software/panflute/) and
79
87
  use the template
80
88
  [located here](https://github.com/sergiocorreia/panflute/blob/master/docs/source/_static/template.py).
81
89
 
82
- Plain text pre-filters follow a similar format but does not use panflute.
90
+ Plain text pre-filters follow a similar format but do not use panflute.
83
91
 
84
92
  ### Submit an issue
85
93
 
@@ -150,7 +158,7 @@ conda activate panvimwiki
150
158
  2. Start your work on this branch. Don't forget to add [docstrings] to new
151
159
  functions, modules and classes, especially if they are part of public APIs.
152
160
 
153
- 3. Add yourself to the list of contributors in `AUTHORS.rst`.
161
+ 3. Add yourself to the list of contributors in `AUTHORS.md`.
154
162
 
155
163
  4. When you’re done editing, do:
156
164
 
@@ -268,9 +276,8 @@ on [PyPI], the following steps can be used to release a new version for
268
276
  `panvimwiki`:
269
277
 
270
278
  1. Make sure all unit tests are successful.
271
- 2. Tag the current commit on the main branch with a release tag, e.g., `v1.2.3`.
272
- 3. Push the new tag to the upstream [repository],
273
- e.g., `git push upstream v1.2.3`
279
+ 2. Make sure Vim help is up to date, e.g., `tox -e docs`
280
+ 3. Tag the current commit on the main branch with a release tag, e.g., `v1.2.3`.
274
281
  4. Clean up the `dist` and `build` folders with `tox -e clean`
275
282
  (or `rm -rf dist build`)
276
283
  to avoid confusion with old builds and Sphinx docs.
@@ -278,8 +285,10 @@ on [PyPI], the following steps can be used to release a new version for
278
285
  the correct version (no `.dirty` or [git] hash) according to the [git] tag.
279
286
  Also check the sizes of the distributions, if they are too big (e.g., >
280
287
  500KB), unwanted clutter may have been accidentally included.
281
- 6. Run `tox -e publish -- --repository pypi` and check that everything was
282
- uploaded to [PyPI] correctly.
288
+ 6. Push the new tag to the upstream [repository],
289
+ e.g., `git push upstream v1.2.3`
290
+ 7. [GitHub Actions] should run tests, upload to TestPyPI and [PyPI], and create
291
+ a signed [release][releases].
283
292
 
284
293
  [^contrib1]: Even though, these resources focus on open source projects and
285
294
  communities, the general ideas behind collaborating with other developers
@@ -310,3 +319,5 @@ on [PyPI], the following steps can be used to release a new version for
310
319
  [virtualenv]: https://virtualenv.pypa.io/en/stable/
311
320
  [repository]: https://github.com/jfishe/panvimwiki
312
321
  [issue tracker]: https://github.com/jfishe/panvimwiki/issues
322
+ [gitHub actions]: https://github.com/jfishe/panvimwiki/actions
323
+ [releases]: https://github.com/jfishe/panvimwiki/releases
@@ -60,8 +60,9 @@ ${vimdoc_targets}: | ${lua-filter}/include-files.lua ${lua-filter}/panvimdoc.lua
60
60
  --lua-filter=${lua-filter}/include-files.lua \
61
61
  --lua-filter=${lua-filter}/skip-blocks.lua \
62
62
  --to=${lua-filter}/panvimdoc.lua \
63
- --output=doc/panvimwiki.txt \
63
+ --output=$@ \
64
64
  $<
65
+ pipx run pre-commit run --files $@
65
66
 
66
67
  ${lua-filter}/include-files.lua ${lua-filter}/panvimdoc.lua ${lua-filter}/skip-blocks.lua: | build/
67
68
  cd build && \
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: panvimwiki
3
- Version: 0.5
3
+ Version: 0.7
4
4
  Summary: Filter and convert Vimwiki notes using pandoc.
5
5
  Home-page: https://github.com/jfishe/panvimwiki
6
6
  Author: John D. Fisher
7
7
  Author-email: jdfenw@gmail.com
8
8
  License: MIT
9
+ Project-URL: Documentation, http://panvimwiki.readthedocs.io/
10
+ Project-URL: Source, https://github.com/jfishe/panvimwiki
11
+ Project-URL: Tracker, https://github.com/jfishe/panvimwiki/issues
9
12
  Keywords: panvimwiki,vimwiki,pandoc
10
13
  Platform: any
11
14
  Classifier: Development Status :: 4 - Beta
@@ -55,6 +58,9 @@ description: Filter and convert Vimwiki notes using pandoc.
55
58
  [![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter)](https://twitter.com/panvimwiki)
56
59
  -->
57
60
 
61
+ [![Documentation Status](https://readthedocs.org/projects/panvimwiki/badge/?version=latest)](https://panvimwiki.readthedocs.io/en/latest/?badge=latest)
62
+ [![PyPI-Server](https://img.shields.io/pypi/v/panvimwiki.svg)](https://pypi.org/project/panvimwiki/)
63
+ [![Test and Publish Python 🐍 distribution 📦 to PyPI and TestPyPI](https://github.com/jfishe/panvimwiki/actions/workflows/ci.yml/badge.svg)](https://github.com/jfishe/panvimwiki/actions/workflows/ci.yml)
58
64
  [![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)
59
65
 
60
66
  # Filter and convert Vimwiki notes using pandoc
@@ -71,8 +77,10 @@ concatenate and convert Diary Notes or convert any Vimwiki note.
71
77
 
72
78
  Panvimwiki requires
73
79
  [Pandoc](https://pandoc.org/ "Pandoc a universal document converter").
74
- Installation with conda is recommended because the system version, e.g., with
80
+ Installation with `conda` is recommended because the system version, e.g., with
75
81
  Ubuntu, may be too old. Or download from the website.
82
+ [Pypandoc](https://github.com/JessicaTegner/pypandoc?tab=readme-ov-file#installing-via-pip)
83
+ supports binary installation of pandoc using `pip`.
76
84
 
77
85
  Using the Vim 8 native packages, panvimwiki should install in
78
86
  `pack/*/opt/panvimwiki` because it depends on [:python3](https://neovim.io/doc/user/if_pyth.html#python3)
@@ -89,6 +97,8 @@ git clone https://github.com/jfishe/panvimwiki.git "$dest"
89
97
  # Activate the python environment used by Vim.
90
98
  # Then install panvimwiki in that python environment.
91
99
  python -m pip install "$dest"
100
+ # Or to install from pypi:
101
+ python -m pip install panvimwiki
92
102
  ```
93
103
 
94
104
  Panvimwiki requires Vim compiled with Python 3, so add the following to
@@ -189,6 +199,25 @@ delete_task_pending
189
199
  - [.] Bulleted list done1 item 1 should appear
190
200
  ```
191
201
 
202
+ #### Pandoc Filters
203
+
204
+ Panvimwiki provides plain text pre-filters, pandoc filters and post-filters for
205
+ use from the command line.
206
+
207
+ ##### delete_tag_lines
208
+
209
+ Delete lines which only contain Vimwiki tags, e.g., ':tag1:tag2:'
210
+
211
+ ##### delete_empty_heading
212
+
213
+ Remove headings that do not have any children or paragraphs. Remove tag lines
214
+ first, [delete_tag_lines](#delete_tag_lines) or the heading is not considered
215
+ empty.
216
+
217
+ ##### delete_taskwiki_heading
218
+
219
+ #### Post-Filters
220
+
192
221
  ##### reference_citation
193
222
 
194
223
  Convert citations to a reference list.
@@ -196,6 +225,7 @@ Convert citations to a reference list.
196
225
  `Example.md`:
197
226
 
198
227
  ```markdown
228
+
199
229
  ::: {#refs .references .csl-bib-body .hanging-indent}
200
230
  ::: {#ref-bloggs-jones .csl-entry}
201
231
  Bloggs, A. J., and X. Y. Jones. 1959. "Title Title Title Title Title Title
@@ -221,23 +251,6 @@ Winston.
221
251
  New York: Holt, Rinehart & Winston.
222
252
  ```
223
253
 
224
- #### Pandoc Filters
225
-
226
- Panvimwiki provides plain text pre-filters and pandoc filters for use from
227
- the command line.
228
-
229
- ##### delete_tag_lines
230
-
231
- Delete lines which only contain Vimwiki tags, e.g., ':tag1:tag2:'
232
-
233
- ##### delete_empty_heading
234
-
235
- Remove headings that do not have any children or paragraphs. Remove tag lines
236
- first, [delete_tag_lines](#delete_tag_lines) or the heading is not considered
237
- empty.
238
-
239
- ##### delete_taskwiki_heading
240
-
241
254
  ### Commands
242
255
 
243
256
  #### Local Commands
@@ -274,10 +287,16 @@ After concatenating DiaryNotes for the week, behave as [VimwikiConvert](#vimwiki
274
287
 
275
288
  ##### VimwikiReference
276
289
 
277
- If in markdown format, pandoc reads the current buffer, with citeproc
278
- references to a BibLaTeX or other supported database, and appends references
279
- links and the complete citation, according to the default citation style
280
- language (CSL).
290
+ If in markdown format, expand
291
+ [Pandoc Citations](https://pandoc.org/MANUAL.html#citation-syntax)
292
+ in the current file and append to the end of the file. The Yaml metadata should
293
+ [specify the bibliographic data](https://pandoc.org/MANUAL.html#specifying-bibliographic-data)
294
+ and the
295
+ [Citation Style Language (CSL)](https://pandoc.org/MANUAL.html#specifying-a-citation-style).
296
+
297
+ `VimwikiReference` overwrites the file, so Vim may prompt to
298
+ reload the buffer (cf. Warning `:h W12`). If you choose not to reload the
299
+ buffer, `:h :DiffOrig` facilitate review of the changes.
281
300
 
282
301
  ### Settings
283
302
 
@@ -299,22 +318,17 @@ let g:panvimwiki_settings = {
299
318
 
300
319
  ## Development and Testing
301
320
 
302
- Because pandoc is required, a conda environment called `pyscaffold` is created.
321
+ Because pandoc is required, a conda environment called `panvimwiki` is created.
303
322
  The default name may be overridden with the `--name <environment name>`
304
323
  parameter.
305
324
 
306
325
  ```bash
307
326
  git clone https://github.com/jfishe/panvimwiki.git
308
327
  cd panvimwiki
309
- conda env create --file environment.yml --name pyscaffold
310
- conda activate pyscaffold
311
- pipx install covimerage
328
+ conda env create --file environment.yml
329
+ conda activate panvimwiki
312
330
  ```
313
331
 
314
- Covimerage has conflicting dependencies, so pipx creates an isolated
315
- executable in `~/.local/bin`. You may want to run `pipx uninstall covimerage`
316
- to avoid cluttering `$PATH`.
317
-
318
332
  ```bash
319
333
  tox -av # List tox commands and descriptions.
320
334
  tox --recreate # Build the package and run tests with python and Vader.
@@ -16,6 +16,9 @@ description: Filter and convert Vimwiki notes using pandoc.
16
16
  [![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter)](https://twitter.com/panvimwiki)
17
17
  -->
18
18
 
19
+ [![Documentation Status](https://readthedocs.org/projects/panvimwiki/badge/?version=latest)](https://panvimwiki.readthedocs.io/en/latest/?badge=latest)
20
+ [![PyPI-Server](https://img.shields.io/pypi/v/panvimwiki.svg)](https://pypi.org/project/panvimwiki/)
21
+ [![Test and Publish Python 🐍 distribution 📦 to PyPI and TestPyPI](https://github.com/jfishe/panvimwiki/actions/workflows/ci.yml/badge.svg)](https://github.com/jfishe/panvimwiki/actions/workflows/ci.yml)
19
22
  [![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)
20
23
 
21
24
  # Filter and convert Vimwiki notes using pandoc
@@ -32,8 +35,10 @@ concatenate and convert Diary Notes or convert any Vimwiki note.
32
35
 
33
36
  Panvimwiki requires
34
37
  [Pandoc](https://pandoc.org/ "Pandoc a universal document converter").
35
- Installation with conda is recommended because the system version, e.g., with
38
+ Installation with `conda` is recommended because the system version, e.g., with
36
39
  Ubuntu, may be too old. Or download from the website.
40
+ [Pypandoc](https://github.com/JessicaTegner/pypandoc?tab=readme-ov-file#installing-via-pip)
41
+ supports binary installation of pandoc using `pip`.
37
42
 
38
43
  Using the Vim 8 native packages, panvimwiki should install in
39
44
  `pack/*/opt/panvimwiki` because it depends on [:python3](https://neovim.io/doc/user/if_pyth.html#python3)
@@ -50,6 +55,8 @@ git clone https://github.com/jfishe/panvimwiki.git "$dest"
50
55
  # Activate the python environment used by Vim.
51
56
  # Then install panvimwiki in that python environment.
52
57
  python -m pip install "$dest"
58
+ # Or to install from pypi:
59
+ python -m pip install panvimwiki
53
60
  ```
54
61
 
55
62
  Panvimwiki requires Vim compiled with Python 3, so add the following to
@@ -150,6 +157,25 @@ delete_task_pending
150
157
  - [.] Bulleted list done1 item 1 should appear
151
158
  ```
152
159
 
160
+ #### Pandoc Filters
161
+
162
+ Panvimwiki provides plain text pre-filters, pandoc filters and post-filters for
163
+ use from the command line.
164
+
165
+ ##### delete_tag_lines
166
+
167
+ Delete lines which only contain Vimwiki tags, e.g., ':tag1:tag2:'
168
+
169
+ ##### delete_empty_heading
170
+
171
+ Remove headings that do not have any children or paragraphs. Remove tag lines
172
+ first, [delete_tag_lines](#delete_tag_lines) or the heading is not considered
173
+ empty.
174
+
175
+ ##### delete_taskwiki_heading
176
+
177
+ #### Post-Filters
178
+
153
179
  ##### reference_citation
154
180
 
155
181
  Convert citations to a reference list.
@@ -157,6 +183,7 @@ Convert citations to a reference list.
157
183
  `Example.md`:
158
184
 
159
185
  ```markdown
186
+
160
187
  ::: {#refs .references .csl-bib-body .hanging-indent}
161
188
  ::: {#ref-bloggs-jones .csl-entry}
162
189
  Bloggs, A. J., and X. Y. Jones. 1959. "Title Title Title Title Title Title
@@ -182,23 +209,6 @@ Winston.
182
209
  New York: Holt, Rinehart & Winston.
183
210
  ```
184
211
 
185
- #### Pandoc Filters
186
-
187
- Panvimwiki provides plain text pre-filters and pandoc filters for use from
188
- the command line.
189
-
190
- ##### delete_tag_lines
191
-
192
- Delete lines which only contain Vimwiki tags, e.g., ':tag1:tag2:'
193
-
194
- ##### delete_empty_heading
195
-
196
- Remove headings that do not have any children or paragraphs. Remove tag lines
197
- first, [delete_tag_lines](#delete_tag_lines) or the heading is not considered
198
- empty.
199
-
200
- ##### delete_taskwiki_heading
201
-
202
212
  ### Commands
203
213
 
204
214
  #### Local Commands
@@ -235,10 +245,16 @@ After concatenating DiaryNotes for the week, behave as [VimwikiConvert](#vimwiki
235
245
 
236
246
  ##### VimwikiReference
237
247
 
238
- If in markdown format, pandoc reads the current buffer, with citeproc
239
- references to a BibLaTeX or other supported database, and appends references
240
- links and the complete citation, according to the default citation style
241
- language (CSL).
248
+ If in markdown format, expand
249
+ [Pandoc Citations](https://pandoc.org/MANUAL.html#citation-syntax)
250
+ in the current file and append to the end of the file. The Yaml metadata should
251
+ [specify the bibliographic data](https://pandoc.org/MANUAL.html#specifying-bibliographic-data)
252
+ and the
253
+ [Citation Style Language (CSL)](https://pandoc.org/MANUAL.html#specifying-a-citation-style).
254
+
255
+ `VimwikiReference` overwrites the file, so Vim may prompt to
256
+ reload the buffer (cf. Warning `:h W12`). If you choose not to reload the
257
+ buffer, `:h :DiffOrig` facilitate review of the changes.
242
258
 
243
259
  ### Settings
244
260
 
@@ -260,22 +276,17 @@ let g:panvimwiki_settings = {
260
276
 
261
277
  ## Development and Testing
262
278
 
263
- Because pandoc is required, a conda environment called `pyscaffold` is created.
279
+ Because pandoc is required, a conda environment called `panvimwiki` is created.
264
280
  The default name may be overridden with the `--name <environment name>`
265
281
  parameter.
266
282
 
267
283
  ```bash
268
284
  git clone https://github.com/jfishe/panvimwiki.git
269
285
  cd panvimwiki
270
- conda env create --file environment.yml --name pyscaffold
271
- conda activate pyscaffold
272
- pipx install covimerage
286
+ conda env create --file environment.yml
287
+ conda activate panvimwiki
273
288
  ```
274
289
 
275
- Covimerage has conflicting dependencies, so pipx creates an isolated
276
- executable in `~/.local/bin`. You may want to run `pipx uninstall covimerage`
277
- to avoid cluttering `$PATH`.
278
-
279
290
  ```bash
280
291
  tox -av # List tox commands and descriptions.
281
292
  tox --recreate # Build the package and run tests with python and Vader.
@@ -1,11 +1,12 @@
1
1
  " Panvimwiki ftplugin
2
2
  " File: vimwiki.vim
3
3
  " Description: Panvimwiki additions to filetype vimwiki
4
- " Maintainer: John D. Fisher
5
- " Last Change: 2023-12-03
4
+ " Home: https://github.com/jfishe/panvimwiki
5
+ " Maintainer: John D. Fisher <jdfenw@gmail.com>
6
+ " Last Change: 2024-01-01
6
7
 
7
8
  if exists('b:did_ftplugin_panvimwiki') || &compatible
8
- \ || !executable('pandoc') || !has('patch-8.2.0578h')
9
+ \ || !executable('pandoc') || !has('patch-8.2.0578h')
9
10
  finish
10
11
  endif
11
12
  let b:did_ftplugin_panvimwiki = 1 " Don't load another plugin for this buffer
@@ -13,28 +14,30 @@ let b:did_ftplugin_panvimwiki = 1 " Don't load another plugin for this buffer
13
14
  let s:save_cpo = &cpo
14
15
  set cpo&vim
15
16
 
17
+ let b:undo_ftplugin = get(b:, 'undo_ftplugin', '')
18
+ if !empty('b:undo_ftplugin')
19
+ let b:undo_ftplugin ..= " | unlet b:did_ftplugin_panvimwiki"
20
+ else
21
+ let b:undo_ftplugin = "unlet b:did_ftplugin_panvimwiki"
22
+ endif
23
+
16
24
  if !exists(":VimwikiConvert")
17
25
  command -buffer -bang -nargs=0 VimwikiConvert
18
26
  \ call panvimwiki#convert(<bang>0)
27
+ let b:undo_ftplugin ..= " | delcommand VimwikiConvert"
19
28
  endif
20
29
  if !exists(":VimwikiConvertWeek")
21
30
  command -buffer -bang -nargs=0 VimwikiConvertWeek
22
31
  \ call panvimwiki#convert(<bang>0, 1)
32
+ let b:undo_ftplugin ..= " | delcommand VimwikiConvertWeek"
23
33
  endif
34
+
24
35
  if vimwiki#vars#get_wikilocal('syntax') ==# 'markdown' && !exists(":VimwikiReference")
25
36
  command -buffer -nargs=0 VimwikiReference
26
37
  \ call panvimwiki#expand_citeproc()
27
- else
28
-
29
- endif
30
- let b:undo_ftplugin = get(b:, 'undo_ftplugin', '')
31
- if !empty('b:undo_ftplugin')
32
- let b:undo_ftplugin ..= " | "
38
+ let b:undo_ftplugin ..= " | delcommand VimwikiReference"
33
39
  endif
34
- let b:undo_ftplugin ..= "delcommand VimwikiConvertWeek"
35
- \ .. " | delcommand VimwikiConvert"
36
- \ .. " | unlet b:did_ftplugin_panvimwiki"
37
40
 
38
41
  let &cpo = s:save_cpo
39
42
  unlet s:save_cpo
40
- " vim:tabstop=4:shiftwidth=4:expandtab:textwidth=99:foldmethod=marker
43
+ " vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99:foldmethod=marker