dossier.1 - dossier - console collection manager
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
dossier.1 (4709B)
---
1 .Dd $Mdocdate: July 18 2018 $
2 .Dt DOSSIER 1
3 .Os
4 .Sh NAME
5 .Nm dossier
6 .Nd a console collection manager
7 .Sh SYNOPSIS
8 .Nm
9 .Op Cm show | Cm import Ar file | Cm help | Cm export | Cm collections | Cm rm | Cm search | Ar item Op attribute value
10 .Nm
11 .Ar item Op attribute value Op item attribute value Op item attribute value
12 .Sh DESCRIPTION
13 .Pp
14 .Nm
15 is a tool to register "items" into collections with metadata. Allowing to
16 keep tracks of collections like wine, tea, video games, movie, music etc...
17 .Pp
18 Collections are a set of items, attributes and values.
19 .Nm
20 allows to manage different collections to not mix everything.
21 .Bl -tag -width Ds
22 .It Nm Cm help
23 Show help
24 .It Nm Cm show Oo Cm attributes Oc Op item-name
25 the command
26 .Cm show
27 without argument will display the list of items in the current collection.
28 .Pp
29 With the argument
30 .Cm attributes
31 it will show the list of known attributes and possibles values currently in use.
32 .Pp
33 With the argument
34 .Ar item-name
35 it will show all the attributes known for that item.
36 .It Nm Cm rm Ar item-name
37 Remove item
38 .Ar item-name
39 from the collection.
40 .It Nm Cm export
41 Export the data of the current collection as CSV (Comma Separated Values).
42 Newlines in values are modified into space character, this is so to ease
43 processing the output with line-based tools such as awk or sed.
44 .Pp
45 If you need to write an export tool, see
46 .Sx INTERNALS
47 .It Nm Cm import Ar file
48 Import the data from
49 .Ar file
50 using the exact same format as the export (no newline in a field, fields name in
51 the first line, values with spaces should be quoted). This is very useful for a
52 batch import or if you want to export the data to a spreadsheet tool to
53 manipulate the values and then importing back.
54 .Pp
55 The import functions internally calls
56 .Nm
57 for each line to set each attributes of each identifier, it's a long and verbose process.
58 .Pp
59 A
60 .Xr git 1
61 tag is created before starting the import to ease the process of undoing changes
62 if the import does not produce the expected result.
63 .It Nm Cm collections Oo collection Oc | Oo register Pa full-path Ar collection-name Oc
64 the command
65 .Cm collections
66 with no argument will show the list of collections that
67 .Nm
68 is aware of aka the collections that have been registered. The collection currently in use
69 will be displayed with a
70 .Sy *
71 symbol after the name.
72 .Pp
73 the command
74 .Cm collections
75 with one parameter
76 will switch the current collection in use to the collection
77 .Ar collection.
78 .Pp
79 the command
80 .Cm collections
81 using the parameter
82 .Ar register
83 will make
84 .Nm
85 aware of a collection, this requires the full path
86 .Ar full-path
87 where is stored the collection and a name
88 .Ar collection-name
89 to identify it. When a collection is registered,
90 .Nm
91 will initialize a
92 .Xr git 1
93 repository in it if possible.
94 .It Nm Cm search Oo attribute Oo value Oc Oc Op attribute value
95 the command
96 .Cm search
97 with no argument will return the list of known attributes in the collections
98 with the number of items for which the attribute is set.
99 .Pp
100 the command
101 .Nm search
102 with one parameter will return the list of the items for which
103 .Ar attribute
104 has been recorded and the associated value, using a semi colon as separator.
105 .Pp
106 The command
107 .Nm search
108 with two parameters will return the list of the items having the value
109 .Ar value
110 in the attribute
111 .Ar attribute.
112 .Pp
113 Using more arguments will return the list of the items matching all the
114 conditions of values in attributes.
115 .Pp
116 Adding an exclamation mark character at the start of an attribute name like
117 .Ar !attribute
118 will return results not matching
119 .Ar value.
120 .It Nm Ar item-name
121 shows all the attributes known for that item.
122 .Pp
123 In case you need to use an
124 .Ar item-name
125 like "collections" or any other name being a
126 .Nm
127 command, the command
128 .Cm show Ar item-name
129 is required.
130 .It Nm Ar item-name Ar attribute Ar value Op Ar attribute2 Ar value2 Ar ...
131 Associate the value
132 .Ar value
133 to the attribute
134 .Ar attribute
135 for item
136 .Ar item-name.
137 Multiples couple of
138 .Ar attribute value
139 can be used on the same command line to define multiples values.
140 .Pp
141 This is the way to add and update data inside a collection.
142 .Pp
143 Every modification is recorded with
144 .Xr git 1 .
145
146 .Sh FILES
147 .Bl -tag -width "~/.collections" -compact
148 .It Pa ~/.collections
149 The directory where
150 .Nm
151 stores the collections registered as symlinks to their full path.
152 .Sh EXIT
153 .Ex -std dossier
154 .Sh SEE ALSO
155 .Xr git 1
156 .Sh Internals
157 Informations are stored using plain text files using a specific hierarchy inside
158 the collection repertory. Each attribute is designed by the folder containing
159 the files. Each file is named after the identifier to store its value.
160 .Sh Authors
161 .An -nosplit
162 The
163 .Nm
164 program was written by
165 .An Solène Rapenne Aq Mt solene@perso.pw