Skip to content

Instantly share code, notes, and snippets.

@Omochin
Created November 13, 2018 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Omochin/62fb8b30922bb79a0e045d10b2e5e7fe to your computer and use it in GitHub Desktop.
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).
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