Skip to main content

A command line utility and library for converting DOCX and TXT files to Avid Script Files (.avc)

Project description

pyavc

pyavc is a Python library that allows you to convert DOCX or TXT files into Avid Script (.avc) files. It can be used both as a command-line tool and as a library within your Python scripts.

This project is not affiliated with Avid or Avid Media Composer, it is simply an open source helper library to make fellow AEs' lives a bit easier.

Installation

To install pyavc, you can use pip3:

pip3 install pyavc

Usage

As a Python Library

The main function exposed to end users is convert. This function allows you to convert a DOCX or TXT file and save the result in a specified output directory.

Function Signature

convert(filepath: os.Path, output_dir: os.Path, output_name=None)

Parameters

  • filepath (os.Path): The path to the input DOCX or TXT file.
  • output_dir (os.Path): The path to the output directory where the converted file will be saved.
  • output_name (str, optional): The name of the output file (without extension). If not provided, the output file will be named based on the input file name.

Example Usage

import pyavc as avc

# Convert a TXT file and save the output
avc.convert('/path/to/input.txt', '/path/to/output/dir')

# Convert a DOCX file and specify a custom output name
avc.convert('/path/to/input.docx', '/path/to/output/dir', output_name='custom_name')

Command-Line Usage

pyavc can also be used from the command line to quickly convert files.

Syntax

pyavc -i <path-to-input-file> -o <path-to-output-dir> [-n <output-name>]

Parameters

  • -i, --input: Path to the input DOCX or TXT file.
  • -o, --output_dir: Path to the output directory where the converted file will be saved.
  • -n, --output_name: (Optional) Name of the output file (without extension). If not provided, the output file will be named based on the input file name.

Example Commands

# Convert a TXT file and save the output
pyavc -i /path/to/input.txt -o /path/to/output/dir

# Convert a DOCX file and specify a custom output name
pyavc -i /path/to/input.docx -o /path/to/output/dir -n custom_name

License

This project is licensed under the GNU 3.0 License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request with any improvements or suggestions.

Acknowledgments

pyavc would not be possible without the pyavb library by mjiggidy, itself a fork of the pyavb library by markreidvfx, which provided so many useful hints - as it turns out, AVC files are constructed much like AVB files. Who would have thought?

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

pyavc-0.1.3.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

pyavc-0.1.3-py2-none-any.whl (21.2 kB view details)

Uploaded Python 2

File details

Details for the file pyavc-0.1.3.tar.gz.

File metadata

  • Download URL: pyavc-0.1.3.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pyavc-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ee45ea4a55635b811dd4058a8a6abb9de8c2571f85cf4f14d1f5447bf230c4b4
MD5 c8dbf0ab15b91aa0437640aa5b2a3920
BLAKE2b-256 7a7e65212bf4afd723cb80d487ef53e71aa34a01bd7118203afbb9f73e9f84c7

See more details on using hashes here.

File details

Details for the file pyavc-0.1.3-py2-none-any.whl.

File metadata

  • Download URL: pyavc-0.1.3-py2-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pyavc-0.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 de9707d59a6e7b1a68331b2b9c2cb467c66b2eef8c9a5cb2395f204c8fdd7f0f
MD5 3f83fc2b38862dd101da057efe46772f
BLAKE2b-256 ba338a771ba8796559bc3bb4b4469ab97ead0bfdaf83648bbacbdbcdb3e5f690

See more details on using hashes here.

Supported by

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