From e88f9acde1521a81450cca7f9572282b9a407cbf Mon Sep 17 00:00:00 2001 From: aniversarioperu Date: Mon, 15 Sep 2014 15:47:19 +0300 Subject: [PATCH] 1.0.0 --- CONTRIBUTORS.txt | 1 + LICENSE.rst | 12 +++++ README.md | 43 --------------- README.rst | 51 ++++++++++++++++++ build/lib/proyectos_de_ley/__init__.py | 1 + build/lib/proyectos_de_ley/manage.py | 13 +++++ build/scripts-3.3/manage.py | 13 +++++ dist/proyectos_de_ley-1.0.0-py3.3.egg | Bin 0 -> 2715 bytes proyectos_de_ley.egg-info/PKG-INFO | 10 ++++ proyectos_de_ley.egg-info/SOURCES.txt | 11 ++++ .../dependency_links.txt | 1 + proyectos_de_ley.egg-info/not-zip-safe | 1 + proyectos_de_ley.egg-info/requires.txt | 1 + proyectos_de_ley.egg-info/top_level.txt | 1 + proyectos_de_ley/__init__.py | 1 + requirements.txt | 3 ++ setup.cfg | 4 ++ setup.py | 30 +++++++++++ 18 files changed, 154 insertions(+), 43 deletions(-) create mode 100644 CONTRIBUTORS.txt create mode 100644 LICENSE.rst delete mode 100644 README.md create mode 100644 README.rst create mode 100644 build/lib/proyectos_de_ley/__init__.py create mode 100644 build/lib/proyectos_de_ley/manage.py create mode 100755 build/scripts-3.3/manage.py create mode 100644 dist/proyectos_de_ley-1.0.0-py3.3.egg create mode 100644 proyectos_de_ley.egg-info/PKG-INFO create mode 100644 proyectos_de_ley.egg-info/SOURCES.txt create mode 100644 proyectos_de_ley.egg-info/dependency_links.txt create mode 100644 proyectos_de_ley.egg-info/not-zip-safe create mode 100644 proyectos_de_ley.egg-info/requires.txt create mode 100644 proyectos_de_ley.egg-info/top_level.txt create mode 100644 proyectos_de_ley/__init__.py create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt new file mode 100644 index 0000000..d4400c2 --- /dev/null +++ b/CONTRIBUTORS.txt @@ -0,0 +1 @@ +AniversarioPeru \ No newline at end of file diff --git a/LICENSE.rst b/LICENSE.rst new file mode 100644 index 0000000..0fe30b9 --- /dev/null +++ b/LICENSE.rst @@ -0,0 +1,12 @@ +Copyright (c) 2014, Hiperderecho +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of proyectos_de_ley nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 6f8c20c..0000000 --- a/README.md +++ /dev/null @@ -1,43 +0,0 @@ -[![Build Status](https://travis-ci.org/aniversarioperu/proyectos_de_ley.svg?branch=master)](https://travis-ci.org/aniversarioperu/proyectos_de_ley) -[![Coverage Status](https://coveralls.io/repos/aniversarioperu/proyectos_de_ley/badge.png)](https://coveralls.io/r/aniversarioperu/proyectos_de_ley) - -# Dependencias -Estos scripts ha sido probados en una computadora usando Ubuntu 13.10 y -necesitan que las siguientes dependencias estén instaladas. - -* Python3, django1.7 -* pip: ``sudo apt-get install python-pip`` -* > pip install -r requirements/dev.txt - -# Modo de ejecución - -## Custom django command - -* El comando ``python manage.py scrape`` se encarga de cosechar la -información del servidor del congreso y almacernarla en una base de datos -local. -* Toda la información cosechada se almancena en una base de datos SQLite3. -Django se encarga de servir las páginas y motor de búsqueda. - -## script do_ocr.py -[We don't want OCR yet] - -Esto se ha implentado al incio del proyecto pero es posible que no funcione -ya que no se ha actualizado recientemente. -* El script ``do_ocr.py`` se encarga de convertir los PDFs del folder ``pdf/`` - a HTML previo proceso OCR usando ``tesseract``. -* También crea un ATOM Feed ``feed.xml`` conteniendo los proyectos de ley que - han sido convertidos de PDF a HTML. -* Si un PDF ya ha sido procesado por OCR y convertido a HTML, este script - evitará volverlo a procesar en futuras corridas. -* Los archivos HTML y el ``feed.xml`` son creados con info contenida en la - "base de datos" ``proyectos_data.json``. - -## plantilla HTML - -* El archivo ``base.html`` funciona como plantilla para crear las páginas HTML. - Cualquier cambio al estilo se debe realizar en este archivo. Esta plantilla - usa un estilo basado en Twitter Bootstrap con *responsive features* para que - se vea bien en computadoras y dispositivos móbiles. -* Esos campos se usan para introducir en contenido en la plantilla y generar - los archivos HTML. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c6384d9 --- /dev/null +++ b/README.rst @@ -0,0 +1,51 @@ +|Build Status| |Cover alls| + + +Proyectos de Ley del Congreso +============================= + + +Configuración +------------- + +The steps below will get you up and running with a local development environment. We assume you have the following installed: + +* pip +* virtualenv +* python v3 +* django v1.7 + +Crear y un activar un virtualenv_ que use Python3. En un terminal, instalar +las dependencias para desarrollo local:: + + $ pip install -r requirements/dev.txt + +.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/ + +Para correr el software, reemplazar ``yourapp`` con el nombre +del folder que contiene el proyecto de Django:: + + $ python yourapp/manage.py runserver --settings=yourapp.settings.local + + +Ejecutar el scrapper +-------------------- +* El comando ``python manage.py scrape`` se encarga de cosechar la +información del servidor del congreso y almacernarla en una base de datos +local. +* Toda la información cosechada se almancena en una base de datos SQLite3. +Django se encarga de servir las páginas y motor de búsqueda. + +Plantilla HTML +-------------- +* El archivo ``base.html`` funciona como plantilla para crear las páginas HTML. + Cualquier cambio al estilo se debe realizar en este archivo. Esta plantilla + usa un estilo basado en Twitter Bootstrap con *responsive features* para que + se vea bien en computadoras y dispositivos móbiles. +* Esos campos se usan para introducir en contenido en la plantilla y generar + los archivos HTML. + +.. |Build Status| image:: https://travis-ci.org/aniversarioperu/proyectos_de_ley.svg?branch=master + :target: https://travis-ci.org/aniversarioperu/proyectos_de_ley +.. |Coverage Status| image:: https://coveralls.io/repos/aniversarioperu/proyectos_de_ley/badge.png + :target: https://coveralls.io/r/aniversarioperu/proyectos_de_ley diff --git a/build/lib/proyectos_de_ley/__init__.py b/build/lib/proyectos_de_ley/__init__.py new file mode 100644 index 0000000..75977e6 --- /dev/null +++ b/build/lib/proyectos_de_ley/__init__.py @@ -0,0 +1 @@ +__version__ = '1.0.0' \ No newline at end of file diff --git a/build/lib/proyectos_de_ley/manage.py b/build/lib/proyectos_de_ley/manage.py new file mode 100644 index 0000000..1bad8b5 --- /dev/null +++ b/build/lib/proyectos_de_ley/manage.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault( + "DJANGO_SETTINGS_MODULE", + "proyectos_de_ley.settings", + ) + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/build/scripts-3.3/manage.py b/build/scripts-3.3/manage.py new file mode 100755 index 0000000..fcc504e --- /dev/null +++ b/build/scripts-3.3/manage.py @@ -0,0 +1,13 @@ +#!/home/carlosp420/.virtualenvs/proyectosdeley/bin/python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault( + "DJANGO_SETTINGS_MODULE", + "proyectos_de_ley.settings", + ) + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/dist/proyectos_de_ley-1.0.0-py3.3.egg b/dist/proyectos_de_ley-1.0.0-py3.3.egg new file mode 100644 index 0000000000000000000000000000000000000000..0bde925e7ef81e0acf6eb1f9cffeaceffc6b5ac3 GIT binary patch literal 2715 zcmWIWW@Zs#U|`^2*iozRdc$*G9Y2uA3&f&8?CS2W>*?p_uV0i}SejXsTC7)6QBr); z>x}pL?ORQ+7+*JLU;!IRN>(l>>nEB>>3OTzSc92Kre`}T&R6N z=?l-IP?s%BkA7Xg<+8vUd&8fik6(rsMBch<@Oj3r8*k3F@&#_2fRJ$E5 zelbhrOq8CwOj|2(w(tA2=;ocChb2-g3o1*kRycD4y2XiUsTdI! zAy8E#42>)?WDl3*7sThJmZj!^ysWKpYQ2xI-bwvFf6w0Yo@<|=$9tm8(=bq++X2H( z3fY+AHWMC`>Dc{KWuy+qVjyczJDageJ=(hLB=Ops?rS^HjF0xPGN;%rq|Tfrf#&zIV*7L zQO?<{Yv=oSzm?;g{rF?%cH0B5>;8V*l$rOhSDE@k7gf&i}W%twLsA>Gl4|iii&WFm2b5?+!X0 z1crnZG(-xD@+(u5OY)23Q&NEeTZtSZw%ouh(f0jMSA;mLXZbEFZX0y{`Th{@5#b4o6kPo&?{!Y zsPIm*+zsc(fMolsriG{K7woL)y|i)a(b(XlTIublvMz~6Em5%l{)qXrnL>}olN|O% z4YvgL@z%e-`C-MSb+4X1;zW471Xu*UDpt)C2YMWo24#R4!{hPsnR%Hd@$taK(A}@^ zt*dqJ%=zyA@C~5>=2wg_7zePUl_`aZtuH))q4)@hjj$V7P??;VoRJzI4-3`gg36MN z{5)M_W1ua`wf?954jTx>sMk7(3dBr!z+I%cbHO1-#R*ZN3L5Pqic_1X9=olfxNY@~ zb+d~9H^)DkzJZzP2;*t%O7xQN_S|u)V_)N4Ewdlwd_X%cL$Uj?wR@(YT&B^yvw6!Wx7gYA&3kwJ*^O;sTXPI92L-lmIiwb}qExX+ z^p?tnpn~R^7d@tLePS|s&hn;4M+{?3b8(;dZST)=XL zXZp&OCA-D7gD0NWm~846W_otw;tT(0&+2=-taKk=>5wlPNOA@<+-ZLg4O&*>=he;C^Bbqr+ z=%%s?wNc@{&tW%fDINUYc z`BQVL<;pUJ+g*-nprVbDNrV}9r3&;b7%XW7QSd4Pxr#+M0=aMo)v7SCq|ph;gd2ga zjzu>Ly^2K`)qrditinatj$Xqdv^xOv7u+RC^&Pqi$bJE3au`_B_#4>-~2x`N##0>vM?`RExJVSWx9R+l2ohr1dz8wYr^0(CMla04Nz K^%%?!;sF5eBDu%_ literal 0 HcmV?d00001 diff --git a/proyectos_de_ley.egg-info/PKG-INFO b/proyectos_de_ley.egg-info/PKG-INFO new file mode 100644 index 0000000..c4fa62e --- /dev/null +++ b/proyectos_de_ley.egg-info/PKG-INFO @@ -0,0 +1,10 @@ +Metadata-Version: 1.0 +Name: proyectos-de-ley +Version: 1.0.0 +Summary: UNKNOWN +Home-page: UNKNOWN +Author: Aniversario Peru +Author-email: aniversarioperu1@gmail.com +License: UNKNOWN +Description: UNKNOWN +Platform: UNKNOWN diff --git a/proyectos_de_ley.egg-info/SOURCES.txt b/proyectos_de_ley.egg-info/SOURCES.txt new file mode 100644 index 0000000..48f539a --- /dev/null +++ b/proyectos_de_ley.egg-info/SOURCES.txt @@ -0,0 +1,11 @@ +README.rst +setup.cfg +setup.py +proyectos_de_ley/__init__.py +proyectos_de_ley/manage.py +proyectos_de_ley.egg-info/PKG-INFO +proyectos_de_ley.egg-info/SOURCES.txt +proyectos_de_ley.egg-info/dependency_links.txt +proyectos_de_ley.egg-info/not-zip-safe +proyectos_de_ley.egg-info/requires.txt +proyectos_de_ley.egg-info/top_level.txt \ No newline at end of file diff --git a/proyectos_de_ley.egg-info/dependency_links.txt b/proyectos_de_ley.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/proyectos_de_ley.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/proyectos_de_ley.egg-info/not-zip-safe b/proyectos_de_ley.egg-info/not-zip-safe new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/proyectos_de_ley.egg-info/not-zip-safe @@ -0,0 +1 @@ + diff --git a/proyectos_de_ley.egg-info/requires.txt b/proyectos_de_ley.egg-info/requires.txt new file mode 100644 index 0000000..dee10cf --- /dev/null +++ b/proyectos_de_ley.egg-info/requires.txt @@ -0,0 +1 @@ +Django==1.7.0 \ No newline at end of file diff --git a/proyectos_de_ley.egg-info/top_level.txt b/proyectos_de_ley.egg-info/top_level.txt new file mode 100644 index 0000000..e1c7d7f --- /dev/null +++ b/proyectos_de_ley.egg-info/top_level.txt @@ -0,0 +1 @@ +proyectos_de_ley diff --git a/proyectos_de_ley/__init__.py b/proyectos_de_ley/__init__.py new file mode 100644 index 0000000..75977e6 --- /dev/null +++ b/proyectos_de_ley/__init__.py @@ -0,0 +1 @@ +__version__ = '1.0.0' \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..02e154a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +# This file is here because many Platforms as a Service look for +# requirements.txt in the root directory of a project. +-r requirements/dev.txt \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..72898c0 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,4 @@ +[flake8] +#ignore = E265 +max-line-length = 79 +exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..3eb65a6 --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/env python + +import os +import sys + + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +import proyectos_de_ley +version = proyectos_de_ley.__version__ + +setup( + name='proyectos_de_ley', + version=version, + author='Aniversario Peru', + author_email='aniversarioperu1@gmail.com', + packages=[ + 'proyectos_de_ley', + ], + include_package_data=True, + install_requires=[ + 'Django==1.7.0', + ], + zip_safe=False, + scripts=['proyectos_de_ley/manage.py'], +) \ No newline at end of file