PyNews πŸ“° Simple newsletter made with python πŸπŸ—žοΈ

Overview

PyNews πŸ“°

Simple newsletter made with python

Page example

Install dependencies

This project has some dependencies (see requirements.txt) that are not included in the standard python library, so it is necessary to install them with the following command:

pip install -r requirements.txt

Configuration

The config.json (at project root) file contains essential definitions be for sending and some optional properties for templating. Because this file may contain sensitive information it is ignored, so it needs to be created manually at installation.

{
  "transport": {
    "mail": "[email protected]",
    "smtp": "smtp.gmail.com",
    "port": 465
  },
  "props": {
    "author": "John Doe"
  }
}

To fill the transport configuration, search for list of SMTP servers and select the one that matches your email.

Template properties

Prop can be declared either in config.json or in the meta at the top of the file to be used later in writing using the property name in curly braces.

place: my house

# Who made this?
Mabe by {author} at {place}.

Subscribers list

The subscribers.txt (at project root) file contains the list of emails from subscribers to your newsletter that will receive in their inboxes when the newsletter is sent. Because this file may contain sensitive information it is ignored, so it needs to be created manually at installation.

Build for preview

Running the python file in scripts/build.py runs the process to build your newsletter HTML code. It also opens it in the web browser so you can see the final result that will be sent to the inboxes.

$ python scripts/build.py
> Opening preview...

Send newsletter

Running the python file in scripts/send.py runs the build process in tandem with the newsteller's send process for the inboxes. So, in addition to opening the web browser so you can see the final result, confirm whether you want to send the newsletter and ask for the transport email account access password and then dispatch for the inboxes.

$ python scripts/send.py
> Opening preview...
> Send? (yes/no) yes
> E-mail password:
> Login successfully!
> Sending 1 of 32...
...
> Newsletter launched successfully!

License

This project is MIT licensed.

You might also like...
Python character encoding detector

Chardet: The Universal Character Encoding Detector Detects ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants) Big5, GB2312, EUC-TW, HZ-GB-2312, IS

Fuzzy String Matching in Python

FuzzyWuzzy Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.

The Levenshtein Python C extension module contains functions for fast computation of Levenshtein distance and string similarity

Contents Maintainer wanted Introduction Installation Documentation License History Source code Authors Maintainer wanted I am looking for a new mainta

Paranoid text spacing in Python

pangu.py Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width charact

An implementation of figlet written in Python

All of the documentation and the majority of the work done was by Christopher Jones ([email protected]). Packaged by Peter Waller [email protected],

Compute distance between sequences. 30+ algorithms, pure python implementation, common interface, optional external libs usage.
Compute distance between sequences. 30+ algorithms, pure python implementation, common interface, optional external libs usage.

TextDistance TextDistance -- python library for comparing distance between two or more sequences by many algorithms. Features: 30+ algorithms Pure pyt

Python flexible slugify function

awesome-slugify Python flexible slugify function PyPi: https://pypi.python.org/pypi/awesome-slugify Github: https://github.com/dimka665/awesome-slugif

Python Lex-Yacc

PLY (Python Lex-Yacc) Copyright (C) 2001-2020 David M. Beazley (Dabeaz LLC) All rights reserved. Redistribution and use in source and binary forms, wi

Python library for creating PEG parsers

PyParsing -- A Python Parsing Module Introduction The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the t

