Created
November 13, 2018 14:11
-
-
Save Omochin/62fb8b30922bb79a0e045d10b2e5e7fe to your computer and use it in GitHub Desktop.
The script to aggregate ranking(https://evekatsu.github.io/ranking) and generate monthly an article(https://evekatsu.github.io/news).
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
if [ $# -lt 2 ] ; then | |
echo Need year and month as arguments | |
exit | |
fi | |
YEAR=$1 | |
MONTH=$2 | |
commit_and_push() { | |
git add . | |
git commit -m "Update ${YEAR}-${MONTH} ranking" | |
git push origin master | |
} | |
# mongod | |
cd ranking | |
source activate evekatsu | |
python crawler.py ${YEAR} ${MONTH} | |
python aggregator.py ${YEAR} ${MONTH} | |
commit_and_push | |
cd ../data | |
commit_and_push | |
sleep 1000 | |
cd ../news | |
python ranking_article_generator.py ${YEAR} ${MONTH} | |
make publish | |
commit_and_push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment