shellman 0.4.1__tar.gz → 1.0.1__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 (82) hide show
  1. shellman-1.0.1/CHANGELOG.md +220 -0
  2. shellman-1.0.1/CODE_OF_CONDUCT.md +133 -0
  3. shellman-1.0.1/CONTRIBUTING.md +150 -0
  4. {shellman-0.4.1 → shellman-1.0.1}/LICENSE +1 -1
  5. shellman-1.0.1/PKG-INFO +138 -0
  6. {shellman-0.4.1 → shellman-1.0.1}/README.md +21 -26
  7. shellman-1.0.1/config/coverage.ini +26 -0
  8. shellman-1.0.1/config/git-changelog.toml +9 -0
  9. shellman-1.0.1/config/mypy.ini +5 -0
  10. shellman-1.0.1/config/pytest.ini +14 -0
  11. shellman-1.0.1/config/ruff.toml +84 -0
  12. shellman-1.0.1/config/vscode/launch.json +47 -0
  13. shellman-1.0.1/config/vscode/settings.json +33 -0
  14. shellman-1.0.1/config/vscode/tasks.json +97 -0
  15. shellman-1.0.1/docs/.overrides/main.html +14 -0
  16. shellman-1.0.1/docs/.overrides/partials/comments.html +57 -0
  17. shellman-1.0.1/docs/changelog.md +1 -0
  18. shellman-1.0.1/docs/code_of_conduct.md +1 -0
  19. shellman-1.0.1/docs/contributing.md +1 -0
  20. shellman-1.0.1/docs/credits.md +10 -0
  21. shellman-1.0.1/docs/css/material.css +4 -0
  22. shellman-1.0.1/docs/css/mkdocstrings.css +27 -0
  23. shellman-1.0.1/docs/index.md +6 -0
  24. shellman-1.0.1/docs/js/feedback.js +14 -0
  25. shellman-1.0.1/docs/license.md +10 -0
  26. shellman-1.0.1/docs/todo.md +24 -0
  27. shellman-1.0.1/docs/usage/index.md +351 -0
  28. shellman-1.0.1/docs/usage/plugins.md +115 -0
  29. shellman-1.0.1/docs/usage/syntax.md +75 -0
  30. shellman-1.0.1/docs/usage/tags.md +619 -0
  31. shellman-1.0.1/duties.py +203 -0
  32. shellman-1.0.1/mkdocs.yml +174 -0
  33. shellman-1.0.1/pyproject.toml +109 -0
  34. shellman-1.0.1/scripts/gen_credits.py +179 -0
  35. shellman-1.0.1/scripts/gen_ref_nav.py +37 -0
  36. shellman-1.0.1/scripts/make +193 -0
  37. shellman-1.0.1/scripts/make.py +193 -0
  38. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/__init__.py +7 -7
  39. shellman-1.0.1/src/shellman/__main__.py +14 -0
  40. shellman-1.0.1/src/shellman/cli.py +295 -0
  41. shellman-1.0.1/src/shellman/context.py +77 -0
  42. shellman-1.0.1/src/shellman/debug.py +109 -0
  43. shellman-1.0.1/src/shellman/py.typed +0 -0
  44. shellman-1.0.1/src/shellman/reader.py +238 -0
  45. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/tags.py +195 -151
  46. shellman-1.0.1/src/shellman/templates/__init__.py +148 -0
  47. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/helptext_function +15 -3
  48. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/manpage_function.groff +15 -3
  49. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/manpage_function.md +15 -3
  50. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/wikipage_function.md +15 -3
  51. shellman-1.0.1/src/shellman/templates/filters.py +312 -0
  52. shellman-1.0.1/tests/__init__.py +7 -0
  53. shellman-1.0.1/tests/conftest.py +15 -0
  54. shellman-1.0.1/tests/fakescripts/simple.sh +15 -0
  55. shellman-1.0.1/tests/test_cli.py +103 -0
  56. shellman-1.0.1/tests/test_context.py +50 -0
  57. shellman-1.0.1/tests/test_reader.py +27 -0
  58. shellman-0.4.1/CHANGELOG.md +0 -135
  59. shellman-0.4.1/CONTRIBUTING.md +0 -89
  60. shellman-0.4.1/MANIFEST.in +0 -18
  61. shellman-0.4.1/PKG-INFO +0 -269
  62. shellman-0.4.1/setup.cfg +0 -74
  63. shellman-0.4.1/setup.py +0 -64
  64. shellman-0.4.1/src/shellman/__main__.py +0 -18
  65. shellman-0.4.1/src/shellman/cli.py +0 -283
  66. shellman-0.4.1/src/shellman/context.py +0 -69
  67. shellman-0.4.1/src/shellman/reader.py +0 -183
  68. shellman-0.4.1/src/shellman/templates/__init__.py +0 -114
  69. shellman-0.4.1/src/shellman/templates/filters.py +0 -197
  70. shellman-0.4.1/src/shellman.egg-info/PKG-INFO +0 -269
  71. shellman-0.4.1/src/shellman.egg-info/SOURCES.txt +0 -32
  72. shellman-0.4.1/src/shellman.egg-info/dependency_links.txt +0 -1
  73. shellman-0.4.1/src/shellman.egg-info/entry_points.txt +0 -3
  74. shellman-0.4.1/src/shellman.egg-info/not-zip-safe +0 -1
  75. shellman-0.4.1/src/shellman.egg-info/requires.txt +0 -4
  76. shellman-0.4.1/src/shellman.egg-info/top_level.txt +0 -1
  77. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/helptext +0 -0
  78. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/manpage.groff +0 -0
  79. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/manpage.md +0 -0
  80. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/usagetext +0 -0
  81. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/wikipage.md +0 -0
  82. {shellman-0.4.1 → shellman-1.0.1}/src/shellman/templates/data/wikipage_toc.md +0 -0
