From accb33ebef425ad54d03462f0e12235dd35f5015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Due=C3=B1as?= Date: Thu, 3 Sep 2015 20:25:58 +0200 Subject: [PATCH] Add basic info about commands to README file --- README.md | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 165 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6cfc9e4dd..2b1088f7c 100644 --- a/README.md +++ b/README.md @@ -6,24 +6,29 @@ A tool to manage identities. Usage ----- ``` -sortinghat [--help] [-c ] [-u ] [-p ] - [--host ] [--port ] [-d ] - command [] +usage: sortinghat [--help] [-c ] [-u ] [-p ] + [--host ] [--port ] [-d ] + command [] The most commonly used sortinghat commands are: add Add identities affiliate Affiliate identities + blacklist List, add or delete entries from the blacklist config Get and set configuration parameters + countries List information about countries enroll Enroll identities into organizations + export Export data (i.e identities) from the registry init Create an empty registry load Import data (i.e identities, organizations) on the registry merge Merge unique identities mv Move an identity into a unique identity log List enrollment information available in the registry orgs List, add or delete organizations and domains + profile Edit profile rm Remove identities from the registry show Show information about a unique identity + unify Merge identities using a matching algorithm withdraw Remove identities from organizations General options: @@ -56,6 +61,163 @@ Configuration $ sortinghat init ``` +Basic commands +-------------- + +* Add some unique identities +``` + $ sortinghat add --name "John Smith" --email "jsmith@example.com" --username "jsmith" --source scm + New identity 03e12d00e37fd45593c49a5a5a1652deca4cf302 added to 03e12d00e37fd45593c49a5a5a1652deca4cf302 + + $ sortinghat add --name "John Doe" --email "jdoe@example.com" --source scm + New identity a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 added to a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 +``` + +* Set a profile +``` + $ sortinghat profile --name "John Smith" --email "jsmith@example.com" --country US 03e12d00e37fd45593c49a5a5a1652deca4cf302 + unique identity 03e12d00e37fd45593c49a5a5a1652deca4cf302 + + Profile: + * Name: John Smith + * E-Mail: jsmith@example.com + * Bot: No + * Country: US - United States of America +``` + +* Add an identity to an existing unique identity +``` + $ sortinghat add --username "jsmith" --source mls --uuid 03e12d00e37fd45593c49a5a5a1652deca4cf302 + New identity 0dbc8c481b56df6da15398c83dde2f844030e978 added to 03e12d00e37fd45593c49a5a5a1652deca4cf302 +``` + +* Merge two identities +``` + $ sortinghat merge a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 03e12d00e37fd45593c49a5a5a1652deca4cf302 + Unique identity a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 merged on 03e12d00e37fd45593c49a5a5a1652deca4cf302 +``` + +* Move an identiy into a unique identity +``` + $ sortinghat move a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 + New unique identity a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 created. Identity moved +``` + +* Remove a unique identity +``` + $ sortinghat rm a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 + Unique identity a7637bb1737bc2a83f3a3e25b9b441cba62d97c2 removed +``` + +* Show identities information +``` + $ sortinghat show + unique identity 03e12d00e37fd45593c49a5a5a1652deca4cf302 + + Profile: + * Name: John Smith + * E-Mail: jsmith@example.com + * Bot: No + * Country: US - United States of America + + Identities: + 03e12d00e37fd45593c49a5a5a1652deca4cf302 John Smith jsmith@example.com jsmith scm + 0dbc8c481b56df6da15398c83dde2f844030e978 - - jsmith mls + + No enrollments +``` + +* Add some organizations +``` + $ sortinghat orgs -a Example + $ sortinghat orgs -a Bitergia + $ sortinghat orgs -a Individual +``` + +* Add some domains to the organizations +``` + $ sortinghat orgs -a Example example.com --top-domain + $ sortinghat orgs -a Example web.example.com + $ sortinghat orgs -a Bitergia bitergia.com --top-domain +``` + +* List organizations +``` + $ sortinghat orgs + Bitergia bitergia.com * + Example example.com * + Example web.example.com + Individual +``` + +* Remove domains +``` + $ sortinghat orgs -d Example web.example.com +``` + +* Remove organizations +``` + $ sortinghat orgs -d Bitergia +``` + +* Enroll +``` + $ sortinghat enroll --from 2014-06-01 --to 2015-09-01 03e12d00e37fd45593c49a5a5a1652deca4cf302 Example + $ sortinghat enroll --from 2015-09-01 03e12d00e37fd45593c49a5a5a1652deca4cf30 Individual +``` + +* Show enrollments information +``` + $ sortinghat show 03e12d00e37fd45593c49a5a5a1652deca4cf302 + unique identity 03e12d00e37fd45593c49a5a5a1652deca4cf302 + + Profile: + * Name: John Smith + * E-Mail: jsmith@example.com + * Bot: No + * Country: US - United States of America + + Identities: + 03e12d00e37fd45593c49a5a5a1652deca4cf302 John Smith jsmith@example.com jsmith scm + 0dbc8c481b56df6da15398c83dde2f844030e978 - - jsmith mls + + Enrollments: + Example 2014-06-01 00:00:00 2015-09-01 00:00:00 + Individual 2015-09-01 00:00:00 2100-01-01 00:00:00 +``` + +* Withdraw +``` + $ sortinghat withdraw --from 2014-06-01 --to 2015-09-01 03e12d00e37fd45593c49a5a5a1652deca4cf302 Example +``` + +Import / Export +--------------- + +* Import data from a Sorting Hat JSON file +``` + $ sortinghat load sh.json + Loading blacklist... + Entry added to the blacklist + 1/1 blacklist entries loaded + Loading unique identities... + + 00000ba7f563234e5f239e912f2df1021695122e (old 00000ba7f563234e5f239e912f2df1021695122e) loaded + + 00003e37e7586be36c64ce4f9eafa89f11be2448 (old 00003e37e7586be36c64ce4f9eafa89f11be2448) loaded + ... + + fa84729382093928570aef849483948489238498 (old fa84729382093928570aef849483948489238498) loaded + 100/100 unique identities loaded +``` + +* Export identities +``` + $ sortinghat export --identities sh_ids.json +``` + +* Export organizations +``` + $ sortinghat export --orgs sh_orgs.json +``` + Requirements ------------