Skip to content

shmoinkle/generalstrikeus-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generalstrikeus-signups

A tool to collect, store, and publish up‑to‑date graphs of total signups for the generalstrikeus movement.

Usage

./main.py --help
usage: main.py [-h] [-f | -g SAMPLES OUTPUT_FILE]

Fetch and graph the total signatures

options:
  -h, --help            show this help message and exit
  -f, --fetch           Fetch signature total and add to Redis
  -g SAMPLES OUTPUT_FILE, --graph SAMPLES OUTPUT_FILE
                        Generate graph from signature data in Redis.

Setup API

This document explains how to setup authentication for Google Sheets

https://docs.gspread.org/en/latest/oauth2.html

TL;DR use an API_KEY if you're accessing a public document,and a SERVICE_ACCOUNT_FILE if you need granular access

Setup & Running

## Initial setup ##
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
## Export necessary environment variables

## Run after starting redis ##
source venv/bin/activate
./main.py --fetch

Requirements

  • Python
  • Redis w/ RedisTimeSeries module

Todo

  • Dockerize
  • Simple wiki with common setup and usage

About

A simple logger for the gsus movement

Resources

License

Stars

Watchers

Forks