Index: ossp-pkg/as/as-cui/as-cui.bashrc RCS File: /v/ossp/cvs/ossp-pkg/as/as-cui/as-cui.bashrc,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/as/as-cui/as-cui.bashrc,v' | diff -u /dev/null - -L'ossp-pkg/as/as-cui/as-cui.bashrc' 2>/dev/null --- ossp-pkg/as/as-cui/as-cui.bashrc +++ - 2025-04-18 22:29:48.740379644 +0200 @@ -0,0 +1,45 @@ +## +## AS -- Accounting System +## Copyright (c) 2002 Cable & Wireless Deutschland +## Copyright (c) 2002 Ralf S. Engelschall +## +## This file is part of AS, an accounting system which can be +## found at http://as.is.eu.cw.com/ +## +## This program is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License +## as published by the Free Software Foundation; either version +## 2.0 of the License, or (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +## USA, or contact The OSSP Project . +## +## as-cui.bashrc: AS CUI wrapper for GNU Bourne Again Shell (BASH) +## + +as_complete () { + # determine current context + local arg_pos="$COMP_CWORD" + local arg_cur="${COMP_WORDS[COMP_CWORD]}" + local arg_prev="${COMP_WORDS[COMP_CWORD-1]}" + + # initialize reply + COMPREPLY=() + + if [ $arg_pos -eq 2 ]; then + # complete account name + COMPREPLY=($(as-cui --complete=account "$arg_cur")) + fi +} + +complete -F as_complete as-cui + +alias as="as-cui" + Index: ossp-pkg/as/as-cui/as-cui.pod RCS File: /v/ossp/cvs/ossp-pkg/as/as-cui/as-cui.pod,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/as/as-cui/as-cui.pod,v' | diff -u /dev/null - -L'ossp-pkg/as/as-cui/as-cui.pod' 2>/dev/null --- ossp-pkg/as/as-cui/as-cui.pod +++ - 2025-04-18 22:29:48.743113251 +0200 @@ -0,0 +1,498 @@ +## +## AS -- Accounting System +## Copyright (c) 2002 Cable & Wireless Deutschland +## Copyright (c) 2002 Ralf S. Engelschall +## +## This file is part of AS, an accounting system which can be +## found at http://as.is.eu.cw.com/ +## +## This program is free software; you can redistribute it and/or +## modify it under the terms of the GNU General Public License +## as published by the Free Software Foundation; either version +## 2.0 of the License, or (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +## USA, or contact The OSSP Project . +## +## as-cui.pod: Unix Manual Page +## + +=pod + +=head1 NAME + +B -- Accounting System (AS) Command-Line Client + +=head1 SYNOPSIS + +I + +=over 4 + +B ... [B<-D>|B<--define> IC<=>I] [B<-v>|B<--verbose>] ... + +=back + +I + +=over 4 + +=item B B<-s>|B<--setup> + +=back + +I + +=over 4 + +=item B B<-d>|B<--download> + +=item B B<-u>|B<--update> [I ...] + +=item B B<-c>|B<--commit> [I ...] + +=back + +I + +=over 4 + +=item B I I [I] + +=item B B<-l>|B<--list> + +=item B B<-e>|B<--edit> [I ...] + +=item B B<-r>|B<--remove> I ... + +=back + +I + +=over 4 + +=item B B<--export> [B<--format> I] [B<-f>|B<--file> I] + +=item B B<--import> [B<--format> I] [B<-f>|B<--file> I] [B<--overwrite>] + +=back + +I + +=over 4 + +=item B B<-V>|B<--version> + +=item B B<-h>|B<--help> + +=back + +=head1 DESCRIPTION + +B is the Unix command-line client to the B +(B). B is a database-backed system for accounting event time +and tasks. The B tool allows performing both online and offline event +accounting with B. The offline accounting mode also can be used +without any B backend system, too. + +=head1 OPTIONS + +=head2 Common Configuration Options + +The following shared configuration command-line options exists: + +=over 4 + +=item B<-D>, B<--define> IC<=>I + +Set the configuration variable I to the value I. +This temporarily (or persistently on option B<-s>|B<--setup>) overrides a +possibly existing variable definition in C<$HOME/.as/rc>. + +=item B<-v>, B<--verbose> + +Enable printing of verbose message on F. + +=back + +=head2 Operation Options + +The following mutual exclusive operation command-line options exists: + +=over 4 + +=item B<-s>, B<--setup> + +This is for the (optional) initial setup of the program environment. It +creates the directory C<$HOME/.as/> and the initial contents of the +files C<$HOME/.as/rc>, C<$HOME/.as/serial>, C<$HOME/.as/events>, +C<$HOME/.as/accounts> and C<$HOME/.as/bashrc>. + +=item B<-d>, B<--download> + +This updates the list of available accounts in C<$HOME/.as/accounts>. +Keep in mind that only accounts are available to which the I +has write access. + +=item B<-u>, B<--update> + +This merges in server information about floating events into +C<$HOME/.as/events> and removes comitted events from C<$HOME/.as/events> +which the server now declared fixed. If local event modifications +conflict with the comitted server state, the event is locally tagged +with a corresponding error message. + +=item B<-c>, B<--commit> + +Commit still pending events from local floating event queue to server. + +=item B<-l>, B<--list> + +List all events in local floating event queue. + +=item B<-e>, B<--edit> + +Edit all or a set of particular events in local floating event queue. + +=item B<-r>, B<--remove> + +Delete a set of particular events from local floating event queue. + +=item B<--export> + +Export the local floating event queue in either original +(IC<=as/text>) or XML (IC<=as/xml>) format to F or +I. + +=item B<--import> + +Import the local floating event queue in either original +(IC<=as/text>) or XML (IC<=as/xml>) format from +F or I. If option B<--overwrite> is given, the events are +overwritten (instead of merged into) the local floating event queue. + +=item B<--format> I + +This specifies the import/export format. Default is C. + +=item B<-f>, B<--file> I + +This specifies a file instead of F (on B<--import>) and +F (on B<--export>). + +=item B<--overwrite> + +Indicates an overwriting (instead of merging) operation on B<--import>. + +=item B<-V>, B<--version> + +Just print the program version. + +=item B<-h>, B<--help> + +Just print the program command line usage. + +=back + +=head1 ARGUMENTS + +The following command-line arguments exist: + +=over 4 + +=item I + +Name of an account. This can be specified in either descending or +ascending notation. + +B starts with the root account, ends with the leaf +account and uses the slash character as the separator. An example +is "C". Descending notation resembles the +Unix filesystem hierarchy. The advantage is that it is the more +intuitive notation for humans when searching for unknown accounts. The +disadvantage is that command-line argument auto-completion usually has +to be applied multiple times in order to reach the account. + +B starts with the leaf account, ends with the root +account and uses the dot character as the separator. An example is +"C". Ascending notation resembles the DNS zone +hierarchy. The advantage is that command-line argument auto-completion +usually has to be applied only once (if the leaf account names are +unique) or twice in order to reach the account. This way it allows fast +searching for known accounts. The disadvantage is that it is the less +intuitive notation and especially does not allow searching for unknown +accounts. + +For command-line completion reasons, in both notations the separator +character can be present as a leading and/or trailing character, too. + +The syntax in grammatical description follows: + +B ::= B + | B + +B ::= B? B (B B)* B? + +B ::= B? B (B B)* B? + +B ::= /\// + +B ::= /\./ + +B ::= /[a-zA-Z0-9_-]+/ + +Examples: + + is/dev/prj/openpkg/pmod + /is/dev/prj/openpkg/pmod + is/dev/prj/openpkg/pmod/ + /is/dev/prj/openpkg/pmod/ + pmod.openpkg.prj.dev.is + .pmod.openpkg.prj.dev.is + pmod.openpkg.prj.dev.is. + .pmod.openpkg.prj.dev.is. + +=item I + +Specification of the event time. The syntax as a whole is very complex, +but mostly all elements are optional: + +B ::= ( B? /-/ B? )? =? B* + +B ::= B<24h-clock-time> || B + +B ::= B<24h-clock-time> || B + +B ::= B<24h-clock-time> || B + +B<24h-clock-time> ::= B /:/ B (/:/ B)? + +B ::= /^[01][0-9]|2[0-4]$/ + +B ::= /^[0-5][0-9]$/ + +B ::= /^[0-5][0-9]$/ + +B ::= B + || B + || B + || B + || B + || B + || B + +B ::= /^\.$/ + +B ::= /^\.$/ + +B ::= /^([1-9])?(:([0-9]|[0-5][0-9])?)?$/ + +B ::= /^([0-9]|[01][0-9]|2[0-4])?:([0-9]|[0-5][0-9])?$/ + +B ::= /^[0-9]*\.[0-9]+|[0-9]+\.$/ + +B ::= /^[0-9]*\/[1-9][0-9]*$/ + +B ::= /^0[0-9]$/ + +B ::= /^[1-9][0-9]+$/ + +Examples: + + reference | 00:06 00:15 01:30 06:00 10:00 + -----------+------------------------------ + short | :06 :15 1:30 6: 10: + short | :6 0:15 - 6:0 10:0 + short-hour | - - - 6 - + frac-dec | .1 .25 1.5 6. 10.0 + frac-std | 1/10 1/4 3/2 - - + force-min | 06 - - - - + short-min | - 15 90 360 600 + +=item I + +Optional prose text annotating an event. The only special semantic +recognized in this text are hyperlinks in URI notation. Beside the +standard URI schemes C, C and C the all schemes are +recogized which were configured in the B. + +Example: + + Fixed website http://www.example.com/ + +=item I + +Auto-generated ISO-11578 Universally Unique Identifier (UUID) of an +event. + +Example: + + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + +=back + +=head1 FILES + +=head2 ${HOME}/.as/rc: + +=over 4 + +The runtime configuration file contains settings describing the +communication between this frontend and the central database. + +B ::= B B* + +B ::= /^%!AS-RC-[0-9]\.[0-9]$/ + +B ::= B " " B "\n" + +B ::= "auth" | "pass" | "soap" | + "mode" | "user" | "date" | + "edit" | "hist" + +B ::= /'[^']*'/ # single-quoted string + | /"[^"]*"/ # double-quoted string + | /[^\n]+/ + +Example: + + auth as-john.doe + pass mysecret + soap http://as.example.com/soap + mode commit + user jd #if ommited, ${LOGNAME} is used + date 20021024 #if ommited, local time is used + edit /usr/bin/vi + hist 9 #number of historic files being kept + +=head2 ${HOME}/.as/lock + +The lock file contains the dezimal number listing the PID of the process +that created the lock. + +B ::= B B + +B ::= /^%!AS-LOCK-[0-9]\.[0-9]$/ + +B ::= [0-9]+ + +=head2 ${HOME}/.as/serial + +The serial file contains a dezimal number which is used and incremented +when creating UUIDs. + +B ::= B B + +B ::= /^%!AS-SERIAL-[0-9]\.[0-9]$/ + +B ::= [0-9]+ + +=head2 ${HOME}/.as/events + +The events file contains the records of all events collected over time +and not yet locked in the central database. + +B ::= B B* + +B ::= /^%!AS-EVENTS-[0-9]\.[0-9]$/ + +B ::= B B B B + B B B B + B [B] [# B] + +B ::= [a-zA-Z][a-zA-Z0-9]* + +B ::= B{8} ( /-/ B{4} ){3} /-/ B{12} + +B ::= B{8} + +B ::= [0-9]{1,5} + +B ::= [2-9][0-9]{3}([0][1-9]|[1][0-2])([0][1-9]|[12][0-9]|[3][01]) + +B ::= B<24h-clock-time> + +B ::= B<24h-clock-time> + +B ::= B<24h-clock-time> + +B ::= (\/[-a-zA-Z0-9]+)+ + || (\.[-a-zA-Z0-9]+)+ + +B ::= .* + +B ::= .* + +B ::= [0-9a-fA-F] + +=head2 ${HOME}/.as/accounts + +The accounts file contains the records of all accounts the user has +write access to. + +B ::= B B* + +B ::= /^%!AS-ACCOUNTS-[0-9]\.[0-9]$/ + +B ::= B B B + +B ::= Bbstract|Beal + +B ::= /sample-org/dep/vacation + +B ::= "approved absence, i.e. holiday" + +=back + +=head1 SHELL INTEGRATION + +If you are using B you can optionally use + + . $HOME/.as/bashrc + +in your C<$HOME/.bashrc> to get convinient command-line argument +completion for the B command. With this feature enabled, pressing +B when entering the I, I and I +arguments allows you to quickly complete the argument and convert it +into a canonical format. + +=head1 EXAMPLE + + $ as --setup + User foo + Pass bar + SOAP https://as.is.eu.cw.com/soap + Mode commit + $ as --update + + $ as 1:30 is/dev/meeting/weekly + $ as 1/2 is/dev/prj/as/dev + $ as -l + $ as -c + +=head1 SEE ALSO + +B (AS) +https://as.is.eu.cw.com/ + +=head1 HISTORY + +The B (AS) was designed and implemented by the +I of the I division at I between September 2002 and December 2002. + +=head1 AUTHORS + +Ralf S. Engelschall Erse@engelschall.comE + +Thomas Lotterer Ethomas@lotterer.netE + +=cut +