Skip to main content

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

PyPI License

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

# Prévisualiser
mailopt preview ./my-email

# Nettoyer le CSS inutilisé
mailopt unused-css ./my-email --fix

# Embarquer les images en Base64
mailopt embed-images ./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
mailopt preview <dir> Prévisualise l'email dans le navigateur
mailopt embed-images <dir> Convertit images en Base64 ou upload CDN
mailopt unused-css <dir> Supprime les règles CSS inutilisées
mailopt config Gère la configuration globale (ex: API Keys)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mailopt-0.1.2.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

mailopt-0.1.2-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file mailopt-0.1.2.tar.gz.

File metadata

  • Download URL: mailopt-0.1.2.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mailopt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7d6800d4e61b3f0a6fb2c88da0db7f1339c2a0a58d336e031c920e5e11ee481a
MD5 7ff847cc26eb2cd9cf75865d2f983511
BLAKE2b-256 d2b0f5c640fbca6d5c74510fe74927a44e3b84a690adb3ab2c81008601776dbe

See more details on using hashes here.

File details

Details for the file mailopt-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mailopt-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 37.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mailopt-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b5b94025ce668b39b0fd74d6b2e790bdb27ff23bdcc5f92b942bf89b1779594b
MD5 51cb4a12cbd27c8f55d48f8372e6d33b
BLAKE2b-256 124725ed6a5346470acbe1bf7d94e7ca81eb8e395f02a5a63344a489e6ee1309

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