Giter Club home page Giter Club logo

otvoreni-akti's Introduction

Live App

You can check out the live version of Otvoreni-Akti here: https://akti.za-grad.com

Development

Set up a virtualenv:

python3 -m venv --prompt otvoreni-akti .venv
source ./.venv/bin/activate
pip install -r requirements.txt

Copy and modify the config file to your liking:

cp .env.example .env
cp Procfile.dev.example Procfile.dev

Set up the database:

mkdir -p tmp/postgres
initdb tmp/postgres
postgres -D tmp/postgres -p 5432
psql postgres -p 5432 -c "create user otvoreniakti with password 'otvoreniakti';"
psql postgres -p 5432 -c "create database otvoreniakti encoding 'utf8' template template0 owner otvoreniakti;"
psql otvoreniakti -p 5432 -c "create extension hstore;"

Then when normally developing:

honcho -f Procfile.dev start

Scrape the web and populate Django DB for Zagreb:

python manage.py migrate
python manage.py shell
from otvoreni_akti.apps.scraper_zagreb import scrape

To scrape everything: scrape.start()

To perform a limited scrape of last 3 periods scrape.start(max_periods=3)

To rescrape last few entries scrape.rescrape()

Scrape the web and populate Django DB for Split:

python manage.py migrate
python manage.py shell
from otvoreni_akti.apps.scraper_split import scrape

To scrape everything: scrape.start()

To perform a limited scrape of last 3 periods scrape.start(max_periods=3)

Scrape the web and populate Django DB for Rijeka:

python manage.py migrate
python manage.py shell
from otvoreni_akti.apps.scraper_rijeka import scrape

To scrape everything: scrape.start()

To perform a limited scrape of last 3 periods scrape.start(max_periods=3)

Running Elasticsearch:

Download and install Elasticsearch from the official website. Then run this command:

python manage.py search_index --rebuild

Run the Django server (if not running):

python manage.py runserver

otvoreni-akti's People

Contributors

ranajaydas avatar metakermit avatar zdeslav avatar mzugcic avatar dependabot[bot] 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.