Comments
  • build(deps): bump nbconvert from 6.5.0 to 6.5.1

    build(deps): bump nbconvert from 6.5.0 to 6.5.1

    Bumps nbconvert from 6.5.0 to 6.5.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • build(deps): bump mistune from 0.8.4 to 2.0.3

    build(deps): bump mistune from 0.8.4 to 2.0.3

    Bumps mistune from 0.8.4 to 2.0.3.

    Release notes

    Sourced from mistune's releases.

    Version 2.0.2

    Fix escape_url via lepture/mistune#295

    Version 2.0.1

    Fix XSS for image link syntax.

    Version 2.0.0

    First release of Mistune v2.

    Version 2.0.0 RC1

    In this release, we have a Security Fix for harmful links.

    Version 2.0.0 Alpha 1

    This is the first release of v2. An alpha version for users to have a preview of the new mistune.

    Changelog

    Sourced from mistune's changelog.

    Changelog

    Here is the full history of mistune v2.

    Version 2.0.4

    
    Released on Jul 15, 2022
    
    • Fix url plugin in <a> tag
    • Fix * formatting

    Version 2.0.3

    Released on Jun 27, 2022

    • Fix table plugin
    • Security fix for CVE-2022-34749

    Version 2.0.2

    
    Released on Jan 14, 2022
    

    Fix escape_url

    Version 2.0.1

    Released on Dec 30, 2021

    XSS fix for image link syntax.

    Version 2.0.0

    
    Released on Dec 5, 2021
    

    This is the first non-alpha release of mistune v2.

    Version 2.0.0rc1

    Released on Feb 16, 2021

    Version 2.0.0a6

    
    </tr></table> 
    

    ... (truncated)

    Commits
    • 3f422f1 Version bump 2.0.3
    • a6d4321 Fix asteris emphasis regex CVE-2022-34749
    • 5638e46 Merge pull request #307 from jieter/patch-1
    • 0eba471 Fix typo in guide.rst
    • 61e9337 Fix table plugin
    • 76dec68 Add documentation for renderer heading when TOC enabled
    • 799cd11 Version bump 2.0.2
    • babb0cf Merge pull request #295 from dairiki/bug.escape_url
    • fc2cd53 Make mistune.util.escape_url less aggressive
    • 3e8d352 Version bump 2.0.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(1.0.0-rc.1)
  • 1.0.0-rc.1(Aug 21, 2022)

    What's Changed

    • Mercurio Release by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/15
      • Made from scratch 7c23543f0b9b94113aa38ab4fabb600d80d72a01
      • Nested folder structure
      • Status bar task (see more)
      • New file creation from template
      • GUI via ipywidgets
      • Gmail account aliases selection
      • Google Sheets plugin
      • Jinja2 templating (see more)
      • Full CSS selectors support
      • @import stylesheets
      • User props
      • Logging
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Aug 29, 2022)

    Mercury, the messenger of Jupiter

    What's Changed

    • build(deps): bump mistune from 0.8.4 to 2.0.3 by @dependabot in https://github.com/FelixLuciano/pypers/pull/16
    • Setuptools by @FelixLuciano in https://github.com/FelixLuciano/pypers/pull/19
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Nov 29, 2021)

    What's Changed

    • Google API Client by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/5
    • Added class styling support by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/6
    • Tasks and Watchdog by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/7
    • Confirmation prompt for sending newsletter by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/8
    • Change listener refactor iteration by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/9
    • Added MD in HTML by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/10
    • Multiple pages suport by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/11
    • Added page creation script by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/11
    • Support for local csv mailing list by @FelixLuciano in https://github.com/FelixLuciano/PyNews/pull/11
    Source code(tar.gz)
    Source code(zip)
  • 0.0.2(Oct 18, 2021)

    What's Changed

    • Attribute lists in https://github.com/FelixLuciano/PyNews/pull/1
    • CSS rules parser in https://github.com/FelixLuciano/PyNews/pull/2
    • Extract inner text with HTMLParser in https://github.com/FelixLuciano/PyNews/pull/3
    • New folder structure in https://github.com/FelixLuciano/PyNews/pull/4
    • New configuration format

    New Contributors

    • @FelixLuciano made their first contribution in https://github.com/FelixLuciano/PyNews/pull/1

    Full Changelog: https://github.com/FelixLuciano/PyNews/compare/0.0.1...0.0.2

    Source code(tar.gz)
    Source code(zip)
Owner
Luciano Felix
Take a look at my page to know about me.
Luciano Felix
A username generator made from French Canadian most common names.

This script is used to generate a username list using the most common first and last names in Quebec in different formats. It can generate some passwords using specific patterns such as Tremblay2020.

null 5 Nov 26, 2022
This repos is auto action which generating a wordcloud made by Twitter.

auto_tweet_wordcloud This repos is auto action which generating a wordcloud made by Twitter. Preconditions Install Python dependencies pip install -r

tubone(Yu Otsubo) 0 Apr 29, 2022
A simple Python module for parsing human names into their individual components

Name Parser A simple Python (3.2+ & 2.6+) module for parsing human names into their individual components. hn.title hn.first hn.middle hn.last hn.suff

Derek Gulbranson 574 Dec 20, 2022
Simple python program to auto credit your code, text, book, whatever!

Credit Simple python program to auto credit your code, text, book, whatever! Setup First change credit_text to whatever text you would like to credit

Hashm 1 Jan 29, 2022
🚩 A simple and clean python banner generator - Banners

?? A simple and clean python banner generator - Banners

Kumar Vicku 12 Oct 9, 2022
Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.

Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.

SeatGeek 1.2k Jan 1, 2023
Making simplex testing clean and simple

Making Simplex Project Testing - Clean and Simple What does this repo do? It organizes the python stack for the coding project What do I need to do in

Mohit Mahajan 1 Jan 30, 2022
A simple text editor for linux

wolf-editor A simple text editor for linux Installing using Deb Package Download newest package from releases CD into folder where the downloaded acka

Focal Fossa 5 Nov 30, 2021
Free & simple way to encipher text

VenSipher VenSipher is a free medium through which text can be enciphered. It can convert any text into an unrecognizable secret text that can only be

null 3 Jan 28, 2022
Implementation of hashids (http://hashids.org) in Python. Compatible with Python 2 and Python 3

hashids for Python 2.7 & 3 A python port of the JavaScript hashids implementation. It generates YouTube-like hashes from one or many numbers. Use hash

David Aurelio 1.4k Jan 2, 2023