SMOLNET PORTAL home about changes
ishow list of attributes values - dossier - console collection manager	Err	bitreich.org	70
1Log	/scm/dossier/log.gph	bitreich.org	70
1Files	/scm/dossier/files.gph	bitreich.org	70
1Refs	/scm/dossier/refs.gph	bitreich.org	70
1Tags	/scm/dossier/tag	bitreich.org	70
1README	/scm/dossier/file/README.gph	bitreich.org	70
1LICENSE	/scm/dossier/file/LICENSE.gph	bitreich.org	70
i---	Err	bitreich.org	70
1commit b9634f331f3916bb064b16bddefa64e0486078e7	/scm/dossier/commit/b9634f331f3916bb064b16bddefa64e0486078e7.gph	bitreich.org	70
1parent 7ea0cf799e0f6e790535f595fcb3c24951e3b284	/scm/dossier/commit/7ea0cf799e0f6e790535f595fcb3c24951e3b284.gph	bitreich.org	70
hAuthor: Solene Rapenne <solene@perso.pw>	URL:mailto:solene@perso.pw	bitreich.org	70
iDate:   Mon, 30 Jul 2018 13:28:07 +0200	Err	bitreich.org	70
i	Err	bitreich.org	70
ishow list of attributes values	Err	bitreich.org	70
i	Err	bitreich.org	70
iDiffstat:	Err	bitreich.org	70
i  M dossier                             |      22 ++++++++++++++++++++--	Err	bitreich.org	70
i  M dossier.1                           |       6 +++++-	Err	bitreich.org	70
i	Err	bitreich.org	70
i2 files changed, 25 insertions(+), 3 deletions(-)	Err	bitreich.org	70
i---	Err	bitreich.org	70
1diff --git a/dossier b/dossier	/scm/dossier/file/dossier.gph	bitreich.org	70
i@@ -47,6 +47,17 @@ show() {	Err	bitreich.org	70
i     fi	Err	bitreich.org	70
i }	Err	bitreich.org	70
i 	Err	bitreich.org	70
i+# displays the list of values per attributes	Err	bitreich.org	70
i+show_attributes_values() {	Err	bitreich.org	70
i+    cd "$REPO"	Err	bitreich.org	70
i+    for attribute in *	Err	bitreich.org	70
i+    do	Err	bitreich.org	70
i+            printf "%s:\n" $attribute	Err	bitreich.org	70
i+            awk '{ print }' "${attribute}"/* | sort | uniq | sed 's/^/    /'	Err	bitreich.org	70
i+    done	Err	bitreich.org	70
i+    exit 0	Err	bitreich.org	70
i+}	Err	bitreich.org	70
i+	Err	bitreich.org	70
i # export the data in csv format "data","data","data"	Err	bitreich.org	70
i # we assume it'll works with the dataset	Err	bitreich.org	70
i export_csv() {	Err	bitreich.org	70
i@@ -204,7 +215,7 @@ usage() {	Err	bitreich.org	70
i            ": dossier collections [register path name] [name]" \	Err	bitreich.org	70
i            "" \	Err	bitreich.org	70
i            "Show items and display informations about an item" \	Err	bitreich.org	70
i-           ": dossier show [identifier]" \	Err	bitreich.org	70
i+           ": dossier show [attributes] [identifier]" \	Err	bitreich.org	70
i            "" \	Err	bitreich.org	70
i            "Look at attributes, search items having some values" \	Err	bitreich.org	70
i            ": dossier search [attribute [value]] ... [attribute [value]] ..." \	Err	bitreich.org	70
i@@ -258,7 +269,14 @@ if [ "$1" = "help" ]                 ; then usage ; fi	Err	bitreich.org	70
i if [ "$1" = "show" ]	Err	bitreich.org	70
i then	Err	bitreich.org	70
i     if [ "$#" -eq 1 ]; then show_list ; fi	Err	bitreich.org	70
i-    if [ "$#" -eq 2 ]; then show "$2" ; fi	Err	bitreich.org	70
i+    if [ "$#" -eq 2 ]; then	Err	bitreich.org	70
i+            if [ "$2" = "attributes" ]	Err	bitreich.org	70
i+            then	Err	bitreich.org	70
i+                    show_attributes_values	Err	bitreich.org	70
i+            else	Err	bitreich.org	70
i+                    show "$2"	Err	bitreich.org	70
i+            fi	Err	bitreich.org	70
i+    fi	Err	bitreich.org	70
i fi	Err	bitreich.org	70
i 	Err	bitreich.org	70
i # dealing with attributes	Err	bitreich.org	70
1diff --git a/dossier.1 b/dossier.1	/scm/dossier/file/dossier.1.gph	bitreich.org	70
i@@ -19,12 +19,16 @@ allows to manage different collections to not mix everything.	Err	bitreich.org	70
i .Bl -tag -width Ds	Err	bitreich.org	70
i .It Nm Cm help	Err	bitreich.org	70
i Show help	Err	bitreich.org	70
i-.It Nm Cm show Op item-name	Err	bitreich.org	70
i+.It Nm Cm show Oo Cm attributes Oc Op item-name	Err	bitreich.org	70
i the command	Err	bitreich.org	70
i .Cm show	Err	bitreich.org	70
i without argument will display the list of items in the current collection.	Err	bitreich.org	70
i .Pp	Err	bitreich.org	70
i With the argument	Err	bitreich.org	70
i+.Cm attributes	Err	bitreich.org	70
i+it will show the list of known attributes and possibles values currently in use.	Err	bitreich.org	70
i+.Pp	Err	bitreich.org	70
i+With the argument	Err	bitreich.org	70
i .Ar item-name	Err	bitreich.org	70
i it will show all the attributes known for that item.	Err	bitreich.org	70
i .It Nm Cm rm Ar item-name	Err	bitreich.org	70
.
Response: text/plain
Original URLgopher://bitreich.org/0/scm/dossier/commit/b9634f331f3916...
Content-Typetext/plain; charset=utf-8