Skip to main content

Rename jupytext paired files while maintaining sync.

Project description

jtmv

Command-line tool for renaming all jupytext paired files while maintaining their synchronization.

Purpose

Jupytext allows two-way sync of notebook content between files with different formats (.ipynb, .py, .md, etc.). Users have two options to rename these files:

  1. Rename one file, regenerate all formats with juptext sync, and then delete all files with the old name.
  2. Rename all files and restablish synchronization with jupyext set-formats.

This tool handles the renaming of all paired formats in one step.

Installation

pip install jtmv

Usage

jtmv source dest [--dry-run]

Examples

# Rename a jupytext paired file
jtmv workflow.py flow.py

# Dry run to see what would happen
jtmv utility.md utils.md --dry-run

Options

  • source: Source filename with extension (e.g., workflow.py)
  • dest: Destination filename with extension (e.g., flow.py)
  • --dry-run: Do not actually rename files, just print the commands that would be executed

How it works

  1. Detects paired formats: Reads the jupytext metadata to find all synced formats
  2. Git-aware moves: If files are tracked in git, uses git mv to preserve history

License

MIT License - see LICENSE file for details.

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

jtmv-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

jtmv-0.1.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file jtmv-0.1.2.tar.gz.

File metadata

  • Download URL: jtmv-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for jtmv-0.1.2.tar.gz
Algorithm Hash digest
SHA256 31cfc47fd3712408f70f65e699b4104e32499c627ef225a45af9cabcd62cdc02
MD5 7a1b5e72e60ccfd4992845ba1f6240ac
BLAKE2b-256 155df5793abd04751d6035fbb650cd095104dd7de9531ec50957b38f025ad4ec

See more details on using hashes here.

File details

Details for the file jtmv-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: jtmv-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for jtmv-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f4f6d93defdc87ea08eb1a71ee9fc49fc5c739c333e4373ee683fdb8090da3b
MD5 c0e589b96842c740bbc7670e274ce39b
BLAKE2b-256 e146292069689b7423ae6ffd71f60943973567f0258fa7a8463cc4bbe97af5e9

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