-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3116acc
commit b352ca2
Showing
5 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*~ | ||
*.swp | ||
_site | ||
patreon/*.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* Ariyan Suroosh | ||
* Fionnbharr Davies | ||
* Max G | ||
* Calle "Zeta Two" Svensson | ||
* cyberduck | ||
* Pontus Nyberg | ||
* Chuck | ||
* hpmv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys, json, csv, pprint | ||
|
||
patrons = [] | ||
|
||
with open(sys.argv[1]) as csvfile: | ||
csvrows = csv.DictReader(csvfile) | ||
for row in csvrows: | ||
name = row["Name"] | ||
pledge = int(row["Pledge $"].replace("$","")) | ||
lifetime = int(row["Lifetime $"].replace("$","")) | ||
status = row["Patron Status"] | ||
details = row["Additional Details"] | ||
since = row["Patronage Since Date"] | ||
|
||
if details != "": | ||
name = details | ||
|
||
if status == "Active patron": | ||
if lifetime > 0 and pledge >= 5: | ||
patrons += [(name, lifetime, since)] | ||
|
||
patreons = sorted(patrons, key=lambda x: x[2]) | ||
|
||
for (name, lifetime, since) in patreons: | ||
print "* {}".format(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
shopt -s nullglob | ||
|
||
basedir=$(dirname $(readlink -f $0)) | ||
tmpfile=$(mktemp) | ||
|
||
cd $basedir | ||
./patreon.py *.csv > $tmpfile | ||
cat $tmpfile | tee ../_includes/patreonlist.md | ||
rm -f $tmpfile |