Skip to main content

Summarize tinyletter statistics

Project description

Python package providing a friendly command-line interface to summarize tinyletter email newsletter statistics.

Built on top of tinyapi, which wraps around TinyLetter’s API, which is publicly accessible but undocumented—so, no guarantees.

Usage

tinysumma runs as a command-line script. Sample usage:

>>tinysumma --help
usage: tinysumma [-h] [-l] [-n NUMBEREDISSUE] [-u LETTERNAME]
                                 [--datadir DATADIR]

optional arguments:
  -h, --help            show this help message and exit
  -l, --latestissue     print stats latest issue
  -n NUMBEREDISSUE, --numberedissue NUMBEREDISSUE
                                                print stats for numbered issue (first=1)
  -u LETTERNAME, --updateletter LETTERNAME
                                                download latest stats to *.csv
  --datadir DATADIR     data directory (if not current dir)

>>tinysumma --updateletter mytinyletter
Password:

>>tinysumma --latestissue
Your issue, 'Issue Title', was opened by 42 unique subscribers.
That's a 75.0% open rate!
The most popular url was https://github.com/awbirdsall/tinysumma,
with 17 total clicks.
A total of 9 urls were clicked.

Every time that tinysumma --updateletter mytinyletter is run, it writes three csv files: messages.csv, urls.csv and subscribers.csv (default: current directory, unless other path passed in with --datadir flag). The command overwrites existing files with those names, without requiring confirmation! All summary data reported by other commands are taken from those files.

The csv files provide a lot more information than what tinysumma summarizes! A more in-depth analysis can always be performed outside of tinysumma (e.g., starting with pandas.read_csv()).

Installation

Install using pip.

Install from PyPI:

pip install tinysumma

Install most recent Github commit (stability not guaranteed):

pip install git+https://github.com/awbirdsall/tinysumma

Dependencies

Tested on Python 3.5.

Requires tinyapi and pandas (installation of which should be automatically handled by pip).

Running the tests requires pytest.

Testing

Tests are located in the tests/ subfolder and can be run using py.test.

Development

Posting issues or pull requests to the github page is welcome!

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

tinysumma-0.1.0.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

tinysumma-0.1.0-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page