Commit c3eba86911fa91639d9e07b80ee8d1c91f4c2eef
1 parent
c54ee176
Exists in
master
and in
1 other branch
update README.md
Showing
1 changed file
with
18 additions
and
23 deletions
Show diff stats
README.md
@@ -3,18 +3,18 @@ | @@ -3,18 +3,18 @@ | ||
3 | 3 | ||
4 | ## Requirements | 4 | ## Requirements |
5 | 5 | ||
6 | -Before installing the server, we will need to install python with some additional packages. | 6 | +Before installing the server, we will need to install python3.7 with some additional packages, and npm (Node package management). |
7 | 7 | ||
8 | -### Install python3.7 with sqlite3 support | 8 | +### Install python3.7 with sqlite3 support and npm |
9 | 9 | ||
10 | This can be done using the system package management, downloaded from [http://www.python.org](), or compiled from sources. | 10 | This can be done using the system package management, downloaded from [http://www.python.org](), or compiled from sources. |
11 | 11 | ||
12 | - Installing from the system package manager: | 12 | - Installing from the system package manager: |
13 | 13 | ||
14 | ```sh | 14 | ```sh |
15 | -sudo port install python37 # MacOS | ||
16 | -sudo pkg install python37 py37-sqlite3 # FreeBSD | ||
17 | -sudo apt install ?not available yet? # Linux, install from source | 15 | +sudo port install python37 npm5 # MacOS |
16 | +sudo pkg install python37 py37-sqlite3 npm # FreeBSD | ||
17 | +sudo apt install python3.7 npm # Linux | ||
18 | ``` | 18 | ``` |
19 | 19 | ||
20 | - Installing from source: | 20 | - Installing from source: |
@@ -50,33 +50,27 @@ If you want to always install python modules on the user account (recommended), | @@ -50,33 +50,27 @@ If you want to always install python modules on the user account (recommended), | ||
50 | user = yes | 50 | user = yes |
51 | ``` | 51 | ``` |
52 | 52 | ||
53 | -### Install additional python packages: | 53 | +### Install python packages and javascript libraries: |
54 | + | ||
55 | +Replace USER by your bitbucket username: | ||
54 | 56 | ||
55 | ```sh | 57 | ```sh |
56 | -pip3 install --user \ | ||
57 | - tornado \ | ||
58 | - sqlalchemy \ | ||
59 | - pyyaml \ | ||
60 | - pygments \ | ||
61 | - mistune \ | ||
62 | - bcrypt \ | ||
63 | - networkx | 58 | +cd path/to/some/directory |
59 | +git clone https://USER@bitbucket.org/mjsb/aprendizations.git | ||
60 | +cd aprendizations | ||
61 | +pip install . # install aprendizations and dependencies | ||
62 | +npm install # install javascript libraries | ||
64 | ``` | 63 | ``` |
65 | 64 | ||
66 | -These are usually installed under | 65 | +Python packages are usually installed in: |
67 | 66 | ||
68 | - `~/.local/lib/python3.7/site-packages/` in Linux/FreeBSD. | 67 | - `~/.local/lib/python3.7/site-packages/` in Linux/FreeBSD. |
69 | - `~/Library/python/3.7/lib/python/site-packages/` in MacOS. | 68 | - `~/Library/python/3.7/lib/python/site-packages/` in MacOS. |
70 | 69 | ||
71 | -## Installation | ||
72 | - | ||
73 | -Replace USER by your bitbucket username: | 70 | +Javascript libraries are installed in `aprendizations/node_modules` directory. |
71 | +This libraries are linked from the `aprendizations/aprendizations/static` directory. | ||
74 | 72 | ||
75 | -```sh | ||
76 | -cd path/to/some/directory | ||
77 | -git clone https://USER@bitbucket.org/mjsb/aprendizations.git | ||
78 | -cd aprendizations | ||
79 | -``` | 73 | +At this point aprendizations can be run anywhere with the command `aprendizations`. |
80 | 74 | ||
81 | ## Configuration | 75 | ## Configuration |
82 | 76 | ||
@@ -87,6 +81,7 @@ The user data is maintained in a sqlite3 database file. We first need to create | @@ -87,6 +81,7 @@ The user data is maintained in a sqlite3 database file. We first need to create | ||
87 | ```sh | 81 | ```sh |
88 | cd aprendizations | 82 | cd aprendizations |
89 | ./initdb.py # show current database or initialize empty if nonexisting | 83 | ./initdb.py # show current database or initialize empty if nonexisting |
84 | +./initdb.py --admin # add admin user | ||
90 | ./initdb.py inscricoes.csv # add students from CSV, passwords are the numbers | 85 | ./initdb.py inscricoes.csv # add students from CSV, passwords are the numbers |
91 | ./initdb.py --add 1184 "Aladino da Silva" # add new user (default password=1184) | 86 | ./initdb.py --add 1184 "Aladino da Silva" # add new user (default password=1184) |
92 | ./initdb.py --update 1184 --pw alibaba # update password of given student | 87 | ./initdb.py --update 1184 --pw alibaba # update password of given student |