| author | ymh <ymh.work@gmail.com> |
| Fri, 13 Apr 2018 12:43:08 +0200 | |
| branch | documentation |
| changeset 696 | 06825f3aa213 |
| parent 695 | f151478c7628 |
| child 697 | 7cb2daf6da35 |
| permissions | -rw-r--r-- |
| 693 | 1 |
.. description des renkan |
2 |
||
3 |
############################## |
|
4 |
Description de l'outils renkan |
|
5 |
############################## |
|
6 |
||
7 |
Introduction |
|
8 |
============ |
|
9 |
||
10 |
Renkan est un outil d'édition et d'affichage de carte mentale. |
|
11 |
||
12 |
Il a été conçu de façon modulaire et avec une claire separation entre la partie cliente en javascript et la partie serveur. |
|
13 |
||
14 |
En particulier la partie du client en charge des communications avec le serveur (chargement des projets, gestion de la persistance) est totalement modulaire et configurable. |
|
15 |
Cela permet d'adapter facilement le client à l'api de sauvegarde du serveur. |
|
16 |
||
|
695
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
17 |
Les sources et la documentation Renkan peuvent être trouvées dans le dépot de code suivant : https://www.iri.centrepompidou.fr/dev/hg/renkan. |
| 693 | 18 |
|
19 |
Modèle de donnée serveur (HDALab) |
|
20 |
================================= |
|
21 |
||
22 |
Le modèle de donnée du coté serveur est simple. |
|
23 |
En effet le serveur ne cherche pas à interpréter le contenu d'un renkan. |
|
24 |
Il se content de sauvegarder le contenu qui lui est transmis par le client et dans l'autre sens de transmettre directement au client le contenu sauvegardé en base. |
|
25 |
Toute l'interprétation du modèle se fait dans le client. |
|
26 |
||
27 |
Classe renkanmanager.models.Renkan |
|
28 |
---------------------------------- |
|
29 |
||
30 |
*class* ``renkanmanager.models.``\ **Renkan** : |
|
31 |
||
32 |
Classe de base d'un renkan. |
|
33 |
||
34 |
Champs de l'objet: |
|
35 |
||
36 |
- **owner** (`object`) : Le propriétaire (créateur) du renkan. |
|
37 |
- **rk_id** (`str`) : id du renkan. |
|
38 |
- **content** (`str`) : contenu du renkan (la chaine JSON brute). |
|
39 |
- **title** (`str`) : titre du renkan. |
|
40 |
- **image** (`str`) : chemin vers l'image miniature du renkan. |
|
41 |
- **creation_date** (`datetime`) : date de création. |
|
42 |
- **modification_date** (`datetime`) : date de modification. |
|
43 |
||
44 |
||
45 |
Classe hdalab.models.renkan.HdalabRenkan |
|
46 |
---------------------------------------- |
|
47 |
||
48 |
.. autoclass:: hdalab.models.renkan.HdalabRenkan |
|
49 |
:noindex: |
|
50 |
||
51 |
||
52 |
Format renkan |
|
53 |
============= |
|
54 |
||
55 |
Un renkan a le format suivant: |
|
56 |
||
57 |
exemple :: |
|
58 |
||
59 |
{ |
|
60 |
"id": "f4d002b7-d4fd-486c-8898-6c6ceebc3354", |
|
61 |
"schema_version": 2, #version of schema, latest is 2. |
|
62 |
"title": "Example of Renkan with movies", |
|
63 |
"description": "A long description", |
|
64 |
"created": "2013-03-18T11:32:40.253+01:00", |
|
65 |
"updated": "2014-02-04T15:12:56.619+01:00", |
|
66 |
"nodes": [ |
|
67 |
{ |
|
68 |
"id": "node-2013-05-08-72c911bafdf9932c-0001", |
|
69 |
"title": "Une femme mène l'enquête", |
|
70 |
"description": "La caméra suit la femme qui marche\nJeu avec la caméra qui se substitue au spectateur", |
|
71 |
"uri": "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/lyceehulst_3extraits/c8a61ee4-b33c-11e2-802c-00145ea4a2be#id=s_DCA8D184-EFC2-314B-0F6B-84043E8F9984", |
|
72 |
"style": { #optional |
|
73 |
"color": "#ff7f00", #line color, optional (null) |
|
74 |
"thickness": 1, #thickness of the line, optional (1) |
|
75 |
"dash": false, #dashed line, optional (false) |
|
76 |
}, |
|
77 |
"position": { |
|
78 |
"x": -547.0499881440252, |
|
79 |
"y": -221.5401229374163 |
|
80 |
}, |
|
81 |
"image": "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png", |
|
82 |
"size": 0, |
|
83 |
"project_id": "f4d002b7-d4fd-486c-8898-6c6ceebc3354", |
|
84 |
"created_by": "de68xf75y6hs5rgjhgghxbm217xk", |
|
85 |
"type": "...", |
|
86 |
"hidden": false, |
|
87 |
"shape": "circle", |
|
88 |
}, |
|
89 |
... |
|
90 |
], |
|
91 |
"edges": [ |
|
92 |
{ |
|
93 |
"id": "edge-2013-05-08-72c911bafdf9932c-0002", |
|
94 |
"title": "", |
|
95 |
"description": "", |
|
96 |
"uri": "", |
|
97 |
"style": { #optional |
|
98 |
"color": "#ff7f00", #line color, optional (null) |
|
99 |
"thickness": 1, #thickness of the line, optional (1) |
|
100 |
"dash": false, #dashed line, optional (false) |
|
101 |
"arrow": true, #draw the arrow, optional (true) |
|
102 |
}, |
|
103 |
"from": "node-2013-04-30-a81adec6694db5f4-0032", |
|
104 |
"to": "node-2013-05-08-72c911bafdf9932c-0001", |
|
105 |
"project_id": "f4d002b7-d4fd-486c-8898-6c6ceebc3354", |
|
106 |
"created_by": "de68xf75y6hs5rgjhgghxbm217xk" |
|
107 |
}, |
|
108 |
... |
|
109 |
], |
|
110 |
"users": [ #optional |
|
111 |
{ |
|
112 |
"userId": "user-2015-05-05-72c911bafdf9932c-0001", |
|
113 |
"color": "#cc9866", |
|
114 |
"username": "user1", |
|
115 |
"anonymous": true |
|
116 |
}, |
|
117 |
... |
|
118 |
], |
|
119 |
"space_id": "17f968e4-2640-4319-aa61-b5b8b527ebb4", #Optional |
|
120 |
"views": [ #Optional |
|
121 |
{ |
|
122 |
"zoom_level": 0.8275032552816195, |
|
123 |
"offset_x": 832.0104075533723, |
|
124 |
"offset_y": 402.8917139487223 |
|
125 |
} |
|
126 |
] |
|
127 |
} |
|
128 |
||
|
695
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
129 |
On retrouve une documentation un peu plus détaillée à l'url suivante : https://www.iri.centrepompidou.fr/dev/hg/renkan/file/tip/client/README.md . |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
130 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
131 |
|
| 693 | 132 |
Système de chutier |
133 |
================== |
|
134 |
||
135 |
Renkan propose un système de "chutier". C'est un système de liste d'élément ouvert à gauche d'un renkan en édition. |
|
136 |
||
137 |
On le voit à gauche sur l'image suivante : |
|
138 |
||
139 |
.. image:: _static/img/renkan/renkan_edition.png |
|
140 |
||
141 |
Ce système permet d'ajouter rapidement des resources fiches ou tag par "glisser/déposer". |
|
142 |
Techniquement, ces fonctionalités de chutiers propres à HDALab sont définies dans le fichier `hdalab/static/hdalab/js/hdalab-renkan-bins.js`. |
|
143 |
||
144 |
||
145 |
.. _renkan_boite_recherche_contenus: |
|
146 |
||
147 |
Boite de recherche de contenus |
|
148 |
------------------------------ |
|
149 |
||
150 |
.. image:: _static/img/renkan/renkan_recherche_contenus.png |
|
151 |
||
152 |
||
153 |
Cette boite de recherche permet de lancer une requête sur 3 types de ressources: |
|
154 |
- recherche de tag |
|
155 |
- recherche de fiches |
|
156 |
- recherche d'article wikipedia |
|
157 |
||
158 |
+--------------------+----------------------------------------------------------+--------------------------------------+ |
|
159 |
| type | url de requête | Vue | |
|
160 |
+====================+==========================================================+======================================+ |
|
161 |
| tags | http://hdalab.iri-research.org/hdalab/a/tagsearch? | :func:`hdalab.views.ajax.tagsearch` | |
|
162 |
+--------------------+----------------------------------------------------------+--------------------------------------+ |
|
163 |
| fiches | http://hdalab.iri-research.org/hdalab/hdabo/searchajax/? | :class:`hdabo.views.SearchDatasheet` | |
|
164 |
+--------------------+----------------------------------------------------------+--------------------------------------+ |
|
165 |
| articles wikipedia | https://fr.wikipedia.org/w/api.php?action=query... | | |
|
166 |
+--------------------+----------------------------------------------------------+--------------------------------------+ |
|
167 |
||
168 |
Le resultat de la recherche est affiché dans un nouvel onglet listant les ressources. |
|
169 |
||
170 |
||
171 |
Boite de recherche sur les résultats |
|
172 |
------------------------------------ |
|
173 |
||
174 |
.. image:: _static/img/renkan/renkan_recherche_resultats.png |
|
175 |
||
176 |
Cette boite de recherche permet de rechercher et de filtrer des résultats déjà présent dans les onglets. La recherche est uniquement locale et ne lance fait pas de requête http. |
|
177 |
||
178 |
||
179 |
Liste de ressource |
|
180 |
------------------ |
|
181 |
||
182 |
.. image:: _static/img/renkan/renkan_bin_resources.png |
|
183 |
||
184 |
Cet onglet liste des ressources statiques qui peuvent être utiles à l'édition du renkan. |
|
185 |
||
186 |
||
187 |
Liste de ressource supplémentaire |
|
188 |
--------------------------------- |
|
189 |
||
190 |
.. image:: _static/img/renkan/renkan_bin_plus_ressources.png |
|
191 |
||
192 |
Cet onglet liste des ressources "supplémentaires". |
|
193 |
Un renkan est souvent créé à partir du résultat d'une recherche sur la page de `recherche par facette <pages_recherche_facette>`. |
|
194 |
Pour éviter d'avoir trop de noeuds ressources, les 8 premiers résultats de la recherche sont utilisés dans le renkan et les 10 suivants sont utilisés dans ce chutier. |
|
195 |
(ce comportement est défini dans la méthode :func:`hdalab.views.profile.HdalabRenkanGetPut.get`). |
|
196 |
||
197 |
||
198 |
Sauvegarde des renkan |
|
199 |
===================== |
|
200 |
||
201 |
la sauvegarde des renkan est définie dans le fichier `hdalab/static/hdalab/js/renkan-manual-save.js`. |
|
202 |
La sauvegarde est déclenchée par une action de l'utilisateur. |
|
203 |
||
|
696
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
204 |
Calcul des miniatures |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
205 |
===================== |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
206 |
|
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
207 |
.. image:: _static/img/renkan/renkan_liste_miniature.png |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
208 |
|
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
209 |
Lorsqu'un renkan est publié (le statut de l'objet :class:`hdalab.models.renkan.HdalabRenkan` passe à `PUBLISHED`) une miniature du renkan est capturée. |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
210 |
Cette capture se fait dans la méthode :func:`hdalab.services.renkan_capture_preview`. |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
211 |
|
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
212 |
On lance `PhantomJS <http://phantomjs.org/>`_ qui ouvre la page :ref:`affichage-d-un-renkan-en-plein-ecran` et effectue une capture. |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
213 |
|
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
214 |
Les arguments de l'appel sont les suivants :: |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
215 |
|
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
216 |
phantomjs |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
217 |
<chemin/vers/capture-phantomjs.js> |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
218 |
http://hdalab.iri-research.org/hdalab/renkan/full/?rk_id=<id_du_renkan> |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
219 |
<chemin/vers/le/thumbnail.png> |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
220 |
--width=500 |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
221 |
--height=500 |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
222 |
--wait=5000 |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
223 |
|
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
224 |
Le script de capture PhantomJS se trouve dans le fichier `src/hdalab/scripts/capture-phantomjs.js <https://www.iri.centrepompidou.fr/dev/hg/hdabo/file/tip/src/hdalab/scripts/capture-phantomjs.js>`_. |
|
06825f3aa213
Add missing info on signals and renkan thumbnails
ymh <ymh.work@gmail.com>
parents:
695
diff
changeset
|
225 |
|
|
695
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
226 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
227 |
Le module `renkanmanager` |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
228 |
========================= |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
229 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
230 |
Module Django |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
231 |
------------- |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
232 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
233 |
Les fonctionnalité Renkan sont apportée par la librairie Django `renkanmanager`. Le code source de cette librairie se trouve dans le `dépot de code source du projet Renkan <https://www.iri.centrepompidou.fr/dev/hg/renkan>`_ dans le répertoire `/server/python/django/renkanmanager` (c.f. https://www.iri.centrepompidou.fr/dev/hg/renkan/file/tip/server/python/django/renkanmanager). |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
234 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
235 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
236 |
Gestions des fichiers applicatifs Renkan |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
237 |
---------------------------------------- |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
238 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
239 |
L'ensemble des fichiers nécessaires au fonctionnement du client Renkan (javascript, css, imags, libraries) sont fournis comme `ressources statiques <https://docs.djangoproject.com/en/1.8/howto/static-files/>`_ par le module Django `renkanmanager`. |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
240 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
241 |
On peut en parcourir l'arborescence à l'url suivante : https://www.iri.centrepompidou.fr/dev/hg/renkan/file/tip/server/python/django/renkanmanager/static/renkanmanager . |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
242 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
243 |
Tous ces fichiers sont donc mis à jour lors de l'installation d'une nouvelle version de `renkanmanager`. |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
244 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
245 |
Une description plus précise des fichiers nécessaires à l'instanciation d'un client Renkan dans une page web peut être trouvée dans le fichier `Readme <https://www.iri.centrepompidou.fr/dev/hg/renkan/file/tip/client/README.md>`_ du client. |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
246 |
Des exemples d'intégration se trouvent dans le répertoire `test` du client Renkan (https://www.iri.centrepompidou.fr/dev/hg/renkan/file/tip/client/test). |
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
247 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
248 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
249 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
250 |
|
|
f151478c7628
add info on data export/import HDA -> hdalab + management fo the static resources of renkan client.
ymh <ymh.work@gmail.com>
parents:
693
diff
changeset
|
251 |