Giter VIP home page Giter VIP logo

scielobooks's Introduction

=====================================
How to install a SciELOBooks instance
=====================================

Install pre-requisites
----------------------

Before installing the SciELO-Books application, install the software listed below.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Server software

 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 |**software**                         |**product URL**                    |**installation method**  |**Ubuntu Package name**   |
 +=====================================+===================================+=========================+==========================+
 | Python 2.7                          | http://www.python.org/            | OS package manager      | python2.7                |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 | python2.x-dev                       | http://www.python.org/            | OS package manager      | python2.7-dev            |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 | GNU compiler and tools              | http://www.python.org/            | OS package manager      | build-essential          |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 | Apache HTTP server 2.2              | http://httpd.apache.org/          | OS package manager      | apache2                  |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 | mod_wsgi - Python adapter(optional) | http://code.google.com/p/modwsgi/ | OS package manager      | libapache2-mod-wsgi      |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 | CouchDB 1.0                         | http://couchdb.apache.org/        | OS package manager      | couchdb                  |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 | PostgreSQL                          | http://www.postgresql.org/        | OS package manager      | postgresql               |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+
 | GIT                                 | http://git-scm.com/               | OS package manager      | git-core                 |
 +-------------------------------------+-----------------------------------+-------------------------+--------------------------+

1. Install each package below using the recommended installation method above.

Note: Python comes pre-installed in most Linux distributions. If Python 2.7 is already installed, there is no need to install a newer version.

Note2: on Ubuntu 10.04 (Lucid) build-essential includes: dpkg-dev, g++, libc6-dev and make

System-wide Python libraries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +-------------------+-------------------------------------------+------------------------------------------------------------------+
 |**software**       |**product URL**                            |**installation method**                                           |
 +===================+===========================================+==================================================================+
 | distribute 0.6.10 | http://pypi.python.org/pypi/distribute    | sudo python distribute_setup.py                                  |
 +-------------------+-------------------------------------------+------------------------------------------------------------------+
 | pip               | http://pypi.python.org/pypi/pip           | sudo easy_install pip                                            | 
 +-------------------+-------------------------------------------+------------------------------------------------------------------+
 | virtualenv        | http://pypi.python.org/pypi/virtualenv    | sudo pip virtualenv                                              |
 +-------------------+-------------------------------------------+------------------------------------------------------------------+
 | python gfx module | http://www.swftools.org/gfx_tutorial.html | installation instruction topic 1.1  Compiling gfx and installing |
 +-------------------+-------------------------------------------+------------------------------------------------------------------+

2. Download the distribute_setup.py script and use the installed Python interperter to run it as root (this provides the easy_install utility)::

    # wget http://python-distribute.org/distribute_setup.py
    # python distribute_setup.py


3. Use easy_install to download and install virtuaenv::

    # pip install virtualenv


Configure the database
----------------------

4. Create a `scielobooks_1a` database. The user name and password will not be configured at this time.

Log in to the Futon's web interface::

    http://localhost:5984/_utils/


Install the application environment
-----------------------------------

**Note: all of the remainig steps can be performed by a regular user without root access.**

5. Use virtualenv to create an application environment and activate it::

    $ virtualenv --distribute --no-site-packages -p python2.7 scielobooks-env
    $ source scielobooks-env/bin/activate
    (scielobooks-env)$   # note that the shell prompt displays the active virtual environment



Install the scielobooks application
-----------------------------------

6. Go to a suitable installation directory and check out the application source::

    Development(Recommended):
    Read-only:
    (scielobooks-env)$ git clone git://github.com/scieloorg/scielobooks.git
    Read+write:
    (scielobooks-env)$ git clone [email protected]:scieloorg/scielobooks.git

7. With the `scielobooks-env` environment active, use `pip` to automagically download and install all the dependencies::

    (scielobooks-env)$ pip install -r requirements.txt


8. Run automated tests (NOT WORKING)::

    (scielobooks-env)$ python setup.py test -q



Running the application
-----------------------

Paster
~~~~~~

The Pyramid web framework already comes with Paster. So, in order to run it you simply need to:

1. Create a paster .ini configuration file::

    Development:
    $ cp development-TEMPLATE.ini development.ini

    Production:
    $ cp production-TEMPLATE.ini production.ini

Note: The application comes with 2 base templates, for development and for production environments.

See http://pythonpaste.org/script/#configuration for more information about PasteScript.

2. Run::

    $ paster serve production.ini --daemon



Apache with mod_wsgi
~~~~~~~~~~~~~~~~~~~~

1. Create and configure a paster .ini configuration file.
Note: The application comes with 2 base templates, for development and for production environments.

Development::

    $ cp development-TEMPLATE.ini development.ini

Production::

    $ cp production-TEMPLATE.ini production.ini


See http://pythonpaste.org/script/#configuration for more information about PasteScript.

2. Create and configure a .wsgi configuration file.
Note: The application comes with a directory named *apache*, containing templates for deployments using Apache with mod_wsgi

Development::

    $ cp apache/app/devel-TEMPLATE.wsgi apache/app/devel.wsgi

Production::

    $ cp apache/app/production-TEMPLATE.wsgi apache/app/production.wsgi


Note: The .wsgi configuration file must be configured to point to the previously created .ini file, to match the application's entry point.

3. Configure the Apache WebServer
Note: The application comes with 2 virtual hosts base templates. You can simply create a symlink to the apache's available sites.

Development::

    $ cp apache/httpd-devel-TEMPLATE.conf apache/httpd-devel.conf

Production::

    $ cp apache/httpd-TEMPLATE.conf apache/httpd.conf


