maj liste commandes + détails internes

This commit is contained in:
Emmanuel Viennet 2021-12-21 17:12:58 +01:00
parent 554ca6a39c
commit 73ce966baf
2 changed files with 122 additions and 20 deletions

View File

@ -99,7 +99,9 @@ Exemple:
donne le rôle `Observateur` (qui doit déjà exister) à l'utilisateur `dupont` dans
le département `MMI`.
Si le département n'est pas spécifié, le rôle est donné dans *tous* les départements.
Si le département n'est pas spécifié, le rôle est donné dans *tous* les
départements (utile pour certains compte administrateurs ou utilisés en lecture
par des clients de l'API).
## Migration des données de ScoDoc 7
Les données dans ScoDoc 9 ayant un format et une organisation très différents
@ -130,26 +132,43 @@ Exemple:
## Liste des commandes Flask/ScoDoc
```
Commands:
clear-cache Clear ScoDoc cache (currently Redis)
create-dept Create new departement
delete-dept Delete existing departement
edit-role Add [-a] and/or remove [-r] a permission to/from a role
import-scodoc7-dept Import département ScoDoc 7
import-scodoc7-users Import users defined in ScoDoc7 postgresql
sco-db-init Initialize the database.
user-create Create a new user
user-db-clear Erase all users and roles from the database !
user-password Set (or change) user's password
clear-cache Clear ScoDoc cache This cache (currently...
create-dept Create new departement
create-role Create a new role
delete-dept Delete existing departement
dumphelp
edit-role Add [-a] and/or remove [-r] a permission...
import-scodoc7-dept Import département ScoDoc 7: dept:...
import-scodoc7-users Import users defined in ScoDoc7...
list-depts If dept exists, print it, else nothing.
localize-logo Make local to a dept a global logo (both...
migrate-scodoc7-dept-archives Post-migration: renomme les archives en...
migrate-scodoc7-dept-logos Post-migration: renomme les logos en...
photos-import-files
profile Start the application under the code...
sco-db-init Initialize the database.
scodoc-database print the database connexion string
user-create Create a new user
user-db-clear Erase all users and roles from the...
user-password Set (or change) user's password
user-role Add or remove a role to the given user...
Usage: app sco-db-init [OPTIONS]
Initialize the database. Starts from an existing database and create all the
necessary SQL tables and functions.
Options:
--erase / --no-erase
--help Show this message and exit.
Usage: app user-db-clear [OPTIONS]
Erase all users and roles from the database !
Options:
--help Show this message and exit.
Usage: app user-create [OPTIONS] USERNAME ROLE DEPT
Create a new user
@ -157,7 +176,7 @@ Usage: app user-create [OPTIONS] USERNAME ROLE DEPT
Options:
-n, --nom TEXT
-p, --prenom TEXT
--help Show this message and exit.
Usage: app user-password [OPTIONS] USERNAME
@ -165,7 +184,14 @@ Usage: app user-password [OPTIONS] USERNAME
Options:
--password TEXT
--help Show this message and exit.
Usage: app create-role [OPTIONS] ROLENAME [PERMISSIONS]...
Create a new role
Options:
--help Show this message and exit.
Usage: app edit-role [OPTIONS] ROLENAME
@ -178,42 +204,117 @@ Usage: app edit-role [OPTIONS] ROLENAME
Options:
-a, --add TEXT
-r, --remove TEXT
--help Show this message and exit.
Usage: app user-role [OPTIONS] USERNAME
Usage: app delete-dept DEPT
Add or remove a role to the given user in the given dept
Options:
-d, --dept TEXT
-a, --add TEXT
-r, --remove TEXT
--help Show this message and exit.
Usage: app delete-dept [OPTIONS] DEPT
Delete existing departement
Options:
--help Show this message and exit.
Usage: app create-dept DEPT
Usage: app create-dept [OPTIONS] DEPT
Create new departement
Options:
--help Show this message and exit.
Usage: app import-scodoc7-users
Usage: app list-depts [OPTIONS] [DEPTS]...
Import used defined in ScoDoc7 postgresql database into ScoDoc 9 The old
If dept exists, print it, else nothing. Called without arguments, list all
depts along with their ids.
Options:
--help Show this message and exit.
Usage: app scodoc-database [OPTIONS]
print the database connexion string
Options:
-n, --name show database name instead of connexion string (required for
dropdb/createdb commands)
--help Show this message and exit.
Usage: app import-scodoc7-users [OPTIONS]
Import users defined in ScoDoc7 postgresql database into ScoDoc 9 The old
database SCOUSERS must be alive and readable by the current user. This
script is typically run as unix user "scodoc". The original SCOUSERS
database is left unmodified.
Options:
--help Show this message and exit.
Usage: app import-scodoc7-dept DEPT DEPT_DB_NAME
Usage: app import-scodoc7-dept [OPTIONS] DEPT DEPT_DB_NAME
Import département ScoDoc 7: dept: InfoComm, dept_db_name: SCOINFOCOMM
Options:
--help Show this message and exit.
Usage: app clear-cache
Usage: app migrate-scodoc7-dept-archives [OPTIONS] [DEPT]
Post-migration: renomme les archives en fonction des id de ScoDoc 9
Options:
--help Show this message and exit.
Usage: app migrate-scodoc7-dept-logos [OPTIONS] [DEPT]
Post-migration: renomme les logos en fonction des id / dept de ScoDoc 9
Options:
--help Show this message and exit.
Usage: app localize-logo [OPTIONS] LOGO DEPT
Make local to a dept a global logo (both logo and dept names are mandatory)
Options:
--help Show this message and exit.
Usage: app photos-import-files [OPTIONS] FORMSEMESTRE_ID XLSFILE ZIPFILE
Options:
--help Show this message and exit.
Usage: app clear-cache [OPTIONS]
Clear ScoDoc cache This cache (currently Redis) is persistent between
invocation and it may be necessary to clear it during development or tests.
Options:
--help Show this message and exit.
Usage: app dumphelp [OPTIONS]
Options:
--help Show this message and exit.
Usage: app profile [OPTIONS]
Start the application under the code profiler.
Options:
-h, --host TEXT The interface to bind to.
-p, --port INTEGER The port to bind to.
--length INTEGER Number of functions to include in the profiler report.
--profile-dir TEXT Directory where profiler data files are saved.
--help Show this message and exit.
```
## Changement des logos apparaissant sur les documents
*Note: après migration, vos logos de ScoDoc 7 sont installés dans ScoDoc 9*.

View File

@ -12,6 +12,7 @@ Quelques informations pour les développeurs.
- l'ORM [SQLAlchemy](https://www.sqlalchemy.org/)
- les templates [Jinja2](https://jinja.palletsprojects.com/en/3.0.x/)
- [Postgresql](https://www.postgresql.org/)
- [Redis](https://redis.io/) cache persistant
- [NGINX](https://www.nginx.com/) serveur Web frontal
- [gunicorn](https://gunicorn.org/) WSGI HTTP server
- et bien sûr Linux (Debian) et systemd.