Skip to main content

Script renames all eml files in a directory using mail metadata

Project description

eml_rename project

Tests

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.

Installation

pip install eml_rename

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

eml_rename-1.1.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eml_rename-1.1.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file eml_rename-1.1.0.tar.gz.

File metadata

  • Download URL: eml_rename-1.1.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.13.13 Linux/7.0.0-gentoo

File hashes

Hashes for eml_rename-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a2ed211060dd9f43f3c6b855df123fa317105232dac23c4d5477969840d67858
MD5 f6d5cb1ec3cb8e54812aadbee1c2f359
BLAKE2b-256 537e18c98a369392ba7a0d5d61e9bb03975539f73b7a316aa4e3ce66dac76aea

See more details on using hashes here.

File details

Details for the file eml_rename-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: eml_rename-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.13.13 Linux/7.0.0-gentoo

File hashes

Hashes for eml_rename-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f802aa7dbff078a304da11332bdd4bb6e5be7b270736afe80262b4701e378b8
MD5 3eb96059f864271568746fe6b4bd81ac
BLAKE2b-256 0610526c42fdc7e7ca8d14e1189f59df41f00f69aaf16fb7f9880fd443028f35

See more details on using hashes here.

Supported by

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