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 = "6219333"
# 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.0.tar.gz (15.9 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.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: article_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for article_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1652b813c48928bc0bf11646a5d9009f3ae658b77ebd9452e352cc20cd3d2548
MD5 9fb19761080869590a5ed2c4fb880fbc
BLAKE2b-256 57c757d7f37f1dcbdf98e97e9902d2a410b0c92d5711ff11a5b8f832ff0ea728

See more details on using hashes here.

File details

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

File metadata

  • Download URL: article_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for article_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c83b6a8e1b5c3d2bc4b357838705358e2689ab47f0fd3b03dc8818d463fba672
MD5 e204ac85d1021476243e1592a5954596
BLAKE2b-256 a4f2e867889a13d02b3db07f6c20b3ad5c84e8de1092b2fd1cf4860fa3f6a4d6

See more details on using hashes here.

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