README.md 2.32 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Hdoc to Mongo (`hdoc_to_mongo`)

## License
License GPL3.0
http://www.gnu.org/licenses/gpl-3.0.txt

## Credits
Alexandre Thouvenin
Kapilraj Thangeswaran

## Presentation
This module is able to extract data from a file in Hdoc format and insert them into MongoDB.

## Dependencies
15 16
- In order to make this module work you have to download and install Node.js from the [Node.js download page](https://nodejs.org/en/).
- If needed, download and install MongoDB from the [MongoDB download page](https://www.mongodb.com/download-center#community).
Kapilraj Thangeswaran's avatar
Kapilraj Thangeswaran committed
17

18
## Instructions
19 20 21
1. Install dependencies
2. Edit "config.json" file from "mongo" folder (for more details, please check "Mongo configuration")
3. Execute run.bat or run.sh
22

23 24 25 26 27 28 29 30
## Web
This module provides a Web application to access MongoDB and execute simples requests.
1. Launch MongoDB using `mongod.exe --rest --jsonp` command from "MongoDB/Server/3.2/bin" folder.
2. Edit "config.json" file from "web" folder (for more details, please check "MongoDB configuration")
3. Open "index.html" in "web" folder

## MongoDB configuration
### In "mongo" folder
31
Use "config.json" in the "mongo" folder to specify :
32 33 34 35
- url : mongodb's url
- database : the database you are using
- collection : the collection you are using
- request : the request you want to perform (for allowed requests, please check "Supported requests")
36
```
37 38 39 40 41 42 43 44 45 46
{
	"url" : "mongodb://localhost:27017/",
	"database" : "database",
	"collection" : "collection",
	"request" : "insert"
}
```

### In "web" folder
Use "config.json" in the "web" folder to specify :
47
- url : mongodb's url including the database
48
- collection : the collection you are using
49
```
50
{
51
	"url" : "mongodb://localhost:27017/database",
52 53 54
	"collection" : "collection",
}
```
55 56 57 58

## Supported requests
- insert

Kapilraj Thangeswaran's avatar
Kapilraj Thangeswaran committed
59
## User stories
60 61 62
- En tant qu’utilisateur rédigeant des documents sous opale, je veux récupérer les exercices corrigés d’un sujet donné dans le but de les réutiliser.
- En tant qu’utilisateur rédigeant des documents sous opale, je veux récupérer les cours d’un auteur précis dans le but d’utiliser ses cours comme références.
- En tant qu’utilisateur universitaire, je souhaite mettre à disposition mes exercices sur internet de manière structuré dans le but de permettre à d’autre utilisateurs universitaires de les trouver, par thème, auteur ou contenu et de les réutiliser.