Script renames all eml files in a directory using mail metadata
Project description
eml_rename project
Script renames all eml files in a directory using mail metadata
Idea
I needed this tool to classify and order my mail files at work.
I took this idea from an article of Armand Niculescu (August 20, 2014) at https://www.media-division.com/using-python-to-batch-rename-email-files/ , so thanks an I hope you like this code.
Features
- Automatically renames all *.eml files in a directory, using email metadata.
- Renamed files will have this format is 'YYYYMMDD HHMM [From] Subject'
- If 'YYYYMMDD HHMM [From]' format is detected the script won't rename the file. With this feature user can change subject manually and the script won't overwrite it.
- If you use --force parameter the script will overwrite all files even they have the 'YYYYMMDD HHMM [From]' format.
- Length of the new name will have 140 character as maximum, although you can change it with the --length parameter
- --save parameter renames files. If you don't use this parameter it will only pretend the result
- It uses concurrency to make process faster
Configuración (Opcional)
Para utilizar la función de resumen por IA (--ai), necesitas una clave de API de Google Gemini. Puedes configurarla de dos maneras:
1. Variable de entorno
Define la variable GOOGLE_API_KEY en tu terminal:
export GOOGLE_API_KEY='tu_clave_aqui'
2. Archivo de configuración
Crea un archivo en ~/.config/eml-rename/config.ini con el siguiente contenido:
[auth]
GOOGLE_API_KEY = tu_clave_aqui
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eml_rename-1.0.0.tar.gz.
File metadata
- Download URL: eml_rename-1.0.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.11 Linux/6.17.8-gentoo
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
219660f820055e23c174e506232d10c48953150106df6299fa4f71a008483693
|
|
| MD5 |
e26195fda50cbf813e5ce6120a82648c
|
|
| BLAKE2b-256 |
3aefbead0c151c3765710c99287a0c4c80e85470fa68f90025820f421f2cc832
|
File details
Details for the file eml_rename-1.0.0-py3-none-any.whl.
File metadata
- Download URL: eml_rename-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.11 Linux/6.17.8-gentoo
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f8333600f5412718201dbddd6cfe0612028616f9c8880d161ad20acb233de4d
|
|
| MD5 |
8949c30041c1e40286c4517efab88819
|
|
| BLAKE2b-256 |
8f844ee8ce9c75adf3e5aa72671065de85e49dc21a90793fc692bf9cb2f727e8
|