index.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Libreant: the general purpose media archive manager</title>
  6. <meta name="description" content="Nasty code for nasty people!">
  7. <meta name="author" content="Insomnia-lab">
  8. <meta name="apple-mobile-web-app-capable" content="yes" />
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
  10. <link rel="stylesheet" href="css/reveal.css">
  11. <link rel="stylesheet" href="css/theme/sky.css" id="theme">
  12. <!-- For syntax highlighting -->
  13. <link rel="stylesheet" href="lib/css/zenburn.css">
  14. <!-- If the query includes 'print-pdf', use the PDF print sheet -->
  15. <script>
  16. document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
  17. </script>
  18. <!--[if lt IE 9]>
  19. <script src="lib/js/html5shiv.js"></script>
  20. <![endif]-->
  21. </head>
  22. <body>
  23. <div class="reveal">
  24. <!-- Any section element inside of this container is displayed as a slide -->
  25. <div class="slides">
  26. <section>
  27. <h1>Libreant: </h1>
  28. <h3>The general purpose media archive manager</h3>
  29. <p>
  30. <small>For more info:<a href="https://libreant.readthedocs.org/en/latest/">libreant.rtfd.org</a></small>
  31. </p>
  32. <img src="img/logo_black.png" alt="Logo" style="border-width:0; width:35%; background-color: transparent; box-shadow:0 0 0px">
  33. </section>
  34. <section>
  35. <section>
  36. <h2>Background</h2>
  37. <h4>Insomnialab birth</h4>
  38. <p>
  39. Two years ago some people began to meet in Rome, in a local squat, inside Sapienza university.
  40. There were exciting times and a new hacker space was born.
  41. </p>
  42. <br/>
  43. <p class="fragment">
  44. <code class="python">Insomnialab</code> is now two years old and is currently located inside the walls of Forte Prenestino,
  45. after the eviction of the squat.
  46. </p>
  47. </section>
  48. <section>
  49. <h2>Background</h2>
  50. <h4>Needs</h4>
  51. <p>
  52. In the Sapienza squat we contributed to the beginning of a project, called <em>Proprietà Pirata</em>. The goal was
  53. to overcome the limits imposed by the copyright enforcement, primarily inside the university classes.
  54. We realized that a lot of infoshops and in self-organized places (autonomous libraries, etc.) would benefit from
  55. an <u>easy-to-use and federative software</u>.
  56. </p>
  57. </section>
  58. <section>
  59. <h2>Background</h2>
  60. <h4>Existing software</h4>
  61. <p>
  62. We realized that there existed some FOSS solution:
  63. </p>
  64. <ul>
  65. <li class="fragment"><b>Calibre</b><br/><small>desktop application, not suited for web managing</small></li>
  66. <li class="fragment"><b>Colibrì</b><br/> <small>not ready at the time</small></li>
  67. <li class="fragment"><b>PeerLibrary</b><br/> <small>designed specifically for academic papers</small></li>
  68. </ul>
  69. </section>
  70. </section>
  71. <section>
  72. <section>
  73. <h2>Reinventing the wheel</h2>
  74. <h4>Libreant features</h4>
  75. <ul>
  76. <li class="fragment"><b>Node aggregator</b><br/><small>Give the possibility for some nodes to browse each other</small></li>
  77. <li class="fragment"><b>webapp</b><br/><small>The interface, both for user and admin</small></li>
  78. <li class="fragment"><b>Easy-to-use and customizable</b><br/><small></small></li>
  79. </ul>
  80. </section>
  81. <section>
  82. <h2>Architecture</h2>
  83. <h4>Tools</h4>
  84. <ul>
  85. <li class="fragment"><b>Language</b>: python</li>
  86. <li class="fragment"><b>Database</b>: elasticsearch + fsdb</li>
  87. <li class="fragment"><b>web framework</b>: Flask</li>
  88. </ul>
  89. </section>
  90. <section>
  91. <h2>Architecture</h2>
  92. <h4>How we built it</h4>
  93. <ul>
  94. <li><a href=./index.html#/2/3>Agherant</a> (aggregator)</li>
  95. <li><a href=./index.html#/2/4>Preset/Templating</a></li>
  96. <li><a href=./index.html#/2/5>Full text search (ES)</a></li>
  97. <li><a href=./index.html#/2/6>Localization</a></li>
  98. <li><a href=./index.html#/2/7>REST API</a></li>
  99. <li><a href=./index.html#/2/8>CLI</a></li>
  100. <li><a href=./index.html#/2/9>Modularity</a></li>
  101. </ul>
  102. </section>
  103. <section>
  104. <h2>Architecture</h2>
  105. <h4>Agherant</h4>
  106. <p>Pretty self-explanatory<br/>
  107. <img src="img/graph.png" alt="a mesh graph" style="width:40%"></p>
  108. <p><small><a href=./index.html#/2/2>Back</a></small></p>
  109. </section>
  110. <section data-markdown>
  111. <script type="text/template">
  112. ## Architecture
  113. #### Preset/Templating
  114. ```json
  115. {"id":"book",
  116. "description":"simple book",
  117. "properties": [{ "id": "category",
  118. "description": "book format",
  119. "required": true,
  120. "type": "enum",
  121. "values": ["scientific","novel","children"]
  122. },
  123. { "id": "title",
  124. "description": "a required property",
  125. "required": true
  126. },
  127. { "id": "actors",
  128. "description":"people who contributed to the creation of the work"
  129. }],
  130. "allow_upload": true}
  131. ```
  132. [Back](./index.html#/2/2)
  133. </script>
  134. </section>
  135. <section>
  136. <h2>Architecture</h2>
  137. <h4>Full text search</h4>
  138. <p>Let's try it! <p>
  139. <small><a href=./index.html#/2/2>Back</a></small></p>
  140. </section>
  141. <section>
  142. <h2>Architecture</h2>
  143. <h4>Localization</h4>
  144. <p>We use Babel to allow for localization.</p>
  145. <p>An example can be looked in the html skeletons</p>
  146. <pre><code class="hljs html">
  147. {%trans%}Sorry, no books matching your query{%endtrans%}
  148. </code></pre>
  149. <p><small><a href=./index.html#/2/2>Back</a></small></p>
  150. </section>
  151. <section data-markdown>
  152. <script type="text/template">
  153. ## Architecture
  154. #### REST API
  155. ```
  156. GET /api/v1/volumes/<volume-id>
  157. GET /api/v1/volumes/?q=staceppademinchia&size=2&from=5
  158. POST /api/v1/volumes/
  159. PUT /api/v1/volumes/<volume-id>/attachments/<attachments-id>
  160. GET /api/v1/volumes/<volume-id-id>/attachments/<attachments-id>/file
  161. ```
  162. #### [Back](./index.html#/2/2)
  163. </script>
  164. </section>
  165. <section>
  166. <h2>Architecture</h2>
  167. <h4>CLI</h4>
  168. <pre><code class="hljs bash">
  169. Usage: libreant [OPTIONS]
  170. launch libreant daemon
  171. Options:
  172. --version Show the version and exit.
  173. -s, --settings <path> file from wich load settings
  174. -d, --debug operate in debug mode
  175. -p, --port <port> port on which daemon will listen
  176. --address <address> address on which daemon will listen
  177. --fsdb-path <path> path used for storing binary file
  178. --es-indexname <name> index name to use for elasticsearch
  179. --es-hosts <host>.. list of elasticsearch nodes to connect to
  180. --preset-paths <path>.. list of paths where to look for presets
  181. --agherant-descriptions <url>..
  182. list of description urls of nodes to
  183. aggregate
  184. --help Show this message and exit.
  185. </code></pre>
  186. <p><small><a href=./index.html#/2/2>Back</a></small></p>
  187. </section>
  188. <section>
  189. <h2>Architecture</h2>
  190. <h4>Modularity</h4>
  191. <p>We designed libreant to be:</p>
  192. <ul>
  193. <li>Modular</li>
  194. <li>Easy to read</li>
  195. <li>Hackable</li>
  196. </ul>
  197. <p><small><a href=./index.html#/2/2>Back</a></small></p>
  198. </section>
  199. </section>
  200. <section>
  201. <section data-markdown>
  202. <script type="text/template">
  203. ## The code
  204. #### Fork me on github
  205. Easy as a fork
  206. ```
  207. git clone https://github.com/insomnia-lab/libreant
  208. ```
  209. </script>
  210. </section>
  211. <section data-markdown>
  212. <script type="text/template">
  213. ## Read the docs!
  214. We have been trying also to document appropriately the code!
  215. [libreant.rtfd.org](http://libreant.rtfd.org)
  216. </script>
  217. </section>
  218. <section>
  219. <h1 style="padding-top: 150px">THANKS</h1>
  220. </section>
  221. </section>
  222. </div>
  223. </div>
  224. <script src="lib/js/head.min.js"></script>
  225. <script src="js/reveal.min.js"></script>
  226. <script>
  227. // Full list of configuration options available here:
  228. // https://github.com/hakimel/reveal.js#configuration
  229. Reveal.initialize({
  230. controls: true,
  231. progress: true,
  232. history: true,
  233. theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
  234. transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/none
  235. // Optional libraries used to extend on reveal.js
  236. dependencies: [
  237. { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
  238. { src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  239. { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  240. { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
  241. { src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
  242. { src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
  243. ]
  244. });
  245. </script>
  246. </body>
  247. </html>