-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from LabExperimental-SIUA/develop
New version 1.1.0
- Loading branch information
Showing
20 changed files
with
194 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,144 +1,106 @@ | ||
# LibreScan | ||
|
||
LibreScan es un proyecto de Software Libre desarrollado en el Laboratorio Experimental del Centro Académico de Alajuela, sede del Instituto Tecnológico de Costa Rica. Este proyecto de investigación consiste en la elaboración de un software que agrupa distintas herramientas que cumplen funciones específicas dentro del flujo de tareas necesarias para escanear un documento. El objetivo de LibreScan es promover el acceso libre al conocimento y la educación, al proveer un software libre y gratuito que permita realizar el proceso de captura de fotos, procesamiento y generación de un documento digital. | ||
- Instalar dependencias que serán utilizadas: | ||
|
||
## Instalación | ||
# apt-get install python3-pip lua5.2 liblua5.2 git-svn libusb-dev python3 python-dev libjpeg8 libffi-dev libturbojpeg1-dev | ||
|
||
Actualmente el software funciona en el sistema operativo Debian 8 Jessie. Existen dos formas de instalar LibreScan: | ||
# pip3 install pyYAML bottle pyjade jinja2 polib cffi pexpect | ||
|
||
1. Forma resumida: | ||
# pip3 install jpegtran-cffi==0.5.2 | ||
|
||
- Clonar este repositorio: | ||
|
||
$ git clone https://github.com/LabExperimental-SIUA/LibreScan.git | ||
|
||
- Entrar en la carpeta clonada: | ||
|
||
$ cd LibreScan | ||
|
||
- Como root, sobreescribir el sources.list del sistema operativo | ||
|
||
# cp apt.sources /etc/apt/sources.list | ||
|
||
- Actualizar lista de paquetes de los repositorios: | ||
|
||
# apt-get update | ||
|
||
- Dar permisos de ejecución al script Dependencies.sh: | ||
|
||
# chmod +x Dependencies.sh | ||
|
||
- Ejecutar el script de instalación de dependencias: | ||
|
||
# sh Dependencies.sh | ||
-------------------------------------------------------------------------------------------- | ||
|
||
2. Forma manual: | ||
- Instalar tesseract-ocr para el reconocimiento de texto: | ||
|
||
- Instalar dependencias que serán utilizadas: | ||
# apt-get install python3-pip lua5.2 liblua5.2 git-svn libusb-dev python3 python-dev libffi-dev libturbojpeg1-dev libssl-dev libjpeg8-dev libjpeg8 | ||
|
||
# pip3 install pyYAML bottle pyjade jinja2 polib cffi pexpect | ||
|
||
# pip3 install jpegtran-cffi==0.5.2 | ||
|
||
-------------------------------------------------------------------------------------------- | ||
|
||
- Instalar tesseract-ocr para el reconocimiento de texto: | ||
|
||
# apt-get install tesseract-ocr | ||
|
||
Nota: Para más idiomas se instala de esta forma (Ejemplo con español): | ||
|
||
# apt-get install tesseract-ocr-spa (Para Español) | ||
|
||
-------------------------------------------------------------------------------------------- | ||
|
||
- Instalar scantailor para el procesamiento de las fotos: | ||
|
||
# apt-get install scantailor | ||
|
||
Posteriormente hacer un # apt-get update | ||
|
||
-------------------------------------------------------------------------------------------- | ||
|
||
- Instalar pdfbeads para generar pdfs a partir de tifs+hocr: | ||
|
||
# apt-get install ruby ruby-dev ruby-rmagick | ||
# gem install iconv pdfbeads | ||
|
||
|
||
-------------------------------------------------------------------------------------------- | ||
- En cuanto a las cámaras hay que instalar el CHDKPTP en el sistema. | ||
|
||
$ git svn clone http://subversion.assembla.com/svn/chdkptp/trunk chdkptp | ||
|
||
$ cd chdkptp | ||
|
||
-- nota: al 01.02.2015 Checked out HEAD: | ||
http://subversion.assembla.com/svn/chdkptp/trunk r694 | ||
|
||
$ mv config-sample-linux.mk config.mk | ||
|
||
$ make | ||
|
||
# mkdir /usr/bin/chdkptp | ||
|
||
# cp chdkptp-sample.sh /usr/bin/chdkptp/chdkptp | ||
|
||
-- nota: chdkptp-sample.sh está en la dirección donde se descargó el chdkptp. | ||
|
||
# nano /usr/bin/chdkptp/chdkptp | ||
|
||
Modificar la línea que dice | ||
|
||
#CHDKPTP_DIR=/path/to/chdkptp | ||
|
||
por: | ||
CHDKPTP_DIR=<FolderClonado>/chdkptp (Y guardamos los cambios) | ||
|
||
nota: <FolderClonado>/chdkptp es la dirección donde se haya clonado el chdkptp (en el primer paso de esta sección). | ||
|
||
# ln -s /usr/bin/chdkptp/chdkptp /bin | ||
|
||
-------------------------------------------------------------------------------------------- | ||
- Es necesario tener CHDK instalado en las cámaras. (En caso de no tenerlo se puede seguir esta guía. Se recomienda usar el método "a"): | ||
https://github.com/LabExperimental-SIUA/ilt/wiki/Instalaci%C3%B3n-de-CHDK | ||
|
||
|
||
|
||
|
||
- Para reconocer cuál cámara es la derecha y cuál es la izquierda hacemos uso de un archivo 'orientation.txt', que se encuentra almacenado la raíz de la tarjeta SD de cada cámara. Por ahora este proceso se debe hacer manualmente, introduciendo la SD en la computadora y creando el archivo manualmente. Pasos: | ||
1. Asegurarse que la SD esté desbloqueada. | ||
2. Para la cámara que desea usar al lado izquierdo, crear un archivo orientation.txt que tenga la palabra 'left' (sin comillas) como contenido. | ||
3. Para la cámara que desea usar al lado derecho, crear un archivo orientation.txt que tenga la palabra 'right' (sin comillas) como contenido. | ||
# apt-get install tesseract-ocr | ||
|
||
Nota: Para más idiomas se instala de esta forma (Ejemplo con español): | ||
|
||
# apt-get install tesseract-ocr-spa (Para Español) | ||
|
||
-------------------------------------------------------------------------------------------- | ||
|
||
- Instalar scantailor para el procesamiento de las fotos: | ||
|
||
# apt-get install scantailor | ||
|
||
Nota: Estamos trabajando en automatizar este proceso, de modo que se el usuario conecte las cámaras y decida la orientación sin crear el archivo manualmente. | ||
Nota: Si no se encuentra en los repositorios agregar este a /etc/apt/sources.list: | ||
|
||
- deb http://http.debian.net/debian wheezy-backports main | ||
|
||
Posteriormente hacer un # apt-get update | ||
|
||
-------------------------------------------------------------------------------------------- | ||
|
||
- Instalar pdfbeads para generar pdfs a partir de tifs+hocr: | ||
|
||
# apt-get install ruby ruby-dev ruby-rmagick | ||
# gem install iconv pdfbeads | ||
|
||
|
||
-------------------------------------------------------------------------------------------- | ||
- En cuanto a las cámaras hay que instalar el CHDKPTP en el sistema. | ||
|
||
$ git svn clone http://subversion.assembla.com/svn/chdkptp/trunk chdkptp | ||
|
||
$ cd chdkptp | ||
|
||
-- nota: al 01.02.2015 Checked out HEAD: | ||
http://subversion.assembla.com/svn/chdkptp/trunk r694 | ||
|
||
$ mv config-sample-linux.mk config.mk | ||
|
||
$ make | ||
|
||
# mkdir /usr/bin/chdkptp | ||
|
||
# cp chdkptp-sample.sh /usr/bin/chdkptp/chdkptp | ||
|
||
-- nota: chdkptp-sample.sh está en la dirección donde se descargó el chdkptp. | ||
|
||
# nano /usr/bin/chdkptp/chdkptp | ||
|
||
Modificar la línea que dice | ||
|
||
#CHDKPTP_DIR=/path/to/chdkptp | ||
|
||
por: | ||
|
||
- Clonar el repositorio: | ||
CHDKPTP_DIR=<FolderClonado>/chdkptp (Y guardamos los cambios) | ||
|
||
nota: <FolderClonado>/chdkptp es la dirección donde se haya clonado el chdkptp (en el primer paso de esta sección). | ||
|
||
# ln -s /usr/bin/chdkptp/chdkptp /bin | ||
|
||
-------------------------------------------------------------------------------------------- | ||
- Es necesario tener CHDK instalado en las cámaras. (En caso de no tenerlo se puede seguir esta guía. Se recomienda usar el método "a"): | ||
https://github.com/LabExperimental-SIUA/ilt/wiki/Instalaci%C3%B3n-de-CHDK | ||
|
||
- Para reconocer cuál cámara es la derecha y cuál es la izquierda hacemos uso de un archivo 'orientation.txt', que se encuentra almacenado la raíz de la tarjeta SD de cada cámara. Por ahora este proceso se debe hacer manualmente, introduciendo la SD en la computadora y creando el archivo manualmente. Pasos: | ||
|
||
$ git clone https://github.com/LabExperimental-SIUA/LibreScan.git | ||
1. Asegurarse que la SD esté desbloqueada. | ||
2. Para la cámara que desea usar al lado izquierdo, crear un archivo orientation.txt que tenga la palabra 'left' (sin comillas) como contenido. | ||
3. Para la cámara que desea usar al lado derecho, crear un archivo orientation.txt que tenga la palabra 'right' (sin comillas) como contenido. | ||
|
||
|
||
|
||
Nota: Estamos trabajando en automatizar este proceso, de modo que se el usuario conecte las cámaras y decida la orientación sin crear el archivo manualmente. | ||
|
||
-------------------------------------------------------------------------------------------- | ||
## Configuración y Uso | ||
- Una vez instaladas todas las dependencias, procedemos a clonar el repositorio de LibreScan. | ||
|
||
$ git clone https://github.com/LabExperimental-SIUA/LibreScan.git | ||
|
||
- Ingresamos al código fuente del repositorio clonado: | ||
- Nos metemos a la carpeta clonada, y al código fuente. | ||
|
||
$ cd LibreScan/src | ||
|
||
- Corremos el setup para la creación de carpetas y archivos de configuración. | ||
|
||
$ python3.4 setup.py | ||
|
||
**NOTA: los pasos anteriores solo deben ser ejecutados una vez.** | ||
|
||
- Para ejecutar la aplicación web | ||
|
||
$ python3.4 main.py web | ||
|
||
- Por último, abrimos el navegador en http://0.0.0.0:8180 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Kill all other running instances | ||
kill `ps aux | grep main.py | grep -v 'grep' | awk '{print $2}' | xargs` | ||
|
||
# Se pasa al directorio de LibreScan | ||
cd /usr/share/LibreScan/src/ | ||
|
||
#check if running the setup is necesary | ||
if [ ! -d $HOME/.librescan/ ] | ||
then | ||
python3 setup.py | ||
fi; | ||
|
||
# Run the application | ||
python3 main.py web |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
librescan (1.1.0-0) stable; urgency=low | ||
|
||
* Bug fix | ||
|
||
-- Equipo LibreScan <librescan@gmail.com> Fri, 09 Dec 2016 07:56:34 -0600 | ||
|
||
librescan (1.0.0-0) stable; urgency=low | ||
|
||
* Initial release | ||
|
||
-- Equipo LibreScan <librescan@gmail.com> Fri, 09 Jul 2016 07:56:34 -0600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Source: librescan | ||
Section: text | ||
Priority: optional | ||
Maintainer: Laboratorio Experimental ITCR <librescan@gmail.com> | ||
Build-Depends: debhelper (>=9) | ||
Standards-Version: 3.9.6 | ||
Homepage: http://labexperimental-siua.github.io/LibreScan/ | ||
|
||
Package: librescan | ||
Architecture: all | ||
Depends: python3-pip, lua5.2, liblua5.2-0, git-svn, libusb-dev, python3, python-dev, libturbojpeg1, libjpeg62, libjpeg62-turbo-dev, libssl-dev, libffi-dev, tesseract-ocr, tesseract-ocr-spa, scantailor, ruby, ruby-dev, ruby-rmagick, libyaml-dev, libturbojpeg1-dev, chdkptp | ||
Description: Herramienta para digitalización de textos impresos | ||
LibreScan es un proyecto de Software Libre desarrollado en el Laboratorio Experimental del Centro Académico de Alajuela, sede del Instituto Tecnológico de Costa Rica cuyo objetivo es promover el acceso libre al conocimento y la educación, al proveer un software libre y gratuito que permita realizar el proceso de captura de fotos, procesamiento y generación de un documento digital. Este paquete provee las herramientas para facilitar el trabajo con los escáneres desarrollados por el proyecto "DIY Book Scanner", quienes desarrollan y elaboran de escáneres artesanales de bajo costo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Name: librescan | ||
Source: http://labexperimental-siua.github.io/LibreScan/ | ||
Mantainer: Laboratorio Experimental <librescan@gmail.com> | ||
|
||
Files: * | ||
Copyright: 2015-2017 Laboratorio experimental | ||
License: GPLv3 | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
librescan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
librescan_1.1.0-0_all.deb text optional | ||
librescan_1.1.0-0_amd64.buildinfo text optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LibreScan /usr/share/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
# Install extra dependencies | ||
|
||
# Ruby | ||
gem install iconv pdfbeads | ||
|
||
# Python3 | ||
pip3 install pyYAML bottle pyjade jinja2 polib cffi pexpect | ||
pip3 install jpegtran-cffi==0.5.2 | ||
|
||
# Create symlink to /usr/bin | ||
ln -s /usr/share/LibreScan/bin/librescan.sh /usr/bin/librescan | ||
|
||
# Compiling locales | ||
cd /usr/share/LibreScan/src/ | ||
python3 compile_messages.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/make -f | ||
# See debhelper(7) (uncomment to enable) | ||
# output every command that modifies files on the build system. | ||
#export DH_VERBOSE = 1 | ||
|
||
|
||
# see FEATURE AREAS in dpkg-buildflags(1) | ||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
|
||
# see ENVIRONMENT in dpkg-buildflags(1) | ||
# package maintainers to append CFLAGS | ||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic | ||
# package maintainers to append LDFLAGS | ||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed | ||
|
||
|
||
%: | ||
dh $@ | ||
|
||
|
||
# dh_make generated override targets | ||
# This is example for Cmake (See https://bugs.debian.org/641051 ) | ||
#override_dh_auto_configure: | ||
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/python3 | ||
|
||
from web.i18n.PoParser import PoParser | ||
|
||
PoParser.compile_po_files() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters