A simple Hacker News Recorder & Reader for analytics.
You can deploy this application following two environments.
- local server, IaaS
- heroku
- MongoHQ is required
- Only Web Dyno x1 is required. So you can use free plan.
- Python 2.7.x
- MongoDB or MongoHQ (if you use heroku)
-
Download the repositry
git clone https://github.com/sodesign/HackerNewsRecorder.git
-
Install required Python packages
pip install bottle pip install pymongo pip install HackerNews==1.7.2
-
Start a MongoDB
-
Start the application
python app.py
-
Download the repositry
git clone https://github.com/sodesign/HackerNewsRecorder.git
-
Deploy to heroku
cd HackerNewsRecorder heroku apps:create [app name] git push heroku master
-
Add MongoHQ via heroku dashboard
-
Restart the application heroku restart --app [app name]
-
Download new entries from Hacker News to MongoDB
-
http://APPURL/update/<collection_name>/<page_num>
-
<collection_name> : top, newest, best
-
<page_nume> : 1, ... ,10
-
It is recommended to use "crond" and "wget --spider" commands for automatic updates.
-
-
Read entries from MongoDB
-
top: http://APPURL or http://APPURL/top
-
best: http://APPURL/best
-
newest: http://APPURL/newest
-
- Add analytics
- Improve reader
- Improve database update method (current method is not so good)
- MIT License