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
An extension to detect if the articles content match its title.

Clickbait Detector An extension to detect if the articles content match its title. This was developed in a period of 24-hours in a hackathon called 'H

Arvind Krishna 5 Jul 26, 2022
Fixes mojibake and other glitches in Unicode text, after the fact.

ftfy: fixes text for you print(fix_encoding("(ง'⌣')ง")) (ง'⌣')ง Full documentation: https://ftfy.readthedocs.org Testimonials “My life is li

Luminoso Technologies, Inc. 3.4k Jan 08, 2023
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 02, 2023
Fuzz a language by mixing up only few words.

afasi Fuzz a language by mixing up only few words. Status Beta. Note: The default branch is default. Use Examples Version General Help Translate Help

Stefan Hagen 2 Dec 14, 2022
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.

SeatGeek 8.8k Jan 08, 2023
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
Answer some questions and get your brawler csvs ready!

BRAWL-STARS-V11-BRAWLER-MAKER-TOOL Answer some questions and get your brawler csvs ready! HOW TO RUN on android: Install pydroid3 from playstore, and

9 Jan 07, 2023
Getting git-style versioning working on RDFlib

Getting git-style versioning working on RDFlib

Gabe Fierro 1 Feb 01, 2022
Question answering on russian with XLMRobertaLarge as a service

QA Roberta Ru SaaS Question answering on russian with XLMRobertaLarge as a service. Thanks for the model to Alexander Kaigorodov. Stack Flask Gunicorn

Gladkikh Prohor 21 Jul 04, 2022
This is REST-API for Indonesian Text Summarization using Non-Negative Matrix Factorization for the algorithm to summarize documents and FastAPI for the framework.

Indonesian Text Summarization Using FastAPI This is REST-API for Indonesian Text Summarization using Non-Negative Matrix Factorization for the algorit

Viqi Nurhaqiqi 2 Nov 03, 2022
Redlines produces a Markdown text showing the differences between two strings/text

Redlines Redlines produces a Markdown text showing the differences between two strings/text. The changes are represented with strike-throughs and unde

Houfu Ang 2 Apr 08, 2022
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

Life4 3k Jan 02, 2023
Etranslate is a free and unlimited python library for transiting your texts

Etranslate is a free and unlimited python library for transiting your texts

Abolfazl Khalili 16 Sep 13, 2022
Vastasanuli - Vastasanuli pelaa Sanuli-peliä.

Vastasanuli Vastasanuli pelaa SANULI -peliä. Se ei aina voita. Käyttö Tarttet Pythonin (3.6+). Aja make (tai lataa words.txt muualta) Asentele vaaditt

Aarni Koskela 1 Jan 06, 2022
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

3 Jan 28, 2022
This repository contains scripts to control a RGB text fan attached to a Raspberry Pi.

RGB Text Fan Controller This repository contains scripts to control a RGB text fan attached to a Raspberry Pi. Setup The Raspberry Pi and RGB text fan

Luke Prior 1 Oct 01, 2021
Make writing easier!

Handwriter Make writing easier! How to Download and install a handwriting font, or create a font from your handwriting. Use a word processor like Micr

64 Dec 25, 2022
You can encode and decode base85, ascii85, base64, base32, and base16 with this tool.

You can encode and decode base85, ascii85, base64, base32, and base16 with this tool.

8 Dec 20, 2022
A python tool to convert Bangla Bijoy text to Unicode text.

Unicode Converter A python tool to convert Bangla Bijoy text to Unicode text. Installation Unicode Converter can be installed via PyPi. Make sure pip

Shahad Mahmud 10 Sep 29, 2022