@@ -0,0 +1,220 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+ <!-- insertion marker -->
9
+ ## [1.0.1](https://github.com/pawamoy/shellman/releases/tag/1.0.1) - 2024-11-25
10
+
11
+ <small>[Compare with 1.0.0](https://github.com/pawamoy/shellman/compare/1.0.0...1.0.1)</small>
12
+
13
+ ### Build
14
+
15
+ - Drop support for Python 3.8 ([3675ff8](https://github.com/pawamoy/shellman/commit/3675ff8649f3925c60714e20e114e63e3230cc2c) by Timothée Mazzucotelli).
16
+
17
+ ### Bug Fixes
18
+
19
+ - Add missing rendering of functions stdin/stdout/stderr ([d7fc017](https://github.com/pawamoy/shellman/commit/d7fc0177396858f5078c58f25ceedc849053fc5d) by Timothée Mazzucotelli). [Issue-37](https://github.com/pawamoy/shellman/issues/37)
20
+
21
+ ## [1.0.0](https://github.com/pawamoy/shellman/releases/tag/1.0.0) - 2023-09-03
22
+
23
+ <small>[Compare with 0.4.1](https://github.com/pawamoy/shellman/compare/0.4.1...1.0.0)</small>
24
+
25
+ It has been a long time since the last release, and the last time I worked on this project.
26
+ I've updated the project with my latest template. Support for Python 2 is dropped.
27
+ I took the opportunity to privatize most of the API. I'll see in a later version
28
+ if there is a need to expose a main `parse` function or similar, to extract
29
+ information from a given file.
30
+
31
+ ### Breaking Changes
32
+
33
+ - `shellman.reader.DocLine.doc_type`: Public object points to a different kind of object: function -> attribute
34
+ - `shellman.reader.preprocess_stream`: Public object was removed
35
+ - `shellman.reader.preprocess_lines`: Public object was removed
36
+ - `shellman.reader.process_blocks`: Public object was removed
37
+ - `shellman.reader.merge`: Public object was removed
38
+ - `shellman.context.get_cli_context`: Public object was removed
39
+ - `shellman.context.get_env_context`: Public object was removed
40
+ - `shellman.context.get_file_context`: Public object was removed
41
+ - `shellman.context.get_context`: Public object was removed
42
+ - `shellman.context.update`: Public object was removed
43
+ - `shellman.cli.get_context`: Public object was removed
44
+ - `shellman.cli.update`: Public object was removed
45
+ - `shellman.cli.merge`: Public object was removed
46
+ - `shellman.cli.valid_file`: Public object was removed
47
+ - `shellman.cli.render`: Public object was removed
48
+ - `shellman.cli.write`: Public object was removed
49
+ - `shellman.cli.common_ancestor`: Public object was removed
50
+ - `shellman.cli.is_format_string`: Public object was removed
51
+ - `shellman.cli.guess_filename`: Public object was removed
52
+ - `shellman.cli.output_name_variables`: Public object was removed
53
+ - `shellman.cli.get_vcs_root`: Public object was removed
54
+ - `shellman.cli.main(argv)`: Parameter was removed
55
+ - `shellman.templates.get_builtin_path`: Public object was removed
56
+ - `shellman.templates.get_env`: Public object was removed
57
+ - `shellman.templates.get_custom_template`: Public object was removed
58
+ - `shellman.templates.load_plugin_templates`: Public object was removed
59
+ - `shellman.templates.names`: Public object was removed
60
+ - `shellman.templates.parser_choices`: Public object was removed
61
+ - `shellman.templates.filters.do_groffauto(escape)`: Parameter kind was changed: positional or keyword -> keyword-only
62
+ - `shellman.templates.filters.do_smartwrap(indentfirst)`: Parameter kind was changed: positional or keyword -> keyword-only
63
+ - `shellman.templates.filters.do_format(string)`: Parameter was added as required
64
+ - `shellman.templates.filters.do_groupby(sort)`: Parameter kind was changed: positional or keyword -> keyword-only
65
+
66
+ ### Bug Fixes
67
+
68
+ - Update for Python 3 and new versions of dependencies ([e16c46f](https://github.com/pawamoy/shellman/commit/e16c46f0a72c8161d745851182379a53f78f242e) by Timothée Mazzucotelli).
69
+
70
+ ### Code Refactoring
71
+
72
+ - Rewrite tag classes as dataclasses ([f1780d4](https://github.com/pawamoy/shellman/commit/f1780d473ae9a25b52e49614cfc8a866024bcaf7) by Timothée Mazzucotelli).
73
+
74
+ ## [0.4.1](https://github.com/pawamoy/shellman/tags/0.4.1) - 2018-10-10
75
+
76
+ <small>[Compare with 0.4.0](https://github.com/pawamoy/shellman/compare/0.4.0...0.4.1)</small>
77
+
78
+ ### Fixed
79
+ - Fix `body` filter for Python 2 ([ce7d0ef](https://github.com/pawamoy/shellman/commit/ce7d0ef1a4b6f7365580d06ff064504c38247d01)).
80
+
81
+ ## [0.4.0](https://github.com/pawamoy/shellman/tags/0.4.0) - 2018-09-28
82
+
83
+ <small>[Compare with 0.3.4](https://github.com/pawamoy/shellman/compare/0.3.4...0.4.0)</small>
84
+
85
+ ### Added
86
+ - Add context variable to avoid escaping lines starting with given values ([742e023](https://github.com/pawamoy/shellman/commit/742e02321de656e80944d627a6cf727cbc6e66e0)).
87
+ - Add usagetext template ([a7c20fc](https://github.com/pawamoy/shellman/commit/a7c20fc751990c229018fc1b6c01835f9da5c193)).
88
+
89
+ ### Fixed
90
+ - Fix escape filter condition ([f32cd43](https://github.com/pawamoy/shellman/commit/f32cd43a0b4d88f841e7e5fee9633f7f772637e8)).
91
+ - Fix python 2 unicode decode error ([0040028](https://github.com/pawamoy/shellman/commit/0040028f245586bbdffe62b14218abc31539dc85)).
92
+ - Fix variables for output ([01155fb](https://github.com/pawamoy/shellman/commit/01155fbf3fcb4c1beb3ad867a428783ae647af57)).
93
+
94
+ ### Misc
95
+ - Improve error messages ([96ebb68](https://github.com/pawamoy/shellman/commit/96ebb68c01b7b132666bb900d7f20f2f1c296d65)).
96
+
97
+ ## [0.3.4](https://github.com/pawamoy/shellman/tags/0.3.4) - 2018-09-22
98
+
99
+ <small>[Compare with 0.3.3](https://github.com/pawamoy/shellman/compare/0.3.3...0.3.4)</small>
100
+
101
+ ### Fixed
102
+ - Fix writing UTF-8 contents to file for Python 2 ([9e99b23](https://github.com/pawamoy/shellman/commit/9e99b232d2c1171c9e3ee3b20f0f788b82d1d634)).
103
+
104
+ ### Misc
105
+ - Improve credits line ([f7a7cae](https://github.com/pawamoy/shellman/commit/f7a7cae8e1bf7363a73c127b542584e348dfae5c)).
106
+
107
+ ## [0.3.3](https://github.com/pawamoy/shellman/tags/0.3.3) - 2018-09-18
108
+
109
+ <small>[Compare with 0.3.2](https://github.com/pawamoy/shellman/compare/0.3.2...0.3.3)</small>
110
+
111
+ ### Fixed
112
+ - Fix manifest (missing setup.py) ([62ccfaf](https://github.com/pawamoy/shellman/commit/62ccfaf90c4bd301c625101763462bc0c5374567)).
113
+
114
+ ## [0.3.2](https://github.com/pawamoy/shellman/tags/0.3.2) - 2018-09-18
115
+
116
+ <small>[Compare with 0.3.1](https://github.com/pawamoy/shellman/compare/0.3.1...0.3.2)</small>
117
+
118
+ ### Misc
119
+ - Add logo and demo.svg to fix PyPI page ([1e06662](https://github.com/pawamoy/shellman/commit/1e066626e7bcfb919e4d0ce4508b9305a962551a)).
120
+
121
+ ## [0.3.1](https://github.com/pawamoy/shellman/tags/0.3.1) - 2018-09-18
122
+
123
+ <small>[Compare with 0.3.0](https://github.com/pawamoy/shellman/compare/0.3.0...0.3.1)</small>
124
+
125
+ ### Misc
126
+ - Reduce size of package, simplify manifest ([f123b53](https://github.com/pawamoy/shellman/commit/f123b53fc973e05db36f5370d48647d56c571dcf)).
127
+ - Switch documents to markdown ([f3917e9](https://github.com/pawamoy/shellman/commit/f3917e9c46566898681e075bbc45afb7151e015f)).
128
+
129
+ ## [0.3.0](https://github.com/pawamoy/shellman/tags/0.3.0) - 2018-09-17
130
+
131
+ <small>[Compare with 0.2.2](https://github.com/pawamoy/shellman/compare/0.2.2...0.3.0)</small>
132
+
133
+ ### Added
134
+ - Add credits in wikipage template ([e70b7c8](https://github.com/pawamoy/shellman/commit/e70b7c8fa4acef2acf1bd7a0dfd96383ef50fec4)).
135
+ - Add groupby_unsorted filter to improve option rendering ([2e42177](https://github.com/pawamoy/shellman/commit/2e421776319e8422ddf3191c98666e4c43e1ae16)).
136
+ - Add logo ([f9289a0](https://github.com/pawamoy/shellman/commit/f9289a0edbdc53ea16bfbc07bf4ac873ae8548f0)).
137
+ - Add new reader module ([ea13cfb](https://github.com/pawamoy/shellman/commit/ea13cfb4a31f9cee2f1a108fd9e1103cb5afda28)).
138
+ - Add option to smart_width to indent first line or not ([e625afb](https://github.com/pawamoy/shellman/commit/e625afbe1ba9a851bed40e4792d6fcd0e9fafab1)).
139
+ - Add vcsroot name variable ([f5db3b3](https://github.com/pawamoy/shellman/commit/f5db3b35f953a82eba64fc375e4f4638457b1e03)).
140
+
141
+ ### Changed
142
+ - Change README.rst to README.md ([4628e76](https://github.com/pawamoy/shellman/commit/4628e76bce717ea3ab47b7f29114caa7e1d50084)).
143
+
144
+ ### Fixed
145
+ - Fix code block ([de304ee](https://github.com/pawamoy/shellman/commit/de304eeb56ae2d3431ab6c5db9fdca7100ee2dbd)).
146
+ - Fix credits and readme url to gitlab plugins doc ([9958019](https://github.com/pawamoy/shellman/commit/9958019791d981ea566a1973c4f8aa47ae2d5ac2)).
147
+ - Fix get context from env ([f1e2296](https://github.com/pawamoy/shellman/commit/f1e2296646ecf523c559e7db3bdcd14779dd01fd)).
148
+ - Fix usage tag ([4a47431](https://github.com/pawamoy/shellman/commit/4a474311f748f70a07fceb8acfbabdaba634b3eb)).
149
+ - Fix wikipage template ([2f5a0ad](https://github.com/pawamoy/shellman/commit/2f5a0adf3ec8a28c242d1bcad426030fda9ac224)).
150
+
151
+ ### Removed
152
+ - Remove blank line in AUTHORS ([e414282](https://github.com/pawamoy/shellman/commit/e414282316518aa2a5f8895433f576d659720195)).
153
+ - Remove formatter options, enforce user behavior ([48c26d0](https://github.com/pawamoy/shellman/commit/48c26d03e328272b1001134c86be6d79e1736a90)).
154
+ - Remove MPL2.0 notices in sources (now ISC) ([87e92df](https://github.com/pawamoy/shellman/commit/87e92df8b9577968db090ac00bada17086368574)).
155
+ - Remove pyup file, remove option-description subtag (implicit) ([4a08fa1](https://github.com/pawamoy/shellman/commit/4a08fa1e42f5972cf462419f7869db6f9a5aafd9)).
156
+
157
+ ### Misc
158
+ - Allow failure for style and spell on travis ([4a7a60f](https://github.com/pawamoy/shellman/commit/4a7a60f208dcd654b7f9618b0157ffa584be3bea)).
159
+ - Automatically compute indent_str from indent, cast indent to int ([0a09554](https://github.com/pawamoy/shellman/commit/0a0955499450aa5c4069b5fafc38abc0db409094)).
160
+ - Handle multiple file input/output, fix some templates vars, format with black ([2c6672b](https://github.com/pawamoy/shellman/commit/2c6672b47b04082865528e6028dd1fd3645c7058)).
161
+ - Ignore bandit warning as irrelevant (no html templates) ([4947fe5](https://github.com/pawamoy/shellman/commit/4947fe59d912a954e775944f40da2be94dc095da)).
162
+ - Implement context abilities ([5e7c9d4](https://github.com/pawamoy/shellman/commit/5e7c9d4bcc3ddc52caca079a625a927959853843)).
163
+ - Implement plugin abilities ([cd4723f](https://github.com/pawamoy/shellman/commit/cd4723f84771d2d5f60fd0dc047d597b708a1c31)).
164
+ - Implement smart_width for text format, write more templates ([bb15f51](https://github.com/pawamoy/shellman/commit/bb15f518085c903033b8f9c007c67aba97db03da)).
165
+ - Improve helptext usage display, fix smartwrap indent ([11f78bf](https://github.com/pawamoy/shellman/commit/11f78bfcfb043fadc943ac60147293d74c6088d9)).
166
+ - Improve manpage groff template, fix various issues ([b829593](https://github.com/pawamoy/shellman/commit/b82959337e7f3c6801533c02976e74f55e268ff9)).
167
+ - Link up with argparse ([12f186d](https://github.com/pawamoy/shellman/commit/12f186dd1905f270fc095ff1539d0416d8911afc)).
168
+ - Rename tag to section ([5e80735](https://github.com/pawamoy/shellman/commit/5e80735f7f23c2dc9ca63dca94286f0a8763272b)).
169
+ - Update demo script and svg ([ec0c282](https://github.com/pawamoy/shellman/commit/ec0c282b282cf23fc97b2767928109d19df37f6d)).
170
+ - Update docs, simplify context usage ([8c6c950](https://github.com/pawamoy/shellman/commit/8c6c950f14f2b3f8502e16f2e9ff0fe209b00259)).
171
+ - Use GitLab-CI instead of Travis ([de662d0](https://github.com/pawamoy/shellman/commit/de662d03c8b4ee7cb4a35c2b1909da6415de597d)).
172
+
173
+
174
+ ## [0.2.2](https://github.com/pawamoy/shellman/tags/0.2.2) - 2017-05-02
175
+
176
+ <small>[Compare with 0.2.1](https://github.com/pawamoy/shellman/compare/0.2.1...0.2.2)</small>
177
+
178
+ ### Changed
179
+ - Change license from MPL 2.0 to ISC (no 'same license' condition) ([868b89e](https://github.com/pawamoy/shellman/commit/868b89ee7df7af36fdc3e4ce424a241867e89c24)).
180
+
181
+ ### Fixed
182
+ - Fix cli main return None -> 0 ([7beeecc](https://github.com/pawamoy/shellman/commit/7beeeccb559606bb2b338f2426fb3f5b91f840e7)).
183
+ - Fix codacy badge ([fe55efb](https://github.com/pawamoy/shellman/commit/fe55efbd2cd205df1f9b1ce8b02f2dd2d101ba6e)).
184
+ - Fix docs spelling ([69988a2](https://github.com/pawamoy/shellman/commit/69988a2e70e18108525ce6bf412cb743441b3516)).
185
+ - Fix installation instruction (--user does not install entry point...) ([aa2037b](https://github.com/pawamoy/shellman/commit/aa2037b627ce2e6e2fb1b83fa1fb0669545756ec)).
186
+ - Fix man synopsis section ([d79db9a](https://github.com/pawamoy/shellman/commit/d79db9a2c0e361374b1d8e8e376d95599605e9a0)).
187
+
188
+ ### Misc
189
+ - Begin to fix output option ([f1e5488](https://github.com/pawamoy/shellman/commit/f1e5488f997a065d26c5f20d00afd7efe93e234d)).
190
+ - Hide sphinx warnings, travis install enchant ([c216c78](https://github.com/pawamoy/shellman/commit/c216c780a3502b795bf96a3269f263aeac2c1a08)).
191
+ - Use codacy instead of codecov ([c024b1c](https://github.com/pawamoy/shellman/commit/c024b1ce8bfaf0aa7f0d71378d528cebd8e96c46)).
192
+
193
+
194
+ ## [0.2.1](https://github.com/pawamoy/shellman/tags/0.2.1) - 2016-12-06
195
+
196
+ <small>[Compare with 0.2.0](https://github.com/pawamoy/shellman/compare/0.2.0...0.2.1)</small>
197
+
198
+ ### Misc
199
+ - Update README, fix help display ([a131b82](https://github.com/pawamoy/shellman/commit/a131b82d84d68e4dfa5211cdc5dd26c930fa33c1)).
200
+
201
+
202
+ ## [0.2.0](https://github.com/pawamoy/shellman/tags/0.2.0) - 2016-12-06
203
+
204
+ <small>[Compare with first commit](https://github.com/pawamoy/shellman/compare/7c77c2bda82a2808aacc4500e01b33f082325ec5...0.2.0)</small>
205
+
206
+ ### Added
207
+ - Add check feature, add tests ([4916b51](https://github.com/pawamoy/shellman/commit/4916b514b85fcf6a87a81fe0d3ac6ed4f8bc1011)).
208
+ - Add demo example ([ec78d6b](https://github.com/pawamoy/shellman/commit/ec78d6bc2c238c02685e260494be37a510d0f015)).
209
+ - Add markdown format, improve python3 compatibility, add gitignore ([6b8c295](https://github.com/pawamoy/shellman/commit/6b8c2959e340bd999177b99c4f1a70286a19aaab)).
210
+ - Add tests ([4d08087](https://github.com/pawamoy/shellman/commit/4d080877799e33fba2b8a5ee0133257763ac80c2)).
211
+
212
+ ### Fixed
213
+ - Fix changing release date over upstream update ([11738c4](https://github.com/pawamoy/shellman/commit/11738c4484efae0535aa97abd77911752d8d4f47)).
214
+ - Fix command line usage and tests usage combination ([bcef7c9](https://github.com/pawamoy/shellman/commit/bcef7c9b5413584c740de2c028f0786e3c8ef48a)).
215
+ - Fix dangerous warning about sys.argv as default value ([effe263](https://github.com/pawamoy/shellman/commit/effe26350d8a0516a890c265b195089f83a7fda0)).
216
+
217
+ ### Misc
218
+ - Implement new structure ([40b4806](https://github.com/pawamoy/shellman/commit/40b48063b02b5cae1c7074f0921b411fb2aed9f6)).
219
+ - Setup tests ([5d50692](https://github.com/pawamoy/shellman/commit/5d50692ab5c49644039eab74d467335fded253c0)).
220
+ - Write doc ([1a8e0e4](https://github.com/pawamoy/shellman/commit/1a8e0e4d4624d8ca0eeb66dd78eb3d8b65a11f45)).
@@ -0,0 +1,133 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ dev@pawamoy.fr.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
133
+
@@ -0,0 +1,150 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated!
4
+ Every little bit helps, and credit will always be given.
5
+
6
+ ## Environment setup
7
+
8
+ Nothing easier!
9
+
10
+ Fork and clone the repository, then:
11
+
12
+ ```bash
13
+ cd shellman
14
+ make setup
15
+ ```
16
+
17
+ > NOTE:
18
+ > If it fails for some reason,
19
+ > you'll need to install
20
+ > [uv](https://github.com/astral-sh/uv)
21
+ > manually.
22
+ >
23
+ > You can install it with:
24
+ >
25
+ > ```bash
26
+ > curl -LsSf https://astral.sh/uv/install.sh | sh
27
+ > ```
28
+ >
29
+ > Now you can try running `make setup` again,
30
+ > or simply `uv sync`.
31
+
32
+ You now have the dependencies installed.
33
+
34
+ You can run the application with `make run shellman [ARGS...]`.
35
+
36
+ Run `make help` to see all the available actions!
37
+
38
+ ## Tasks
39
+
40
+ The entry-point to run commands and tasks is the `make` Python script,
41
+ located in the `scripts` directory. Try running `make` to show the available commands and tasks.
42
+ The *commands* do not need the Python dependencies to be installed,
43
+ while the *tasks* do.
44
+ The cross-platform tasks are written in Python, thanks to [duty](https://github.com/pawamoy/duty).
45
+
46
+ If you work in VSCode, we provide
47
+ [an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup)
48
+ for the project.
49
+
50
+ ## Development
51
+
52
+ As usual:
53
+
54
+ 1. create a new branch: `git switch -c feature-or-bugfix-name`
55
+ 1. edit the code and/or the documentation
56
+
57
+ **Before committing:**
58
+
59
+ 1. run `make format` to auto-format the code
60
+ 1. run `make check` to check everything (fix any warning)
61
+ 1. run `make test` to run the tests (fix any issue)
62
+ 1. if you updated the documentation or the project dependencies:
63
+ 1. run `make docs`
64
+ 1. go to http://localhost:8000 and check that everything looks good
65
+ 1. follow our [commit message convention](#commit-message-convention)
66
+
67
+ If you are unsure about how to fix or ignore a warning,
68
+ just let the continuous integration fail,
69
+ and we will help you during review.
70
+
71
+ Don't bother updating the changelog, we will take care of this.
72
+
73
+ ## Commit message convention
74
+
75
+ Commit messages must follow our convention based on the
76
+ [Angular style](https://gist.github.com/stephenparish/9941e89d80e2bc58a153#format-of-the-commit-message)
77
+ or the [Karma convention](https://karma-runner.github.io/4.0/dev/git-commit-msg.html):
78
+
79
+ ```
80
+ <type>[(scope)]: Subject
81
+
82
+ [Body]
83
+ ```
84
+
85
+ **Subject and body must be valid Markdown.**
86
+ Subject must have proper casing (uppercase for first letter
87
+ if it makes sense), but no dot at the end, and no punctuation
88
+ in general.
89
+
90
+ Scope and body are optional. Type can be:
91
+
92
+ - `build`: About packaging, building wheels, etc.
93
+ - `chore`: About packaging or repo/files management.
94
+ - `ci`: About Continuous Integration.
95
+ - `deps`: Dependencies update.
96
+ - `docs`: About documentation.
97
+ - `feat`: New feature.
98
+ - `fix`: Bug fix.
99
+ - `perf`: About performance.
100
+ - `refactor`: Changes that are not features or bug fixes.
101
+ - `style`: A change in code style/format.
102
+ - `tests`: About tests.
103
+
104
+ If you write a body, please add trailers at the end
105
+ (for example issues and PR references, or co-authors),
106
+ without relying on GitHub's flavored Markdown:
107
+
108
+ ```
109
+ Body.
110
+
111
+ Issue #10: https://github.com/namespace/project/issues/10
112
+ Related to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15
113
+ ```
114
+
115
+ These "trailers" must appear at the end of the body,
116
+ without any blank lines between them. The trailer title
117
+ can contain any character except colons `:`.
118
+ We expect a full URI for each trailer, not just GitHub autolinks
119
+ (for example, full GitHub URLs for commits and issues,
120
+ not the hash or the #issue-number).
121
+
122
+ We do not enforce a line length on commit messages summary and body,
123
+ but please avoid very long summaries, and very long lines in the body,
124
+ unless they are part of code blocks that must not be wrapped.
125
+
126
+ ## Pull requests guidelines
127
+
128
+ Link to any related issue in the Pull Request message.
129
+
130
+ During the review, we recommend using fixups:
131
+
132
+ ```bash
133
+ # SHA is the SHA of the commit you want to fix
134
+ git commit --fixup=SHA
135
+ ```
136
+
137
+ Once all the changes are approved, you can squash your commits:
138
+
139
+ ```bash
140
+ git rebase -i --autosquash main
141
+ ```
142
+
143
+ And force-push:
144
+
145
+ ```bash
146
+ git push -f
147
+ ```
148
+
149
+ If this seems all too complicated, you can push or force-push each new commit,
150
+ and we will squash them ourselves if needed, before merging.
@@ -1,6 +1,6 @@
1
1
  ISC License
2
2
 
3
- Copyright (c) 2017, Timothee Mazzucotelli
3
+ Copyright (c) 2020, Timothée Mazzucotelli
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.1
2
+ Name: shellman
3
+ Version: 1.0.1
4
+ Summary: Write documentation in comments and render it with templates.
5
+ Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
6
+ License: ISC
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Documentation
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Utilities
21
+ Classifier: Typing :: Typed
22
+ Project-URL: Homepage, https://pawamoy.github.io/shellman
23
+ Project-URL: Documentation, https://pawamoy.github.io/shellman
24
+ Project-URL: Changelog, https://pawamoy.github.io/shellman/changelog
25
+ Project-URL: Repository, https://github.com/pawamoy/shellman
26
+ Project-URL: Issues, https://github.com/pawamoy/shellman/issues
27
+ Project-URL: Discussions, https://github.com/pawamoy/shellman/discussions
28
+ Project-URL: Gitter, https://gitter.im/shellman/community
29
+ Project-URL: Funding, https://github.com/sponsors/pawamoy
30
+ Requires-Python: >=3.9
31
+ Requires-Dist: jinja2>=3
32
+ Requires-Dist: importlib-metadata>=4.6; python_version < "3.10"
33
+ Description-Content-Type: text/markdown
34
+
35
+ <p align="center">
36
+ <img src="https://rawgit.com/pawamoy/shellman/master/logo.png">
37
+ </p>
38
+
39
+ <h1 align="center">Shell Script Documentation</h1>
40
+
41
+ <p align="center">Write documentation in comments and render it with templates.</p>
42
+
43
+ <p align="center">
44
+ <a href="https://github.com/pawamoy/shellman/actions?query=workflow%3Aci">
45
+ <img alt="ci" src="https://github.com/pawamoy/shellman/workflows/ci/badge.svg" />
46
+ </a>
47
+ <a href="https://pawamoy.github.io/shellman/">
48
+ <img alt="documentation" src="https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat" />
49
+ </a>
50
+ <a href="https://pypi.org/project/shellman/">
51
+ <img alt="pypi" src="https://img.shields.io/pypi/v/shellman.svg" />
52
+ </a>
53
+ <a href="https://gitpod.io/#https://github.com/pawamoy/shellman">
54
+ <img alt="gitpod" src="https://img.shields.io/badge/gitpod-workspace-blue.svg?style=flat" />
55
+ </a>
56
+ <a href="https://gitter.im/shellman/community">
57
+ <img alt="gitter" src="https://badges.gitter.im/join%20chat.svg" />
58
+ </a>
59
+ </p>
60
+
61
+ `shellman` can generate man pages, wiki pages and help text
62
+ using documentation written in shell scripts comments.
63
+
64
+ For example:
65
+
66
+ ```bash
67
+ #!/bin/bash
68
+
69
+ ## \brief Just a demo
70
+ ## \desc This script actually does nothing.
71
+
72
+ main() {
73
+ case "$1" in
74
+ ## \option -h, --help
75
+ ## Print this help and exit.
76
+ -h|--help) shellman "$0"; exit 0 ;;
77
+ esac
78
+ }
79
+
80
+ ## \usage demo [-h]
81
+ main "$@"
82
+ ```
83
+
84
+ Output when calling ``./demo -h``:
85
+
86
+ ```
87
+ Usage: demo [-h]
88
+
89
+ This script actually does nothing.
90
+
91
+ Options:
92
+ -h, --help Print this help and exit.
93
+ ```
94
+
95
+ You can see more examples in the documentation: https://pawamoy.github.io/shellman/.
96
+
97
+ <h2 align="center">Demo</h2>
98
+ <p align="center"><img src="https://rawgit.com/pawamoy/shellman/master/demo.svg"></p>
99
+
100
+ In the demo above we saw the three builtin templates:
101
+ helptext, manpage and wikipage.
102
+
103
+ You can use your own templates
104
+ by specifying them with the ``--template path:my/template`` syntax.
105
+
106
+ You can also write a plugin, see the docs: https://pawamoy.github.io/shellman/plugins.
107
+
108
+ ## Installation
109
+
110
+ ```bash
111
+ pip install shellman
112
+ ```
113
+
114
+ With [`uv`](https://docs.astral.sh/uv/):
115
+
116
+ ```bash
117
+ uv tool install shellman
118
+ ```
119
+
120
+ ## Some projects using shellman
121
+
122
+ - [shellm](https://github.com/shellm-org) —
123
+ A collection of scripts and libraries
124
+ built on a [core inclusion-system](https://github.com/shellm-org/core),
125
+ all installable with [basher](https://github.com/basherpm/basher).
126
+ Here are a few examples:
127
+ - [daemon](https://github.com/shellm-org/daemon) —
128
+ A library that facilitates the writing of daemonized scripts that consume
129
+ files in a watched directory.
130
+ - [debug](https://github.com/shellm-org/debug) —
131
+ A simple script that sets the verbose/dry-run/debug
132
+ Bash flags before running another script.
133
+ - [format](https://github.com/shellm-org/format) —
134
+ Format your output with style and color.
135
+ - [home](https://github.com/shellm-org/home) —
136
+ A home for your shell scripts!
137
+ - [loop](https://github.com/shellm-org/loop) —
138
+ Control the flow of your loops (pause/resume/etc.).