Giter Site home page Giter Site logo

marcusoregano / diario-oficial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from okfn-brasil/querido-diario

0.0 0.0 0.0 12.26 MB

📰 Brazilian government gazettes, accessible to everyone.

License: MIT License

Python 98.86% Makefile 0.74% Dockerfile 0.29% Shell 0.11%

diario-oficial's Introduction

Diário Oficial

Diário Oficial is the Brazilian government gazette, one of the best places to know the latest actions of the public administration, with distinct publications in the federal, state and municipal levels.

Even with recurrent efforts of enforcing the Freedom of Information legislation across the country, official communication remains - in most of the territories - in PDFs.

The goal of this project is to upgrade Diário Oficial to the digital age, centralizing information currently only available through separate sources.

When this project was initially released, had two distinct goals: creating crawlers for governments gazettes and parsing bidding exemptions from them. Now going forward, it is limited to the first objective.

Build and Run

If you want to understand how Diário Oficial works, you'll want to get the source, build it, and run it locally.

The only prerequisites are Docker and Docker Compose, which are the tools responsible for installing all the other dependencies.

After you cloned the repository, you may want to run the following from the source folder:

$ make setup
$ docker-compose up

Run Gazette Crawler

The gazettes spiders are written using Scrapy framework and must be executed with crawl command: scrapy crawl <spider filename>. However, it's recommended to use the processing container for that: docker-compose run --rm processing <command>. The following example is the command to run the gazette crawler for Florianópolis/SC:

$ docker-compose run --rm processing bash -c "cd data_collection && scrapy crawl sc_florianopolis"

Tips and tricks

There is a make target allowing you run the scrapy shell inside the container used by the crawler:

make shell

Troubleshooting

"Permission denied" error when files are downloaded

This problem most probably occurs due to a mismatch between your system's user id and the container's user id and there is a volume in place connecting both file systems (that's the default case here).

Run this command in your system's terminal to get your user's id:

$ id -u

Copy the output, replace the value of the environment variable LOCAL_USER_ID in the generated .env file with the copied value and execute docker-compose build. With the image rebuilt you are ready to go.

To save yourself this effort in the future, you can replace the value of LOCAL_USER_ID in .env.example too and .env will already be generated with the correct value for it when make setup is executed.

Contributing

If you are interested in fixing issues and contributing directly to the code base, please see the document CONTRIBUTING.md.

Acknowledgments

This project is maintained by Open Knowledge Foundation Brasil, thanks to the support of Digital Ocean and hundreds of other names.

diario-oficial's People

Contributors

jvanz avatar irio avatar cuducos avatar giovanisleite avatar sergiomario avatar antoniovendramin avatar dannnylo avatar brunolellis avatar rennerocha avatar victor-torres avatar alfakini avatar rodolfolottin avatar alvarolqueiroz avatar feliperuhland avatar he7d3r avatar vitorbaptista avatar luzfcb avatar weibemoura avatar beothorn avatar avelino avatar hugoleodev avatar viniciusartur avatar anapaulagomes avatar gusrabbit avatar gustavodemari avatar lucassantossumer avatar laerte avatar andreangelucci avatar chicocvenancio avatar endersonmenezes 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.