A tool to convert PPTX files to Typst Touying scripts.
Project description
pptx2typ
pptx2typ
is a command-line tool that converts PowerPoint (.pptx
) presentations into Typst scripts. This tool is designed to facilitate the transition from traditional slide presentations to customizable, script-based documents, a baby step before you leverage the power of Typst's typesetting capabilities.
📝 Features
- Convert PPTX to Typst: Seamlessly transform your PowerPoint presentations into Typst scripts.
- Image Extraction: Automatically extract and include images from slides into the Typst document.
- Table Support: Extract and format tables from your slides into Typst.
- Text Formatting: Preserve text formatting, including bold, italics, underlines, and hyperlinks.
🚀 Installation
You can install pptx2typ
using pipx
, which allows you to run Python applications in isolated environments.
- Install
pipx
(if not already installed):
python -m pip install --user pipx
python -m pipx ensurepath
You may need to restart your terminal after this step.
- Install pptx2typ via pipx:
pipx install pptx2typ
Alternatively, if you have built the package locally, and install it using:
pipx install path/to/pptx2typ-0.1.0-py3-none-any.whl
🎯 Usage
Once installed, you can use the pptx2typ
command in your terminal.
pptx2typ input.pptx -o output.typ -d images/ -t templates/fit_uiuc_theme.typ
📋 Command-Line Arguments
-
Positional Argument:
input_file
: Path to the input PPTX file.
-
Optional Arguments:
-o
,--output-file
: Path to the output Typst file. Defaults to the input file's name with a.typ
extension.-d
,--output-dir
: Directory to save extracted images. Defaults tocwd/"assets"
.-t
,--theme
: Theme to use for the Typst slides. Defaults touniversity
. Provide a path if using a custom theme.
📚 Example
pptx2typ presentation.pptx -o presentation.typ -d ./assets -t dewdrop
This command will:
- Convert
presentation.pptx
topresentation.typ
. - Extract images into the
./assets
directory. - Apply the
dewdrop
theme.
🧑💻 Contributing
Contributions are welcome! Please follow these steps:
-
Fork the Repository
-
Create a Feature Branch
git checkout -b feature/YourFeature
-
Commit Your Changes
git commit -m "Add YourFeature"
-
Push to the Branch
git push origin feature/YourFeature
-
Open a Pull Request
Describe your changes and submit the pull request for review.
📄 License
This project is licensed under the MIT License.
📫 Contact
For any inquiries or support, please contact your-email@example.com.
💡 Acknowledgements
- python-pptx for handling PowerPoint files.
- Typst for providing a powerful typesetting system.
- Rich for beautiful terminal output.
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
File details
Details for the file pptx2typ-0.1.1.tar.gz
.
File metadata
- Download URL: pptx2typ-0.1.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b6c1868163fcceebfa8d7e617bef45ea1cd9291d4fdf1b92a9cac6d2777b05 |
|
MD5 | 2c736651df8e264e13b6afb287eed15d |
|
BLAKE2b-256 | 389c66b45049c915672e28f502bf838f48631f0664ff7840de9025938de3954e |
File details
Details for the file pptx2typ-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pptx2typ-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb4a19e3e76ff6c802fada60b389ab547fdef01949b55da37bb7cd70748ac5fc |
|
MD5 | 52e0b0add66f3378bf501ded9b4ecc5e |
|
BLAKE2b-256 | 103008d6409325abacebd0e281591412de7cd1ac70ed0221aca3f7cd4f9164b9 |