CLI tool for managing LaTeX articles with git integration and Zotero bibliography
Project description
Article CLI
A command-line tool for managing LaTeX articles with git integration and Zotero bibliography synchronization.
Features
- Git Release Management: Create, list, and delete releases with gitinfo2 support
- Zotero Integration: Synchronize bibliography from Zotero with robust pagination and error handling
- LaTeX Build Management: Clean build files and manage LaTeX compilation artifacts
- Git Hooks Setup: Automated setup of git hooks for gitinfo2 integration
- Local Configuration: Support for project-specific configuration files
Installation
From PyPI (recommended)
pip install article-cli
From Source
git clone https://github.com/feelpp/article.cli.git
cd article.cli
pip install -e .
Quick Start
-
Setup git hooks (run once per repository):
article-cli setup -
Configure Zotero credentials (one-time setup):
export ZOTERO_API_KEY="your_api_key_here" export ZOTERO_GROUP_ID="your_group_id" # or ZOTERO_USER_ID
-
Update bibliography from Zotero:
article-cli update-bibtex -
Create a release:
article-cli create v1.0.0
Configuration
Environment Variables
ZOTERO_API_KEY: Your Zotero API key (required for bibliography updates)ZOTERO_USER_ID: Your Zotero user ID (alternative to group ID)ZOTERO_GROUP_ID: Your Zotero group ID (alternative to user ID)
Local Configuration File
Create a .article-cli.toml file in your project root for project-specific settings:
[zotero]
api_key = "your_api_key_here"
group_id = "4678293" # Default for article.template
# user_id = "your_user_id" # alternative to group_id
output_file = "references.bib"
[git]
auto_push = true
default_branch = "main"
[latex]
clean_extensions = [".aux", ".bbl", ".blg", ".log", ".out", ".synctex.gz"]
Usage
Git Release Management
# Create a new release
article-cli create v1.2.3
# List recent releases
article-cli list --count 10
# Delete a release
article-cli delete v1.2.3
Bibliography Management
# Update bibliography from Zotero
article-cli update-bibtex
# Specify custom output file
article-cli update-bibtex --output my-refs.bib
# Skip backup creation
article-cli update-bibtex --no-backup
Project Setup
# Setup git hooks for gitinfo2
article-cli setup
# Clean LaTeX build files
article-cli clean
Advanced Usage
# Override configuration via command line
article-cli update-bibtex --api-key YOUR_KEY --group-id YOUR_GROUP
# Specify custom configuration file
article-cli --config custom-config.toml update-bibtex
Version Format
Release versions must follow the semantic versioning format:
vX.Y.Zfor stable releases (e.g.,v1.2.3)vX.Y.Z-pre.Nfor pre-releases (e.g.,v1.2.3-pre.1)
Requirements
- Python 3.8+
- Git repository with gitinfo2 package (for LaTeX integration)
- Zotero account with API access (for bibliography features)
License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Changelog
v1.0.0
- Initial release
- Git release management
- Zotero bibliography synchronization
- LaTeX build file cleanup
- Configuration file support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file article_cli-1.0.3.tar.gz.
File metadata
- Download URL: article_cli-1.0.3.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b19c97c1d5d9fcacd8ba129011f258e07762c6ff8cd34ccd87c32aae27987ee1
|
|
| MD5 |
8eae34c695605148787b1b1def4754b9
|
|
| BLAKE2b-256 |
77c1186026d0432eedbf84f513d8f71eff393d639e1089b560fe0afb51176b00
|
Provenance
The following attestation bundles were made for article_cli-1.0.3.tar.gz:
Publisher:
publish.yml on feelpp/article.cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
article_cli-1.0.3.tar.gz -
Subject digest:
b19c97c1d5d9fcacd8ba129011f258e07762c6ff8cd34ccd87c32aae27987ee1 - Sigstore transparency entry: 598324022
- Sigstore integration time:
-
Permalink:
feelpp/article.cli@bcfb422573dbc13425bd2e0048eccda97a141ae0 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/feelpp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bcfb422573dbc13425bd2e0048eccda97a141ae0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file article_cli-1.0.3-py3-none-any.whl.
File metadata
- Download URL: article_cli-1.0.3-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95142e47914e897575006b67005597ba4e417f0bf287c34c117b8b10ba0ad697
|
|
| MD5 |
6af910e0dc9c9d71a186fce7e84fe2e5
|
|
| BLAKE2b-256 |
1d9e3a7c16d4d935d79ec446f534bee643275484f90de780df4d5713ff9420d3
|
Provenance
The following attestation bundles were made for article_cli-1.0.3-py3-none-any.whl:
Publisher:
publish.yml on feelpp/article.cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
article_cli-1.0.3-py3-none-any.whl -
Subject digest:
95142e47914e897575006b67005597ba4e417f0bf287c34c117b8b10ba0ad697 - Sigstore transparency entry: 598324026
- Sigstore integration time:
-
Permalink:
feelpp/article.cli@bcfb422573dbc13425bd2e0048eccda97a141ae0 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/feelpp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bcfb422573dbc13425bd2e0048eccda97a141ae0 -
Trigger Event:
release
-
Statement type: