diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cee49948..f24b17843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ A number of changes all wrapped up in one large PR https://github.com/o19s/quepi ## 7.12.3 - 2023-12-05 -* Restore `thor` based scripts by letting you run `docker compose run app bin/thor list` to see all the thor scripts available for interacting with Quepid. https://github.com/o19s/quepid/pull/904 by @epugh, reported by @vincetrumental in https://github.com/o19s/quepid/issues/888. +* Restore `thor` based scripts by letting you run `docker compose run app bundle exec thor list` to see all the thor scripts available for interacting with Quepid. https://github.com/o19s/quepid/pull/904 by @epugh, reported by @vincetrumental in https://github.com/o19s/quepid/issues/888. * Bump splainer-search to 2.30.7 to pass through basic auth properties to Solr. diff --git a/README.md b/README.md index c0f82282a..b9a7ddfc5 100644 --- a/README.md +++ b/README.md @@ -347,52 +347,10 @@ bin/docker r bin/rake test:jshint The see available tasks: ``` -bin/docker r thor list +bin/docker r bundle exec thor list ``` -Examples include: - -``` -case ----- -thor case:create NAME ... # creates a new case -thor case:share CASEID TEAMID # shares case with an team - -ratings -------- -thor ratings:generate SOLRURL FILENAME # generates random ratings into a .csv file -thor ratings:import CASEID FILENAME # imports ratings to a case - -user ----- -thor user:create EMAIL USERNAME PASSWORD # creates a new user -thor user:grant_administrator EMAIL # grant administrator privileges to user -thor user:reset_password EMAIL NEWPASSWORD # resets user's password -``` - -To see more details about any of the tasks, run `bin/docker r thor help TASKNAME`: - -``` -thor help user:create -Usage: - thor user:create EMAIL USERNAME PASSWORD - -Options: - -a, [--administrator], [--no-administrator] - -Description: - `user:create` creates a new user with the passed in email, name and password. - - EXAMPLES: - - $ thor user:create foo@example.com "Eric Pugh" mysuperstrongpassword - - With -a option, will mark the user as Administrator - - EXAMPLES: - - $ thor user:create -a admin@example.com Administrator mysuperstrongpassword -``` +Additional documentation is in [Operating Documentation](docs/operating_documentation.md#scripting-users-cases-ratings). # Elasticsearch diff --git a/docs/operating_documentation.md b/docs/operating_documentation.md index abe5adb33..8281e85bd 100644 --- a/docs/operating_documentation.md +++ b/docs/operating_documentation.md @@ -14,6 +14,8 @@ This document explains how Quepid can be operated and configured. - [Database Management](#database-management) - [Jupyterlite Notebooks](#jupyterlite-notebooks) - [Using Personal Access Tokens](#using-personal-access-tokens) +- [Scripting Users Cases Ratings](#scripting-users-cases-ratings) + ## Running behind a load balancer > ⚠️ _Quepid will run in TLS (`https`) or plain `http` mode depending on the @@ -236,3 +238,55 @@ curl -X POST http://localhost:3000/api/books/2/judgements/ -H 'Authorization: Be } }' ``` + +## Scripting Users Cases Ratings + +The see available tasks: + +``` +docker compose run app bundle exec thor list +``` + +Examples include: + +``` +case +---- +thor case:create NAME ... # creates a new case +thor case:share CASEID TEAMID # shares case with an team + +ratings +------- +thor ratings:generate SOLRURL FILENAME # generates random ratings into a .csv file +thor ratings:import CASEID FILENAME # imports ratings to a case + +user +---- +thor user:create EMAIL USERNAME PASSWORD # creates a new user +thor user:grant_administrator EMAIL # grant administrator privileges to user +thor user:reset_password EMAIL NEWPASSWORD # resets user's password +``` + +To see more details about any of the tasks, run `bin/docker r bundle exec thor help TASKNAME`: + +``` +thor help user:create +Usage: + thor user:create EMAIL USERNAME PASSWORD + +Options: + -a, [--administrator], [--no-administrator] + +Description: + `user:create` creates a new user with the passed in email, name and password. + + EXAMPLES: + + $ thor user:create foo@example.com "Eric Pugh" mysuperstrongpassword + + With -a option, will mark the user as Administrator + + EXAMPLES: + + $ thor user:create -a admin@example.com Administrator mysuperstrongpassword +```