CLI Python pour automatiser et optimiser les workflows email/front-end
Project description
MailOpt
CLI Python pour automatiser et optimiser les workflows email/front-end
Qu'est-ce que MailOpt ?
MailOpt est un outil en ligne de commande qui automatise les tâches répétitives du développement d'emails :
- Inlining CSS pour compatibilité email
- Validation des images et liens
- Optimisation et minification
- Tests de compatibilité
Installation
# Installation depuis PyPI (recommandé)
pip install mailopt
# Ou en développement
git clone https://github.com/vml-marketing-mail/mailopt.git
cd mailopt
pip install -e .
Usage rapide
# Créer un nouveau projet email
mailopt new ./my-email
# Inliner le CSS pour compatibilité email
mailopt inline ./my-email
# Vérifier les images avec correction automatique
mailopt check-images ./my-email --fix
# Vérifier les liens
mailopt check-links ./my-email
# Trouver les fichiers orphelins
mailopt find-orphans ./my-email
# Minifier les assets
mailopt minify ./my-email
Commandes disponibles
| Commande | Description |
|---|---|
mailopt new <dir> |
Génère la structure de base d'un projet email |
mailopt inline <dir> |
Inline CSS pour templates email-safe |
mailopt check-images <dir> |
Vérifie existence & casse des images |
mailopt check-links <dir> |
Valide les liens dans les emails |
mailopt find-orphans <dir> |
Liste fichiers assets non utilisés |
mailopt minify <dir> |
Minifie CSS/JS |
mailopt audit <dir> |
Audit d'accessibilité & spam-score |
Configuration
Créez un fichier mailopt.config.yaml :
defaults:
image_quality: 85
output_format: webp
email_clients: [outlook, gmail, apple-mail]
commands:
check_images:
max_width: 1200
allowed_formats: [jpg, png, webp]
Développement
# Installer en mode développement
pip install -e ".[dev]"
# Lancer les tests
pytest tests/
# Vérifier le code
black sall/ tests/
mypy sall/ --ignore-missing-imports
flake8 sall/ tests/
Licence
MIT License - voir LICENSE pour les détails.
Fait avec ❤️ pour la communauté email development
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
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 mailopt-0.1.1.tar.gz.
File metadata
- Download URL: mailopt-0.1.1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1707a3fbab7af840907f50be1057caa181c0b33247b13527050695472df252d
|
|
| MD5 |
9690bc92bc0570c3280c0188ce0154d2
|
|
| BLAKE2b-256 |
cd6d1f4f2629cd9a09ed569e410c40912e97ad4eaf732a15c8d7012be747a448
|
File details
Details for the file mailopt-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mailopt-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a4c0c6e6e3ac27c3b26b54ddcb83182bef1e22bb165d24272e357669628351c
|
|
| MD5 |
619f9bc6a41eef9b3d7313da30000835
|
|
| BLAKE2b-256 |
4eb926afa2a9ec106a79cf3ce03fbfc02fb2cc45c00a0deb1e1a24595762f933
|