-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
719be95
commit 0276648
Showing
1 changed file
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,81 @@ | ||
# lyrics2ppt | ||
Generate a PowerPoint presentation from a text file. | ||
|
||
<!-- ![ASCII Art](carbon.png) --> | ||
|
||
``` | ||
__ _ ___ __ | ||
/ /_ ______(_)______ |_ |___ ___ / /_ | ||
/ / // / __/ / __(_-</ __// _ \/ _ \/ __/ | ||
/_/\_, /_/ /_/\__/___/____/ .__/ .__/\__/ | ||
/___/ /_/ /_/ | ||
``` | ||
|
||
# PowerPoint Generator from Text File | ||
|
||
This project provides a script to generate a PowerPoint presentation from a text file. The script reads the text file, processes the content, and creates a PowerPoint presentation with customizable background colors, font colors, and font sizes. | ||
|
||
## Features | ||
|
||
- Generate PowerPoint slides from a text file. | ||
- Customize background color, font color, and font size. | ||
- Optionally add a background image with adjustable transparency. | ||
- Supports UTF-8 encoding for text files. | ||
- ANSI escape codes for colorful console output. | ||
|
||
## Requirements | ||
|
||
- ![Python](https://img.shields.io/badge/Python-3.x-blue.svg) | ||
- ![python-pptx](https://img.shields.io/badge/python--pptx-0.6.21-green.svg) | ||
- ![Pillow](https://img.shields.io/badge/Pillow-8.2.0-yellow.svg) | ||
- ![lxml](https://img.shields.io/badge/lxml-4.6.3-red.svg) | ||
|
||
|
||
## Installation | ||
|
||
1. Clone the repository: | ||
```sh | ||
git clone https://github.com/Astraaaaaaa/lyrics2ppt.git | ||
cd lyrics2ppt | ||
``` | ||
|
||
2. Install the required Python libraries: | ||
```sh | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Usage | ||
|
||
### Command Line | ||
|
||
To generate a PowerPoint presentation from a text file, use the following command: | ||
|
||
```sh | ||
python generate_ppt_from_txt.py \ | ||
--input input.txt \ | ||
--output output.pptx \ | ||
--bg-image background.jpg \ | ||
--bg-color red \ | ||
--font-color white \ | ||
--font-size 48 \ | ||
--transparency 0.5 | ||
``` | ||
|
||
### Arguments | ||
|
||
- `--input`: Path to the input text file (default: `input.txt`). | ||
- `--output`: Path to the output PowerPoint file (default: uses the first line of the input file as the title). | ||
- `--bg-image`: Path to the background image file (default: none). | ||
- `--bg-color`: Background color (default: `default`). | ||
- `--font-color`: Font color (default: `white`). | ||
- `--font-size`: Font size (default: `48`). | ||
- `--transparency`: Transparency level for the background image (default: `0.5`). | ||
|
||
## Maintainer | ||
|
||
- Astra <astralee95@gmail.com> | ||
|
||
## Acknowledgements | ||
|
||
- [python-pptx](https://github.com/scanny/python-pptx) | ||
- [Pillow](https://python-pillow.org/) | ||
- [lxml](https://lxml.de/) |