article-cli 1.4.0__tar.gz → 2.0.0__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.
- {article_cli-1.4.0 → article_cli-2.0.0}/.gitignore +11 -1
- {article_cli-1.4.0 → article_cli-2.0.0}/PKG-INFO +122 -26
- {article_cli-1.4.0 → article_cli-2.0.0}/README.md +112 -21
- {article_cli-1.4.0 → article_cli-2.0.0}/pyproject.toml +25 -7
- {article_cli-1.4.0 → article_cli-2.0.0}/src/article_cli/__init__.py +1 -1
- article_cli-2.0.0/src/article_cli/cli.py +190 -0
- article_cli-2.0.0/src/article_cli/command_runner.py +67 -0
- article_cli-2.0.0/src/article_cli/commands/__init__.py +31 -0
- article_cli-2.0.0/src/article_cli/commands/bibtex.py +108 -0
- article_cli-2.0.0/src/article_cli/commands/clean.py +28 -0
- article_cli-2.0.0/src/article_cli/commands/compile.py +89 -0
- article_cli-2.0.0/src/article_cli/commands/config.py +102 -0
- article_cli-2.0.0/src/article_cli/commands/doctor.py +67 -0
- article_cli-2.0.0/src/article_cli/commands/fonts.py +70 -0
- article_cli-2.0.0/src/article_cli/commands/init.py +156 -0
- article_cli-2.0.0/src/article_cli/commands/release.py +172 -0
- article_cli-2.0.0/src/article_cli/commands/setup.py +32 -0
- article_cli-2.0.0/src/article_cli/commands/themes.py +97 -0
- article_cli-2.0.0/src/article_cli/commands/version.py +83 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/src/article_cli/config.py +106 -16
- article_cli-2.0.0/src/article_cli/doctor.py +968 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/src/article_cli/fonts.py +1 -1
- article_cli-2.0.0/src/article_cli/git_hooks.py +413 -0
- article_cli-2.0.0/src/article_cli/git_manager.py +477 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/src/article_cli/latex_compiler.py +167 -203
- article_cli-2.0.0/src/article_cli/project_context.py +225 -0
- article_cli-2.0.0/src/article_cli/reporting.py +39 -0
- article_cli-2.0.0/src/article_cli/repository_setup.py +1068 -0
- article_cli-2.0.0/src/article_cli/services/__init__.py +21 -0
- article_cli-2.0.0/src/article_cli/services/bibliography.py +109 -0
- article_cli-2.0.0/src/article_cli/services/compiler.py +130 -0
- article_cli-2.0.0/src/article_cli/services/git.py +29 -0
- article_cli-2.0.0/src/article_cli/services/gitinfo.py +125 -0
- article_cli-2.0.0/src/article_cli/services/release.py +564 -0
- article_cli-2.0.0/src/article_cli/services/workflow.py +68 -0
- article_cli-2.0.0/src/article_cli/template_renderer.py +70 -0
- article_cli-2.0.0/src/article_cli/templates/__init__.py +1 -0
- article_cli-2.0.0/src/article_cli/templates/article/ieee.tex.j2 +54 -0
- article_cli-2.0.0/src/article_cli/templates/article/lncs.tex.j2 +51 -0
- article_cli-2.0.0/src/article_cli/templates/article/lncs.typ.j2 +69 -0
- article_cli-2.0.0/src/article_cli/templates/article/main.tex.j2 +58 -0
- article_cli-2.0.0/src/article_cli/templates/article/main.typ.j2 +57 -0
- article_cli-2.0.0/src/article_cli/templates/github/latex.yml.j2 +407 -0
- article_cli-2.0.0/src/article_cli/templates/poster/poster.tex.j2 +55 -0
- article_cli-2.0.0/src/article_cli/templates/poster/poster.typ.j2 +97 -0
- article_cli-2.0.0/src/article_cli/templates/presentation/beamer.tex.j2 +68 -0
- article_cli-2.0.0/src/article_cli/templates/presentation/typst.typ.j2 +114 -0
- article_cli-2.0.0/src/article_cli/templates/project/README.md.j2 +164 -0
- article_cli-2.0.0/src/article_cli/templates/project/gitignore.j2 +42 -0
- article_cli-2.0.0/src/article_cli/templates/project/pyproject.toml.j2 +116 -0
- article_cli-2.0.0/src/article_cli/templates/project/vscode-settings.json.j2 +128 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/src/article_cli/themes.py +1 -1
- {article_cli-1.4.0 → article_cli-2.0.0}/src/article_cli/typst_compiler.py +24 -1
- article_cli-2.0.0/src/article_cli/zotero.py +758 -0
- article_cli-2.0.0/tests/golden/__init__.py +1 -0
- article_cli-2.0.0/tests/golden/article_main.tex +58 -0
- article_cli-2.0.0/tests/test_cli.py +323 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/tests/test_config.py +9 -0
- article_cli-2.0.0/tests/test_doctor.py +242 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/tests/test_latex_compiler.py +59 -4
- article_cli-2.0.0/tests/test_project_context.py +65 -0
- article_cli-2.0.0/tests/test_release_service.py +193 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/tests/test_repository_setup.py +411 -0
- article_cli-2.0.0/tests/test_services.py +246 -0
- article_cli-2.0.0/tests/test_template_renderer.py +49 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/tests/test_typst_compiler.py +33 -4
- article_cli-2.0.0/tests/test_workflow_ci.py +107 -0
- article_cli-2.0.0/tests/test_zotero_bibliography.py +166 -0
- article_cli-1.4.0/src/article_cli/cli.py +0 -740
- article_cli-1.4.0/src/article_cli/git_manager.py +0 -356
- article_cli-1.4.0/src/article_cli/repository_setup.py +0 -2020
- article_cli-1.4.0/src/article_cli/zotero.py +0 -369
- {article_cli-1.4.0 → article_cli-2.0.0}/LICENSE +0 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/src/article_cli/__main__.py +0 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/tests/__init__.py +0 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/tests/test_fonts.py +0 -0
- {article_cli-1.4.0 → article_cli-2.0.0}/tests/test_themes.py +0 -0
|
@@ -27,6 +27,16 @@ share/python-wheels/
|
|
|
27
27
|
*.egg
|
|
28
28
|
MANIFEST
|
|
29
29
|
|
|
30
|
+
# Node / Antora documentation
|
|
31
|
+
node_modules/
|
|
32
|
+
npm-debug.log*
|
|
33
|
+
yarn-debug.log*
|
|
34
|
+
yarn-error.log*
|
|
35
|
+
|
|
36
|
+
# Generated/downloaded font assets
|
|
37
|
+
fonts/
|
|
38
|
+
fonts-test/
|
|
39
|
+
|
|
30
40
|
# PyInstaller
|
|
31
41
|
# Usually these files are written by a python script from a template
|
|
32
42
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
@@ -139,4 +149,4 @@ dmypy.json
|
|
|
139
149
|
Thumbs.db
|
|
140
150
|
|
|
141
151
|
# Test configurations
|
|
142
|
-
test-config.toml
|
|
152
|
+
test-config.toml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: article-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: CLI tool for managing LaTeX and Typst documents with git integration and Zotero bibliography
|
|
5
5
|
Project-URL: Homepage, https://github.com/feelpp/article.cli
|
|
6
6
|
Project-URL: Documentation, https://github.com/feelpp/article.cli#readme
|
|
@@ -35,21 +35,26 @@ Classifier: Intended Audience :: Science/Research
|
|
|
35
35
|
Classifier: License :: OSI Approved :: MIT License
|
|
36
36
|
Classifier: Operating System :: OS Independent
|
|
37
37
|
Classifier: Programming Language :: Python :: 3
|
|
38
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
39
38
|
Classifier: Programming Language :: Python :: 3.9
|
|
40
39
|
Classifier: Programming Language :: Python :: 3.10
|
|
41
40
|
Classifier: Programming Language :: Python :: 3.11
|
|
42
41
|
Classifier: Programming Language :: Python :: 3.12
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
43
43
|
Classifier: Topic :: Scientific/Engineering
|
|
44
44
|
Classifier: Topic :: Text Processing :: Markup :: LaTeX
|
|
45
|
-
Requires-Python: >=3.
|
|
45
|
+
Requires-Python: >=3.9
|
|
46
|
+
Requires-Dist: jinja2>=3.1
|
|
47
|
+
Requires-Dist: pyyaml>=6.0
|
|
46
48
|
Requires-Dist: requests>=2.28.0
|
|
49
|
+
Requires-Dist: tomli>=2.0.0; python_version < '3.11'
|
|
47
50
|
Provides-Extra: dev
|
|
48
|
-
Requires-Dist: black
|
|
51
|
+
Requires-Dist: black==25.11.0; extra == 'dev'
|
|
52
|
+
Requires-Dist: build>=1.2.0; extra == 'dev'
|
|
49
53
|
Requires-Dist: flake8>=6.0; extra == 'dev'
|
|
50
|
-
Requires-Dist: mypy
|
|
54
|
+
Requires-Dist: mypy<2.0,>=1.0; extra == 'dev'
|
|
51
55
|
Requires-Dist: pytest-cov; extra == 'dev'
|
|
52
56
|
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
57
|
+
Requires-Dist: twine>=5.0.0; extra == 'dev'
|
|
53
58
|
Requires-Dist: types-requests; extra == 'dev'
|
|
54
59
|
Description-Content-Type: text/markdown
|
|
55
60
|
|
|
@@ -71,17 +76,19 @@ A command-line tool for managing LaTeX and Typst documents with git integration
|
|
|
71
76
|
- **GitHub Actions Workflows**: Automated PDF compilation with XeLaTeX support, artifact upload, and GitHub releases
|
|
72
77
|
- **Git Release Management**: Create, list, and delete releases with gitinfo2 support
|
|
73
78
|
- **Zotero Integration**: Synchronize bibliography from Zotero with robust pagination and error handling
|
|
79
|
+
- **Lifecycle Commands**: Use `init`, `setup`, `doctor`, `bib update`, `compile`, `version`, and `release`
|
|
74
80
|
- **LaTeX Build Management**: Clean build files and manage LaTeX compilation artifacts
|
|
75
81
|
- **Git Hooks Setup**: Automated setup of git hooks for gitinfo2 integration
|
|
82
|
+
- **Repository Diagnostics**: `doctor` checks for git, hooks, build tools, Zotero, workflows, release readiness, and safe repairs with `--fix`
|
|
76
83
|
- **Project Configuration**: Auto-generates pyproject.toml with article-cli settings
|
|
77
|
-
- **Documentation**: Creates README
|
|
84
|
+
- **Documentation**: Creates project README files and ships an Antora documentation site
|
|
78
85
|
|
|
79
86
|
## Installation
|
|
80
87
|
|
|
81
88
|
### From PyPI (recommended)
|
|
82
89
|
|
|
83
90
|
```bash
|
|
84
|
-
|
|
91
|
+
uv tool install article-cli
|
|
85
92
|
```
|
|
86
93
|
|
|
87
94
|
### From Source
|
|
@@ -89,9 +96,32 @@ pip install article-cli
|
|
|
89
96
|
```bash
|
|
90
97
|
git clone https://github.com/feelpp/article.cli.git
|
|
91
98
|
cd article.cli
|
|
92
|
-
|
|
99
|
+
uv sync --all-extras --dev
|
|
100
|
+
uv run article-cli --help
|
|
93
101
|
```
|
|
94
102
|
|
|
103
|
+
### Development Commands
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
uv sync --all-extras --dev
|
|
107
|
+
uv run pytest
|
|
108
|
+
uv run black --check src tests
|
|
109
|
+
uv run mypy src
|
|
110
|
+
uv build
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Documentation Site
|
|
114
|
+
|
|
115
|
+
The documentation site is built with Antora and the Feel++ Antora UI bundle:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm install
|
|
119
|
+
npm run docs:build
|
|
120
|
+
npm run docs:preview
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The generated site is written to `build/site`.
|
|
124
|
+
|
|
95
125
|
## Quick Start
|
|
96
126
|
|
|
97
127
|
### For New Projects
|
|
@@ -117,8 +147,12 @@ pip install -e .
|
|
|
117
147
|
|
|
118
148
|
3. **Setup git hooks and update bibliography**:
|
|
119
149
|
```bash
|
|
150
|
+
article-cli doctor
|
|
151
|
+
article-cli doctor --fix
|
|
152
|
+
article-cli setup --dry-run
|
|
120
153
|
article-cli setup
|
|
121
|
-
article-cli update-
|
|
154
|
+
article-cli bib update --dry-run
|
|
155
|
+
article-cli bib update
|
|
122
156
|
```
|
|
123
157
|
|
|
124
158
|
4. **Commit and push** to trigger automated PDF compilation!
|
|
@@ -127,6 +161,8 @@ pip install -e .
|
|
|
127
161
|
|
|
128
162
|
1. **Setup git hooks** (run once per repository):
|
|
129
163
|
```bash
|
|
164
|
+
article-cli doctor
|
|
165
|
+
article-cli doctor --fix
|
|
130
166
|
article-cli setup
|
|
131
167
|
```
|
|
132
168
|
|
|
@@ -138,12 +174,15 @@ pip install -e .
|
|
|
138
174
|
|
|
139
175
|
3. **Update bibliography from Zotero**:
|
|
140
176
|
```bash
|
|
141
|
-
article-cli update
|
|
177
|
+
article-cli bib update
|
|
142
178
|
```
|
|
143
179
|
|
|
144
|
-
4. **
|
|
180
|
+
4. **Compile, refresh version metadata, and create a release**:
|
|
145
181
|
```bash
|
|
146
|
-
article-cli
|
|
182
|
+
article-cli compile
|
|
183
|
+
article-cli version
|
|
184
|
+
article-cli release v1.0.0 --dry-run
|
|
185
|
+
article-cli release v1.0.0
|
|
147
186
|
```
|
|
148
187
|
|
|
149
188
|
## Configuration
|
|
@@ -166,9 +205,18 @@ group_id = "4678293" # Default for article.template
|
|
|
166
205
|
output_file = "references.bib"
|
|
167
206
|
|
|
168
207
|
[git]
|
|
169
|
-
auto_push =
|
|
208
|
+
auto_push = false
|
|
170
209
|
default_branch = "main"
|
|
171
210
|
|
|
211
|
+
[workflow]
|
|
212
|
+
runner_policy = "github"
|
|
213
|
+
github_runner = "ubuntu-24.04"
|
|
214
|
+
self_hosted_label = "self-texlive"
|
|
215
|
+
self_hosted_org = ""
|
|
216
|
+
bibliography = "off"
|
|
217
|
+
release = "github"
|
|
218
|
+
artifact_includes = []
|
|
219
|
+
|
|
172
220
|
[latex]
|
|
173
221
|
clean_extensions = [".aux", ".bbl", ".blg", ".log", ".out", ".synctex.gz"]
|
|
174
222
|
|
|
@@ -224,6 +272,13 @@ article-cli init --title "My Article" --authors "Author" --tex-file article.tex
|
|
|
224
272
|
|
|
225
273
|
# Force overwrite existing files
|
|
226
274
|
article-cli init --title "My Article" --authors "Author" --force
|
|
275
|
+
|
|
276
|
+
# Generate CI that checks Zotero bibliography freshness
|
|
277
|
+
article-cli init --title "My Article" --authors "Author" --ci-bib check
|
|
278
|
+
|
|
279
|
+
# Generate CI with opt-in self-hosted runner discovery
|
|
280
|
+
article-cli init --title "My Article" --authors "Author" \
|
|
281
|
+
--ci-runner-policy self-hosted-auto --ci-self-hosted-org my-org
|
|
227
282
|
```
|
|
228
283
|
|
|
229
284
|
The `init` command sets up:
|
|
@@ -237,27 +292,48 @@ The `init` command sets up:
|
|
|
237
292
|
### Git Release Management
|
|
238
293
|
|
|
239
294
|
```bash
|
|
240
|
-
#
|
|
241
|
-
article-cli
|
|
295
|
+
# Refresh gitinfo2 version metadata
|
|
296
|
+
article-cli version
|
|
297
|
+
|
|
298
|
+
# Refresh metadata, compile, and check the PDF version text
|
|
299
|
+
article-cli version --compile --check-pdf
|
|
300
|
+
|
|
301
|
+
# Preview a new release tag
|
|
302
|
+
article-cli release v1 --dry-run
|
|
303
|
+
|
|
304
|
+
# Create a checked local release tag
|
|
305
|
+
article-cli release v1
|
|
306
|
+
|
|
307
|
+
# Check bibliography freshness during release, then push the tag
|
|
308
|
+
article-cli release v1 --bib check --push
|
|
242
309
|
|
|
243
310
|
# List recent releases
|
|
244
311
|
article-cli list --count 10
|
|
245
312
|
|
|
246
313
|
# Delete a release
|
|
247
314
|
article-cli delete v1.2.3
|
|
315
|
+
|
|
316
|
+
# Deprecated alias retained for compatibility
|
|
317
|
+
article-cli create v1.2.3
|
|
248
318
|
```
|
|
249
319
|
|
|
250
320
|
### Bibliography Management
|
|
251
321
|
|
|
252
322
|
```bash
|
|
323
|
+
# Preview bibliography update
|
|
324
|
+
article-cli bib update --dry-run
|
|
325
|
+
|
|
253
326
|
# Update bibliography from Zotero
|
|
254
|
-
article-cli update
|
|
327
|
+
article-cli bib update
|
|
255
328
|
|
|
256
329
|
# Specify custom output file
|
|
257
|
-
article-cli update
|
|
330
|
+
article-cli bib update --output my-refs.bib
|
|
258
331
|
|
|
259
332
|
# Skip backup creation
|
|
260
|
-
article-cli update
|
|
333
|
+
article-cli bib update --no-backup
|
|
334
|
+
|
|
335
|
+
# Deprecated alias retained for compatibility
|
|
336
|
+
article-cli update-bibtex
|
|
261
337
|
```
|
|
262
338
|
|
|
263
339
|
### LaTeX Compilation
|
|
@@ -389,6 +465,15 @@ article-cli compile presentation.typ --font-path fonts/
|
|
|
389
465
|
### Project Setup
|
|
390
466
|
|
|
391
467
|
```bash
|
|
468
|
+
# Diagnose repository readiness without modifying files
|
|
469
|
+
article-cli doctor
|
|
470
|
+
|
|
471
|
+
# Emit machine-readable diagnostics for CI
|
|
472
|
+
article-cli doctor --json
|
|
473
|
+
|
|
474
|
+
# Apply safe repairs for hooks, output directories, and gitHeadLocal.gin
|
|
475
|
+
article-cli doctor --fix
|
|
476
|
+
|
|
392
477
|
# Setup git hooks for gitinfo2
|
|
393
478
|
article-cli setup
|
|
394
479
|
|
|
@@ -400,24 +485,28 @@ article-cli clean
|
|
|
400
485
|
|
|
401
486
|
```bash
|
|
402
487
|
# Override configuration via command line
|
|
403
|
-
article-cli update
|
|
488
|
+
article-cli bib update --api-key YOUR_KEY --group-id YOUR_GROUP
|
|
404
489
|
|
|
405
490
|
# Specify custom configuration file
|
|
406
|
-
article-cli --config custom-config.toml update
|
|
491
|
+
article-cli --config custom-config.toml bib update
|
|
407
492
|
```
|
|
408
493
|
|
|
409
|
-
##
|
|
494
|
+
## Release Tags
|
|
495
|
+
|
|
496
|
+
The default paper release policy accepts short and full version tags:
|
|
497
|
+
- `vX` for paper milestones (e.g., `v1`)
|
|
498
|
+
- `vX.Y` or `vX.Y.Z` for more detailed paper releases
|
|
499
|
+
- `vX.Y.Z-rc.N`, `vX.Y.Z-beta.N`, or similar pre-release suffixes
|
|
410
500
|
|
|
411
|
-
|
|
412
|
-
- `vX.Y.Z` for stable releases (e.g., `v1.2.3`)
|
|
413
|
-
- `vX.Y.Z-pre.N` for pre-releases (e.g., `v1.2.3-pre.1`)
|
|
501
|
+
Use `[tool.article-cli.release] tag_policy = "semver"` when a repository must require strict `vX.Y.Z` semantic-version tags. The release command does not commit, force-retag, push, or create a GitHub release unless the corresponding explicit flag is passed.
|
|
414
502
|
|
|
415
503
|
## Requirements
|
|
416
504
|
|
|
417
|
-
- Python 3.
|
|
505
|
+
- Python 3.9+
|
|
418
506
|
- Git repository with gitinfo2 package (for LaTeX integration)
|
|
419
507
|
- Zotero account with API access (for bibliography features)
|
|
420
508
|
- Typst CLI (for Typst compilation) - install from https://typst.app/
|
|
509
|
+
- Node.js 20+ for building the Antora documentation site
|
|
421
510
|
|
|
422
511
|
## License
|
|
423
512
|
|
|
@@ -433,6 +522,13 @@ MIT License - see LICENSE file for details.
|
|
|
433
522
|
|
|
434
523
|
## Changelog
|
|
435
524
|
|
|
525
|
+
### v1.5.0
|
|
526
|
+
- Add `doctor` diagnostics with JSON output and safe `--fix` repairs
|
|
527
|
+
- Split CLI implementation into command modules
|
|
528
|
+
- Make setup hooks more robust and worktree-safe
|
|
529
|
+
- Standardize development and CI workflows on `uv`
|
|
530
|
+
- Add an Antora documentation site using the Feel++ Antora UI
|
|
531
|
+
|
|
436
532
|
### v1.4.0
|
|
437
533
|
- Add full Typst document compilation support
|
|
438
534
|
- New `TypstCompiler` class for Typst documents
|
|
@@ -466,4 +562,4 @@ MIT License - see LICENSE file for details.
|
|
|
466
562
|
- Git release management
|
|
467
563
|
- Zotero bibliography synchronization
|
|
468
564
|
- LaTeX build file cleanup
|
|
469
|
-
- Configuration file support
|
|
565
|
+
- Configuration file support
|
|
@@ -16,17 +16,19 @@ A command-line tool for managing LaTeX and Typst documents with git integration
|
|
|
16
16
|
- **GitHub Actions Workflows**: Automated PDF compilation with XeLaTeX support, artifact upload, and GitHub releases
|
|
17
17
|
- **Git Release Management**: Create, list, and delete releases with gitinfo2 support
|
|
18
18
|
- **Zotero Integration**: Synchronize bibliography from Zotero with robust pagination and error handling
|
|
19
|
+
- **Lifecycle Commands**: Use `init`, `setup`, `doctor`, `bib update`, `compile`, `version`, and `release`
|
|
19
20
|
- **LaTeX Build Management**: Clean build files and manage LaTeX compilation artifacts
|
|
20
21
|
- **Git Hooks Setup**: Automated setup of git hooks for gitinfo2 integration
|
|
22
|
+
- **Repository Diagnostics**: `doctor` checks for git, hooks, build tools, Zotero, workflows, release readiness, and safe repairs with `--fix`
|
|
21
23
|
- **Project Configuration**: Auto-generates pyproject.toml with article-cli settings
|
|
22
|
-
- **Documentation**: Creates README
|
|
24
|
+
- **Documentation**: Creates project README files and ships an Antora documentation site
|
|
23
25
|
|
|
24
26
|
## Installation
|
|
25
27
|
|
|
26
28
|
### From PyPI (recommended)
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
|
-
|
|
31
|
+
uv tool install article-cli
|
|
30
32
|
```
|
|
31
33
|
|
|
32
34
|
### From Source
|
|
@@ -34,9 +36,32 @@ pip install article-cli
|
|
|
34
36
|
```bash
|
|
35
37
|
git clone https://github.com/feelpp/article.cli.git
|
|
36
38
|
cd article.cli
|
|
37
|
-
|
|
39
|
+
uv sync --all-extras --dev
|
|
40
|
+
uv run article-cli --help
|
|
38
41
|
```
|
|
39
42
|
|
|
43
|
+
### Development Commands
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
uv sync --all-extras --dev
|
|
47
|
+
uv run pytest
|
|
48
|
+
uv run black --check src tests
|
|
49
|
+
uv run mypy src
|
|
50
|
+
uv build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Documentation Site
|
|
54
|
+
|
|
55
|
+
The documentation site is built with Antora and the Feel++ Antora UI bundle:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install
|
|
59
|
+
npm run docs:build
|
|
60
|
+
npm run docs:preview
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The generated site is written to `build/site`.
|
|
64
|
+
|
|
40
65
|
## Quick Start
|
|
41
66
|
|
|
42
67
|
### For New Projects
|
|
@@ -62,8 +87,12 @@ pip install -e .
|
|
|
62
87
|
|
|
63
88
|
3. **Setup git hooks and update bibliography**:
|
|
64
89
|
```bash
|
|
90
|
+
article-cli doctor
|
|
91
|
+
article-cli doctor --fix
|
|
92
|
+
article-cli setup --dry-run
|
|
65
93
|
article-cli setup
|
|
66
|
-
article-cli update-
|
|
94
|
+
article-cli bib update --dry-run
|
|
95
|
+
article-cli bib update
|
|
67
96
|
```
|
|
68
97
|
|
|
69
98
|
4. **Commit and push** to trigger automated PDF compilation!
|
|
@@ -72,6 +101,8 @@ pip install -e .
|
|
|
72
101
|
|
|
73
102
|
1. **Setup git hooks** (run once per repository):
|
|
74
103
|
```bash
|
|
104
|
+
article-cli doctor
|
|
105
|
+
article-cli doctor --fix
|
|
75
106
|
article-cli setup
|
|
76
107
|
```
|
|
77
108
|
|
|
@@ -83,12 +114,15 @@ pip install -e .
|
|
|
83
114
|
|
|
84
115
|
3. **Update bibliography from Zotero**:
|
|
85
116
|
```bash
|
|
86
|
-
article-cli update
|
|
117
|
+
article-cli bib update
|
|
87
118
|
```
|
|
88
119
|
|
|
89
|
-
4. **
|
|
120
|
+
4. **Compile, refresh version metadata, and create a release**:
|
|
90
121
|
```bash
|
|
91
|
-
article-cli
|
|
122
|
+
article-cli compile
|
|
123
|
+
article-cli version
|
|
124
|
+
article-cli release v1.0.0 --dry-run
|
|
125
|
+
article-cli release v1.0.0
|
|
92
126
|
```
|
|
93
127
|
|
|
94
128
|
## Configuration
|
|
@@ -111,9 +145,18 @@ group_id = "4678293" # Default for article.template
|
|
|
111
145
|
output_file = "references.bib"
|
|
112
146
|
|
|
113
147
|
[git]
|
|
114
|
-
auto_push =
|
|
148
|
+
auto_push = false
|
|
115
149
|
default_branch = "main"
|
|
116
150
|
|
|
151
|
+
[workflow]
|
|
152
|
+
runner_policy = "github"
|
|
153
|
+
github_runner = "ubuntu-24.04"
|
|
154
|
+
self_hosted_label = "self-texlive"
|
|
155
|
+
self_hosted_org = ""
|
|
156
|
+
bibliography = "off"
|
|
157
|
+
release = "github"
|
|
158
|
+
artifact_includes = []
|
|
159
|
+
|
|
117
160
|
[latex]
|
|
118
161
|
clean_extensions = [".aux", ".bbl", ".blg", ".log", ".out", ".synctex.gz"]
|
|
119
162
|
|
|
@@ -169,6 +212,13 @@ article-cli init --title "My Article" --authors "Author" --tex-file article.tex
|
|
|
169
212
|
|
|
170
213
|
# Force overwrite existing files
|
|
171
214
|
article-cli init --title "My Article" --authors "Author" --force
|
|
215
|
+
|
|
216
|
+
# Generate CI that checks Zotero bibliography freshness
|
|
217
|
+
article-cli init --title "My Article" --authors "Author" --ci-bib check
|
|
218
|
+
|
|
219
|
+
# Generate CI with opt-in self-hosted runner discovery
|
|
220
|
+
article-cli init --title "My Article" --authors "Author" \
|
|
221
|
+
--ci-runner-policy self-hosted-auto --ci-self-hosted-org my-org
|
|
172
222
|
```
|
|
173
223
|
|
|
174
224
|
The `init` command sets up:
|
|
@@ -182,27 +232,48 @@ The `init` command sets up:
|
|
|
182
232
|
### Git Release Management
|
|
183
233
|
|
|
184
234
|
```bash
|
|
185
|
-
#
|
|
186
|
-
article-cli
|
|
235
|
+
# Refresh gitinfo2 version metadata
|
|
236
|
+
article-cli version
|
|
237
|
+
|
|
238
|
+
# Refresh metadata, compile, and check the PDF version text
|
|
239
|
+
article-cli version --compile --check-pdf
|
|
240
|
+
|
|
241
|
+
# Preview a new release tag
|
|
242
|
+
article-cli release v1 --dry-run
|
|
243
|
+
|
|
244
|
+
# Create a checked local release tag
|
|
245
|
+
article-cli release v1
|
|
246
|
+
|
|
247
|
+
# Check bibliography freshness during release, then push the tag
|
|
248
|
+
article-cli release v1 --bib check --push
|
|
187
249
|
|
|
188
250
|
# List recent releases
|
|
189
251
|
article-cli list --count 10
|
|
190
252
|
|
|
191
253
|
# Delete a release
|
|
192
254
|
article-cli delete v1.2.3
|
|
255
|
+
|
|
256
|
+
# Deprecated alias retained for compatibility
|
|
257
|
+
article-cli create v1.2.3
|
|
193
258
|
```
|
|
194
259
|
|
|
195
260
|
### Bibliography Management
|
|
196
261
|
|
|
197
262
|
```bash
|
|
263
|
+
# Preview bibliography update
|
|
264
|
+
article-cli bib update --dry-run
|
|
265
|
+
|
|
198
266
|
# Update bibliography from Zotero
|
|
199
|
-
article-cli update
|
|
267
|
+
article-cli bib update
|
|
200
268
|
|
|
201
269
|
# Specify custom output file
|
|
202
|
-
article-cli update
|
|
270
|
+
article-cli bib update --output my-refs.bib
|
|
203
271
|
|
|
204
272
|
# Skip backup creation
|
|
205
|
-
article-cli update
|
|
273
|
+
article-cli bib update --no-backup
|
|
274
|
+
|
|
275
|
+
# Deprecated alias retained for compatibility
|
|
276
|
+
article-cli update-bibtex
|
|
206
277
|
```
|
|
207
278
|
|
|
208
279
|
### LaTeX Compilation
|
|
@@ -334,6 +405,15 @@ article-cli compile presentation.typ --font-path fonts/
|
|
|
334
405
|
### Project Setup
|
|
335
406
|
|
|
336
407
|
```bash
|
|
408
|
+
# Diagnose repository readiness without modifying files
|
|
409
|
+
article-cli doctor
|
|
410
|
+
|
|
411
|
+
# Emit machine-readable diagnostics for CI
|
|
412
|
+
article-cli doctor --json
|
|
413
|
+
|
|
414
|
+
# Apply safe repairs for hooks, output directories, and gitHeadLocal.gin
|
|
415
|
+
article-cli doctor --fix
|
|
416
|
+
|
|
337
417
|
# Setup git hooks for gitinfo2
|
|
338
418
|
article-cli setup
|
|
339
419
|
|
|
@@ -345,24 +425,28 @@ article-cli clean
|
|
|
345
425
|
|
|
346
426
|
```bash
|
|
347
427
|
# Override configuration via command line
|
|
348
|
-
article-cli update
|
|
428
|
+
article-cli bib update --api-key YOUR_KEY --group-id YOUR_GROUP
|
|
349
429
|
|
|
350
430
|
# Specify custom configuration file
|
|
351
|
-
article-cli --config custom-config.toml update
|
|
431
|
+
article-cli --config custom-config.toml bib update
|
|
352
432
|
```
|
|
353
433
|
|
|
354
|
-
##
|
|
434
|
+
## Release Tags
|
|
435
|
+
|
|
436
|
+
The default paper release policy accepts short and full version tags:
|
|
437
|
+
- `vX` for paper milestones (e.g., `v1`)
|
|
438
|
+
- `vX.Y` or `vX.Y.Z` for more detailed paper releases
|
|
439
|
+
- `vX.Y.Z-rc.N`, `vX.Y.Z-beta.N`, or similar pre-release suffixes
|
|
355
440
|
|
|
356
|
-
|
|
357
|
-
- `vX.Y.Z` for stable releases (e.g., `v1.2.3`)
|
|
358
|
-
- `vX.Y.Z-pre.N` for pre-releases (e.g., `v1.2.3-pre.1`)
|
|
441
|
+
Use `[tool.article-cli.release] tag_policy = "semver"` when a repository must require strict `vX.Y.Z` semantic-version tags. The release command does not commit, force-retag, push, or create a GitHub release unless the corresponding explicit flag is passed.
|
|
359
442
|
|
|
360
443
|
## Requirements
|
|
361
444
|
|
|
362
|
-
- Python 3.
|
|
445
|
+
- Python 3.9+
|
|
363
446
|
- Git repository with gitinfo2 package (for LaTeX integration)
|
|
364
447
|
- Zotero account with API access (for bibliography features)
|
|
365
448
|
- Typst CLI (for Typst compilation) - install from https://typst.app/
|
|
449
|
+
- Node.js 20+ for building the Antora documentation site
|
|
366
450
|
|
|
367
451
|
## License
|
|
368
452
|
|
|
@@ -378,6 +462,13 @@ MIT License - see LICENSE file for details.
|
|
|
378
462
|
|
|
379
463
|
## Changelog
|
|
380
464
|
|
|
465
|
+
### v1.5.0
|
|
466
|
+
- Add `doctor` diagnostics with JSON output and safe `--fix` repairs
|
|
467
|
+
- Split CLI implementation into command modules
|
|
468
|
+
- Make setup hooks more robust and worktree-safe
|
|
469
|
+
- Standardize development and CI workflows on `uv`
|
|
470
|
+
- Add an Antora documentation site using the Feel++ Antora UI
|
|
471
|
+
|
|
381
472
|
### v1.4.0
|
|
382
473
|
- Add full Typst document compilation support
|
|
383
474
|
- New `TypstCompiler` class for Typst documents
|
|
@@ -411,4 +502,4 @@ MIT License - see LICENSE file for details.
|
|
|
411
502
|
- Git release management
|
|
412
503
|
- Zotero bibliography synchronization
|
|
413
504
|
- LaTeX build file cleanup
|
|
414
|
-
- Configuration file support
|
|
505
|
+
- Configuration file support
|
|
@@ -4,40 +4,57 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "article-cli"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.0"
|
|
8
8
|
authors = [
|
|
9
9
|
{name = "Christophe Prud'homme", email = "prudhomm@cemosis.fr"},
|
|
10
10
|
]
|
|
11
11
|
description = "CLI tool for managing LaTeX and Typst documents with git integration and Zotero bibliography"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
license = {file = "LICENSE"}
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.9"
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Development Status :: 4 - Beta",
|
|
17
17
|
"Intended Audience :: Science/Research",
|
|
18
18
|
"License :: OSI Approved :: MIT License",
|
|
19
19
|
"Operating System :: OS Independent",
|
|
20
20
|
"Programming Language :: Python :: 3",
|
|
21
|
-
"Programming Language :: Python :: 3.8",
|
|
22
21
|
"Programming Language :: Python :: 3.9",
|
|
23
22
|
"Programming Language :: Python :: 3.10",
|
|
24
23
|
"Programming Language :: Python :: 3.11",
|
|
25
24
|
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
26
|
"Topic :: Scientific/Engineering",
|
|
27
27
|
"Topic :: Text Processing :: Markup :: LaTeX",
|
|
28
28
|
]
|
|
29
29
|
keywords = ["latex", "typst", "git", "zotero", "bibliography", "academic", "research", "presentations"]
|
|
30
30
|
dependencies = [
|
|
31
31
|
"requests>=2.28.0",
|
|
32
|
+
"PyYAML>=6.0",
|
|
33
|
+
"Jinja2>=3.1",
|
|
34
|
+
"tomli>=2.0.0; python_version < '3.11'",
|
|
32
35
|
]
|
|
33
36
|
|
|
34
37
|
[project.optional-dependencies]
|
|
35
38
|
dev = [
|
|
36
39
|
"pytest>=7.0",
|
|
37
40
|
"pytest-cov",
|
|
38
|
-
"black
|
|
41
|
+
"black==25.11.0",
|
|
39
42
|
"flake8>=6.0",
|
|
40
|
-
"mypy>=1.0",
|
|
43
|
+
"mypy>=1.0,<2.0",
|
|
44
|
+
"build>=1.2.0",
|
|
45
|
+
"twine>=5.0.0",
|
|
46
|
+
"types-requests",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[dependency-groups]
|
|
50
|
+
dev = [
|
|
51
|
+
"pytest>=7.0",
|
|
52
|
+
"pytest-cov",
|
|
53
|
+
"black==25.11.0",
|
|
54
|
+
"flake8>=6.0",
|
|
55
|
+
"mypy>=1.0,<2.0",
|
|
56
|
+
"build>=1.2.0",
|
|
57
|
+
"twine>=5.0.0",
|
|
41
58
|
"types-requests",
|
|
42
59
|
]
|
|
43
60
|
|
|
@@ -63,7 +80,7 @@ include = [
|
|
|
63
80
|
|
|
64
81
|
[tool.black]
|
|
65
82
|
line-length = 88
|
|
66
|
-
target-version = ['
|
|
83
|
+
target-version = ['py39']
|
|
67
84
|
include = '\.pyi?$'
|
|
68
85
|
extend-exclude = '''
|
|
69
86
|
/(
|
|
@@ -101,6 +118,7 @@ ignore_missing_imports = true
|
|
|
101
118
|
|
|
102
119
|
[tool.pytest.ini_options]
|
|
103
120
|
testpaths = ["tests"]
|
|
121
|
+
pythonpath = ["src"]
|
|
104
122
|
python_files = ["test_*.py"]
|
|
105
123
|
python_classes = ["Test*"]
|
|
106
124
|
python_functions = ["test_*"]
|
|
@@ -108,4 +126,4 @@ addopts = [
|
|
|
108
126
|
"--strict-markers",
|
|
109
127
|
"--strict-config",
|
|
110
128
|
"--verbose",
|
|
111
|
-
]
|
|
129
|
+
]
|