system-config/tools/atc
Jeremy Stanley d654b45b60 Modernize ATC list format
* tools/atc/README: When generating the initial data dump, MySQL on
review.openstack.org creates output files with DOS line endings and
ISO-8859-1 encoding. Recommend using fromdos and iconv to normalize
them.

Change-Id: Ie16a56c024b0eee97b0e6bd5abe8ed3b0e0a9f7e
2014-02-13 16:24:22 +00:00
..
diff.py Fix pep8 errors in modules dir 2013-11-12 11:30:34 -05:00
email-stats.py Fix pep8 errors in modules dir 2013-11-12 11:30:34 -05:00
email-stats.sh Move tuskar-ui to horizon program. 2014-01-22 10:01:31 +13:00
README Modernize ATC list format 2014-02-13 16:24:22 +00:00

These are the scripts used to create the ATC lists for use in PTL
elections and Summit invitations.

0) Write a patch to email-stats.py so steps 1-2 are not necessary.
1) Edit email-stats.py to set your gerrit username.
2) Edit email-stats.py to set the start_date and end_date.
3) Run the following queries on review.openstack.org:

  SELECT * FROM accounts
  INTO OUTFILE '/tmp/accounts.csv'
  FIELDS TERMINATED BY ','
  ENCLOSED BY '"'
  LINES TERMINATED BY '\n';

  SELECT * FROM account_external_ids
  INTO OUTFILE '/tmp/emails.csv'
  FIELDS TERMINATED BY ','
  ENCLOSED BY '"'
  LINES TERMINATED BY '\n';

4) Copy those files to this directory.
5) Run:

  mkdir out
  ./email-stats.sh
  DATE=`date --iso`
  mkdir $DATE
  for f in out/*.csv ; do
      fromdos $f
      iconv -f ISO-8859-1 -t UTF-8 -o $DATE/`basename $f` $f
  done
  cat $DATE/*.csv | sort | uniq > $DATE/all.csv

6) You can use diff.py to get the new ATCs since the previous run:

  ./diff.py $OLD-DATE/all.csv $DATE/all.csv $DATE/new.csv