Libreant: – The general purpose media archive manager – Background



Libreant: – The general purpose media archive manager – Background

0 0


libreant_slides


On Github leophys / libreant_slides

Libreant:

The general purpose media archive manager

For more info:libreant.rtfd.org

Background

Insomnialab birth

Two years ago some people began to meet in Rome, in a local squat, inside Sapienza university. There were exciting times and a new hacker space was born.

Insomnialab is now two years old and is currently located inside the walls of Forte Prenestino, after the eviction of the squat.

Background

Needs

In the Sapienza squat we contributed to the beginning of a project, called Proprietà Pirata. The goal was to overcome the limits imposed by the copyright enforcement, primarily inside the university classes. We realized that a lot of infoshops and in self-organized places (autonomous libraries, etc.) would benefit from an easy-to-use and federative software.

Background

Existing software

We realized that there existed some FOSS solution:

  • Calibredesktop application, not suited for web managing
  • Colibrìnot ready at the time
  • PeerLibrarydesigned specifically for academic papers

Reinventing the wheel

Libreant features

  • Node aggregatorGive the possibility for some nodes to browse each other
  • webappThe interface, both for user and admin
  • Easy-to-use and customizable

Architecture

Tools

  • Language: python
  • Database: elasticsearch + fsdb
  • web framework: Flask

Architecture

How we built it

Architecture

Agherant

Pretty self-explanatory

Back

Architecture

Preset/Templating

   {"id":"book",
    "description":"simple book",
    "properties": [{ "id": "category",
                     "description": "book format",
                     "required": true,
                     "type": "enum",
                     "values": ["scientific","novel","children"]
                   },
                   { "id": "title",
                     "description": "a required property",
                     "required": true
                   },
                   { "id": "actors",
                     "description":"people who contributed to the creation of the work" 
                   }],
    "allow_upload": true}

Back

Architecture

Full text search

Let's try it!

Back

Architecture

Localization

We use Babel to allow for localization.

An example can be looked in the html skeletons

        {%trans%}Sorry, no books matching your query{%endtrans%}
                        

Back

Architecture

REST API

GET   /api/v1/volumes/<volume-id>
GET   /api/v1/volumes/?q=staceppademinchia&size=2&from=5
POST  /api/v1/volumes/
PUT   /api/v1/volumes/<volume-id>/attachments/<attachments-id>
GET   /api/v1/volumes/<volume-id-id>/attachments/<attachments-id>/file

Back

Architecture

CLI

Usage: libreant [OPTIONS]

  launch libreant daemon

Options:
  --version                       Show the version and exit.
  -s, --settings file from wich load settings
  -d, --debug                     operate in debug mode
  -p, --port port on which daemon will listen
  --address              address on which daemon will listen
  --fsdb-path               path used for storing binary file
  --es-indexname            index name to use for elasticsearch
  --es-hosts ..             list of elasticsearch nodes to connect to
  --preset-paths ..         list of paths where to look for presets
  --agherant-descriptions ..
                                  list of description urls of nodes to
                                  aggregate
  --help                          Show this message and exit.
                        

Back

Architecture

Modularity

We designed libreant to be:

  • Modular
  • Easy to read
  • Hackable

Back

The code

Fork me on github

Easy as a fork

        git clone https://github.com/insomnia-lab/libreant

Read the docs!

We have been trying also to document appropriately the code!

libreant.rtfd.org

THANKS