Skip to main content

CLI tool for managing LaTeX articles with git integration and Zotero bibliography

Project description

Article CLI

CI PyPI version Python Support

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

  1. Setup git hooks (run once per repository):

    article-cli setup
    
  2. 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
    
  3. Update bibliography from Zotero:

    article-cli update-bibtex
    
  4. 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.Z for stable releases (e.g., v1.2.3)
  • vX.Y.Z-pre.N for 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

article_cli-1.0.2.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

article_cli-1.0.2-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file article_cli-1.0.2.tar.gz.

File metadata

  • Download URL: article_cli-1.0.2.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

Hashes for article_cli-1.0.2.tar.gz
Algorithm Hash digest
SHA256 37cd8c17af921afbc4f4ee9b115fb8b338955bdf6829dcad4f2a2d237a6bba64
MD5 4406148c4e144328aac5f95b924dade9
BLAKE2b-256 c63469d01cc3e22318d274b4c36d083f8a260ec29b8c6bdc1f0d0c2f9f43913c

See more details on using hashes here.

Provenance

The following attestation bundles were made for article_cli-1.0.2.tar.gz:

Publisher: publish.yml on feelpp/article.cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file article_cli-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: article_cli-1.0.2-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

Hashes for article_cli-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53604dae93cf317788e9f36f929836e51d21f2319f0b161d4c53733829cbd2ce
MD5 e31cdcd38a3ea419fa9d3b94036e8277
BLAKE2b-256 128032ab88e0b485d01f8e185a54aa31ba1c5170ebeeccf0fb219bf0182a2c71

See more details on using hashes here.

Provenance

The following attestation bundles were made for article_cli-1.0.2-py3-none-any.whl:

Publisher: publish.yml on feelpp/article.cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page