Giter VIP home page Giter VIP logo

hnac's Introduction

Build Status

Introduction

Hnac is a crawler for the hackernews firebase API.

Installation

Create a virtualenv

virtualenv --python=python3 virtualenv
source virtualenv/bin/activate

Install the package

python setup.py install

Usage

Create the configuration file .env and set the variables for the Postgresql database as well as a secret key.

SECRET="put-a-secret-key-here"
SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://username:password@localhost:5432/hnac"

Edit the alembic.ini file and set the sqlalchemy.url variable to point to your database. Run the migrations.

alembic upgrade head

Create a user so that it is possible to access the API

hnac users create --username username --password user_password

Start the API server

hnac runserver

You can crawl hacker news using the crawl command. You should create a cron job that will execute this command in a time interval of your choosing

hnac crawl

You can enable additional handlers in order to save the hackernews stories on a CouchDB database or publish them on RabbitMQ. See the example settings.py file in the templates folder for an example on how to use them.

Api

TODO

hnac's People

Contributors

pmatigakis avatar

Stargazers

Petros Lamb avatar Cole Howard avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.