GithubHelp home page GithubHelp logo

globalic / woid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vitorfs/woid

0.0 1.0 0.0 578 KB

Simple news aggregator displaying top stories in real time

Home Page: https://woid.io

License: Apache License 2.0

Python 63.83% CSS 18.02% JavaScript 1.09% HTML 17.05%

woid's Introduction

Woid

Python Version Django Version

Table of Contents

Running Locally

First, clone the repository to your local machine:

git clone https://github.com/vitorfs/woid.git

Install the requirements:

pip install -r requirements/dev.txt

Apply the migrations:

python manage.py migrate

Load the initial data:

python manage.py loaddata services.json

Finally, run the development server:

python manage.py runserver

The site will be available at 127.0.0.1:8000.

Supported Services

Currently Woid crawl the following services to collect top stories:

  • Hacker News hn
  • Reddit reddit
  • GitHub github
  • The New York Times nytimes
  • Product Hunt producthunt

Crawlers

You can run the crawlers manually to collect the top stories using the following command:

python manage.py crawl reddit

You can pass multiple services at once:

python manage.py crawl reddit hn nytimes

Valid values: hn, reddit, github, nytimes, producthunt.

The New York Times

To crawl The New York Times you will need an API key.

You can register one application at developer.nytimes.com.

Product Hunt

Product Hunt require an API key to consume their API.

You can register one application at api.producthunt.com/v1/docs

Cron Jobs

You can set up cron jobs to execute the crawlers periodically. Here is what my crontab looks like:

*/5 * * * * /home/woid/venv/bin/python /home/woid/woid/manage.py crawl reddit hn producthunt >> /home/woid/logs/cron.log 2>&1
*/30 * * * * /home/woid/venv/bin/python /home/woid/woid/manage.py crawl nytimes github >> /home/woid/logs/cron.log 2>&1

License

The source code is released under the Apache 2.0 license.

woid's People

Contributors

vitorfs avatar

Watchers

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.