See http://docs.pylonsproject.org/projects/pyramid/1.0/tutorials/modwsgi/index.html for more information about deploying a Pyramid app using mod_wsgi.


WordPress Integration
---------------------

In order to both applications, the main site (Wordpress) and the details site (Python), coexist transparently, we need to add some rules in the webserver.

Basically, the catalog package must be accessible from the Wordpress domain, i.e. *http://books.scielo.org/id/w2* must resolve to *http://admin.books.scielo.org/id/w2*. The latter should not be accessible for users.

Rules to reverse proxy some requests::

    # wordpress app virtualhost
    <Proxy *>
        Allow from all
    </Proxy>
    
    ProxyPassMatch ^/id/(.*)$ http://admin.books.scielo.org/id/$1
    ProxyPassMatch ^/static/(.*)$ http://admin.books.scielo.org/static/$1
    ProxyPassMatch ^/deform_static/(.*)$ http://admin.books.scielo.org/deform_static/$1
    ProxyPassMatch ^/setlang/$ http://admin.books.scielo.org/


Troubleshooting
---------------

The application is updated but seems like the cache is not (even after the apache+mod_wsgi have been restarted)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mod_wsgi has an aggressive cache system. to refresh it, you have to update the date of the .wsgi configuration file and restart apache::

    $ touch apache/app/production.wsgi

scielobooks's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scielobooks's Issues

Benchmark de plugin para apresentação de livros na home do SciELO Livros.

O Plugin atual deve ser atualizado por um plugin compatível com a versão nova versão do wordpress:

Requisitos:

  • O plugin deve ter comunidade de desenvolvimento ativa.
  • O plugin deve ser compatível com a versão atual do wordpress.
  • O plugin não deve ter problemas de segurança relatados e não corrigidos.
  • Controle de quantidade de itens a serem exibidos (nosso padrão é 8, mas isso pode mudar no futuro).
  • As imagens devem ter as mesmas dimensões do plugin atual (ou o plugin deve permitir controlar isso).
  • Padronizar a largura da capa dos livros (alguns livros possuem capas mais largas que as outras, causando truncagem na capa do livro ao lado).
  • Link para a página do livro (vindo do RSS).
  • Mostrar o título do livro abaixo da capa, permitir controlar a quantidade de caracteres máximo a serem exibidos (para títulos muito longos).

Exemplo do plugin atual:
screen shot 2014-09-22 at 10 38 46 am

Inclusão do PlumX Metrics no Backoffice

O ideal é que a interface exibisse o widget do PlumX Metrics disponível em: https://plu.mx/plum/developers/widgets#
Modelo: https://plu.mx/w/a/-vPnJY0jkCweBX6IMVd7p2xoaCZYAX5_lx-wYk0NGrA

Para que pudesse ser viabilizado mais rapidamente, a segunda alternativa seria incluir um campo de link logo abaixo do registro do DOI com a URL para interface pública do respectivo livro no PlumX Metrics: https://plu.mx/plum/a/?isbn=9788574553986

Exemplo com campo de link no backoffice:
image

Incluir campo para indicação de "Selo" Editorial

Alguns - muitos - dos títulos da Editora UNESP foram publicados sob o Selo Cultura Acadêmica. Não são 2 editoras diferentes, trata-se somente de um selo onde livros de determinado seguimento dentro da Editora são publicados.

Na última reunião de Comitê Consultivo (XIII, 24/05/2016) foi levantada esta questão pelos Membros onde foi recomendado que o nome do selo fosse exibido na página do livro.

Por exemplo, se entrar neste livro (http://books.scielo.org/id/gnfy3), no campo "Editora" está escrito Editora Unesp, mas este livro foi publicado com o Selo Cultura Acadêmica (como pode ver na capa do livro). Por um momento pensei que poderíamos mudar o nome da Editora, mas ficaria uma informação errada na base. O ideal é abrir um campo para indicação deste selo que seja exibido na interface pública.

Inserir idioma "Espanhol" na lista de idiomas de capítulos no backoffice

Nos metadados da parte monográfica, existe o idioma "Português", "Inglês" e "Espanhol". Porém, para as partes analíticas, existe somente os idiomas "Português" e "Inglês".

O ideal em listas de idiomas seria listar todos os idiomas possíveis. Temos, atualmente, livros em Hebraico e Alemão na coleção, na qual os metadados de idioma não puderam ser corretamente identificados.

Tornar válido RSS de títulos

O atual RSS que mostra os últimos títulos inseridos na base não está válido de acordo com o validador do W3C (http://validator.w3.org/feed/).

Isso impede que o feed funcione corretamente na seção de "títulos recentes".

URL do RSS atual: http://books.scielo.org/search/index.php?output=rss&site=livros&col=&lang=pt&sort=publication_date+desc

O feed deve mostrar os últimos títulos inseridos na base, ordenados por data de inserção na base. A imagem da capa do livro deve fazer parte do feed.

O feed também é utilizado nos portais institucionais, filtrando os livros de acordo com a editora.

Trocar ordem dos links "PDF" e "ePUB"

Na caixa de Download dos livros, alterar a ordem dos links: primeiro ePUBs e depois o PDF.

Além disso, aumentar um pouco mais a separação entre os itens -- sugestão: acrescentar 10px ao espaçamento atual.

Aplicar apenas no template de livros em acesso aberto.

Inserir campo "Professional Affiliation" em "Creators"

Segundo orientações de boas práticas de metadados em ONIX da EDItEUR, a tag <ProfessionalAffiliation> é recomendada para cada tag de autor.
Não temos este campo no backoffice para cadastramento.
A fonte de dados para o ONIX é o backoffice.

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.