COOL3S

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
INTERGRATION
SNIPPET FORMAT
AUTHOR
CREDITS
REPORTING BUGS
COPYRIGHT
SEE ALSO
NOTES
HISTORY

NAME

cool3s - smart snippet system (3S)

SYNOPSIS

cool3s [ options ]

DESCRIPTION

cool3s is a ’smart snippet system’ that was designed by me to have a snippet library available from the shell and thus in all applications that are able to communicate with the shell. A snippet is a reusable, or in this case also an on the spot generated, piece of text. Of course being written as Bash shell script it turned out to be multi functional and you may use it for able applications as well. Usage can be fairly simple to very complicated depending on what you want it to do. In the simplest scenario you just start it up and it will present you with a topic menu. After choosing a topic it will present you with a menu of snippets. After choosing you snippet it will then echo its content to stdout. Sophisticated scenarios involve random snippets, executable snippets, custom menu titles, menu skipping, selective content and building complete documents on the fly. cool3s is still under development and I have still lot’s of ideas to work out. As Bash isn’t disappearing in the foreseeable future I think cool3s is a powerful addition for anyone whooping up texts, including programmers.

OPTIONS

−a, −−add

Set output mode to append

−d, −−dir [path]

dir root of your snippets defaults to ~/.cool3s or if not present to /usr/local/lib/cool3s

−e

Execute snippet - this is a very powerful option that lets you execute the snippet and gain you input from its output. The -o option will be passed to the snippet and can be referenced by $1, should I add an option to add command-line parameters?

−h, −−help

Print an help text to stdout.

−o [stdout]

an optional file/dev name where output will be directed to. If no filename is given then stdout is assumed.

−q

Quiet mode, suppress banners on menu’s.

−r

Choose random snippet.

−−rms

Remove snippet. Great for todo and appointment lists etc.

−s [number]

A snippet number as would be shown in the snippet menu. In combination with -t you can now program macro’s to concatenate several snippets. Warning: the number of a snippet might change if you add too or remove from your topic library.

−-sline [linenumber]

A line number from where the file will be parsed. Defaults to 2.

−-sname [snippetname]

The name of a snippet to be fetched.

−t [topicname]

an optional topic if it compares to one of the topic dirs then the topic menu will not appear but you will be offered the snippet menu of the chosen topic.

−-title [linenumber]

The linenumber where to find a titleline in a file.

−v, −−version

version

INTERGRATION

Intergration is possible in several way’s, please have a look at the file USAGE in the distribution file.

SNIPPET FORMAT

A snippet is just a simple piece of plain text that you want to use over and over again. Store it as a simple plain text file, the content is up to you.

AUTHOR

Written by Raphael - raphael at oninet dot pt

CREDITS

Grigoriy Strokin (grg@philol.msu.ru) for writting the getoptx function, and placing it in public domain.

REPORTING BUGS

Please report bugs and or send fixes to raphael at oninet dot pt, be sure to ReadTheFineManual first.

COPYRIGHT

GNU PUBLIC LICENSE - see gpl.txt in distribution

SEE ALSO

bash(1), grep(1), cat(1)

NOTES

Please be aware that the program is under development and licensed under GPL. I cannot be hold responsible for any damage you as a user might contract by using cool3s. I simply try to aid to the community by developing it as good as I’m able. But being human I ashamedly admit I make mistakes and even worse I’m not perfect. Please forgive me.

HISTORY

Moved to HISTORY file in distribution.