Skip to content

Commit

Permalink
chore: updated rEADME
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Grossfeld committed Nov 5, 2024
1 parent 23386be commit 0e35329
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

Convert `.eml` (email) files to PDF using Python.

The converted PDF files will be saved in the same location as the input files with the same name but `.pdf` extension.
The converted PDF files will be saved in the specified output directory. The output filenames are formatted as:
`YYYY-MM-DD_original_filename.pdf`, where:

- The date prefix is taken from the email's sent date
- Spaces in the original filename are converted to underscores
- The extension is changed to `.pdf`

For example, `My Email.eml` sent on March 15, 2024 will become `2024-03-15_My_Email.pdf`.

## Features

Expand Down Expand Up @@ -34,6 +41,15 @@ pip install -r requirements.txt
python eml-to-pdf.py <input_dir> <output_dir>
```

For example:

```
python eml-to-pdf.py ./emails ./pdfs
```

Input file: `Meeting Notes.eml` (sent 2024-03-20)
Output file: `2024-03-20_Meeting_Notes.pdf`

## License

MIT

0 comments on commit 0e35329

Please sign in to comment.