Skip to main content

A package to automate message generation and sending for seminars from a csv file

Project description

Seminar Message Manager

CI PyPI version Code style: black

A Python manager for automatically generating and sending mails and Zulip messages to announce upcoming seminars, using user-tunable html and markdown templates.

📦 Installation

Use pip to install the package:

pip install seminar-message-manager

💻 Usage

smm date [--seminar_csv csv_file.csv --zulip_json zulip.json --mail_json mail.json --template_mail template.html --template_zulip template.md (--send_mail | -sm) (--send_zulip | -sz) (--send | -s)]

Argument details

  • seminar_csv .csv file that describes the seminar's events following a specific template:

    date      ; location; first_name; last_name; work_name           ; work_link
    yyyy-mm-dd; room    ; John      ; Doe      ; My beautiful article; https://article-link.com
    

    By default, the package will look for seminar.csv in the root directory.

  • date the date (yyyy-mm-dd) used to select the relevant information from the csv.

  • zulip_json .json file that describes the information needed by the Zulip bot:

    {
      "config_file": "zuliprc", // API file of the bot
      "bot_email"  : "mylab-bot@mylab.zulipchat.com",
      "channel"    : "Seminars",
      "topic"      : "Upcomming seminar",
      "old_topic"  : "Past seminars" // Topic in {channel} where past bot messages are moved
    }
    

    By default, the package will look for zulip.json in the root directory.

  • mail_json.json file that described the mail information

    {
      "user"                   : "mail@mail.com",
      "password"               : "123456789",
      "smtp_server_domain_name": "smtp.mail.com",
      "port"                   : 587,
      "to"                     : ["mail_list@mail.com", "myothermail@mail.com"],
      "subject"                : "Upcoming seminar"
    }
    

    By default, the package will look for mail.json in the root directory.

  • template_mail .html file that constitute the body of the mail (example). Some specific strings, indicated by {}, will be replaced by the package, using the corresponding csv line:

    • {date}
    • {room}
    • {first_name}
    • {last_name}
    • {work_name}
    • {work_link} By default, the package will look for announcement.html in the ./templates/mail directory.
  • template_zulip .md file, similar to html file, see example By default, the package will look for announcement.md in the ./templates/zulip directory.

  • --send_mail or -sm if used, send mails to the relevant mailing list.

  • --send_zulip or -sz if used, send messaged to the relevant Zulip topic.

  • --sendor -s if used, send messaged to the relevant Zulip topic and mails.

⚖️ License

Distributed under the GNU GPL 3.0 License.

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

seminar_message_manager-0.0.3.tar.gz (42.6 kB view details)

Uploaded Source

File details

Details for the file seminar_message_manager-0.0.3.tar.gz.

File metadata

  • Download URL: seminar_message_manager-0.0.3.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for seminar_message_manager-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ca8389f7a7d4a60560f7d9c8a7ee900b82f216e15b602711f34c098f7c1ac9b6
MD5 6ef1bd8e3d51b0a1590c99d927b76c31
BLAKE2b-256 4481810d90cf885fd7f3b3cccd2b2a52eacef693bc3834fc38b2a9904da2c1c1

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