Coder Social home page Coder Social logo

wooodhead / hnapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raquo/hnapp

0.0 1.0 0.0 310 KB

Hacker News faceted search engine, RSS & JSON feeds

Home Page: http://hnapp.com

License: MIT License

Python 53.87% PLpgSQL 0.54% CSS 14.18% JavaScript 11.47% HTML 19.93%

hnapp's Introduction

hnapp

hnapp is a search engine for Hacker News that lets you subscribe to new search results via RSS or JSON. You would use it to keep in the loop about your favourite technologies, keep an eye on mentions of your product, filter out politics, or follow what your friends are talking about. See hnapp.com for more examples.

This repository contains the source code for all of hnapp, including the website hnapp.com.

What's in the box

  • Mobile and web interfaces
  • RSS and JSON feeds
  • Full text search with stemming, as well as search constraints (e.g. score>10). For search syntax, see hnapp.com
  • Hacker News data is retrieved from the official Firebase API.

Dependencies

  • python 2.7/2.8, python-dev, virtualenv, setuptools
  • postgresql, postgresql-common, libpq-dev
  • nodejs, npm, bower
  • Also see requirements.txt for pip

Web Browser Support

  • Enabling Javascript provides a faster GUI, but is not required
  • Mobile version tested in Chrome and Safari on iOS 6+ and Chrome on Android 4
  • Desktop version tested in Chrome, Firefox, Safari
  • IE 9-11 should work fine, but was not tested
  • IE <= 8 has some compatibility issues. Those browsers are out of the scope for this project

Environment

hnapp was tested in the following environment:

  • Ubuntu 12.04 and 14.04
  • nginx + uwsgi combo for production, or Flask's built-in web server for development
  • All server timezones set to UTC

Installation

  • Install all dependencies. Install python stuff into a virtualenv.
  • Create postgresql user and database
sudo su - postgres
psql -U postgres -c "CREATE USER hnapp WITH PASSWORD 'new_password'"
psql -U postgres postgres -f /srv/www/hnapp/sql/initial_schema.sql
psql -U postgres postgres -f /srv/www/hnapp/sql/migration_001.sql
psql
  • Grant permissions to the new user (run this in psql)
\c hnapp
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES in schema public TO hnapp
INSERT INTO status (name, number) values ('last_item_id', XXXXXXX)

Where XXXXXXX is the id of the first HN item you want hnapp to download. Don't set it too far in the past, you can always download more items later.

  • Install dependencies from bower.json
  • Install python dependencies using pip if you haven't done so yet:
pip install -r requirements.txt
  • Create a config file and edit it as per instructions within
cp config.sample.py config.py
nano config.py
  • Set up a cron job to run vpython /srv/www/hnapp/cron.py every_1_min every minute (replace vpython with the path to the python binary in your virtual environment). You should redirect all output to a log file to log errors.
  • Connect hnapp to a web server. The directory static must be webroot. hnapp was tested with nginx and uwsgi. The uwsgi application is app in run.py. For development purposes, you can use Flask's built-in web server by running vpython run.py

License

MIT License, see LICENSE.md

Contact

For bug reports and feature requests, please open an issue on github.

Nikita Gazarov

[email protected]

@raquo @hnapp

hnapp's People

Contributors

raquo avatar

Watchers

 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.