README.md 2.19 KB
Newer Older
Esquilax76's avatar
Esquilax76 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Converter hdoc_to_neo4j
-----------------------

The purpose of this converter is to obtain a file of Neo4j requests from .scar format. 


License GPL3.0
--------------

http://www.gnu.org/licenses/gpl-3.0.txt


Credits
-------

* Alié Félix

* Routier Clément


Dependance
----------


This project can be used alone if you only want to convert a .scar into a Neo4j requests file or directly insert data in neo4j local database.

Tyrannas's avatar
Tyrannas committed
27 28 29 30 31 32
WARNINGS: 

1) If you want to insert data automatically in a database, you need to have nodeJS installed! 
	Windows: https://nodejs.org/en/ and download + install the last stable version
	Linux: install with your distribution's package manager

Esquilax76's avatar
Esquilax76 committed
33 34 35 36 37 38 39
2) You have to download neo4j, according to your OS, and have it running during the execution of the script.
	Windows: https://neo4j.com/download/community-edition
	Linux: https://neo4j.com/docs/operations-manual/current/installation/linux

3) You need to configure the ../hdoc_to_neo4j/node/config.json file properly to fit with the parameters of the dabase you want to insert in. (host, db and password).


Esquilax76's avatar
Esquilax76 committed
40 41 42 43 44 45

User documentation
------------------

You have to respect the following steps :

Esquilax76's avatar
Esquilax76 committed
46
1 - Place one or several archives (.scar) in the "input" folder
Esquilax76's avatar
Esquilax76 committed
47

Esquilax76's avatar
Esquilax76 committed
48
2 - Run the "runWithNode" file (choose the extension according to your OS)
Esquilax76's avatar
Esquilax76 committed
49

Esquilax76's avatar
Esquilax76 committed
50
3 - Admire the graph created with neo4j in your browser (on localhost:7474)
Esquilax76's avatar
Esquilax76 committed
51 52 53 54 55 56 57 58 59 60 61 62


Unsupported 
-----------


Known bugs
----------


Todo
---- 
Esquilax76's avatar
Esquilax76 committed
63 64 65 66
Create a new type of link for references (a first version of the "voir aussi" section is done in opale_to_hdoc)
Create and import a .grass file for nodes and links style
Use metadata (as a new attribute to the node) to search all nodes related to a topic
Create a public database
Esquilax76's avatar
Esquilax76 committed
67 68 69 70 71 72



Technical notes
---------------

Esquilax76's avatar
Esquilax76 committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
Here are some requests which could be useful :

==> Display all data
MATCH (n) return n

==> Delete all data
MATCH (n) detach delete n

==> Display all exercises
MATCH (n:exercise) return n

==> Display all nodes linked with the searched one
MATCH (n) WHERE n.title =~ '(?i).*Algèbre.*' MATCH(n)-[:LIEN*1..10]->(d) RETURN distinct d;

==> Delete a single node
MATCH (n) WHERE n.title =~ '(?i).*Gestion du personnel.*' detach n delete n 

Esquilax76's avatar
Esquilax76 committed
90 91 92 93


Capitalisation
--------------