ede/ede-tip/doc/ede-tip.txt

123 lines
3.3 KiB
Plaintext

ede-tip documentation
=====================
ede-tip is 'Tip of the Day' program which will show tips about EDE usage.
It is also capable to show fortune-like tips, reading fortune files.
image:images/ede-tip.jpg[ede-tip]
Details
-------
ede-tip will be usually invoked when EDE is started, and if you don't want
this, you can always uncheck 'Show tips at startup' checkbox.
ede-tip will read tips from fortune-like file, which is based on two parts:
* file with tips
* a companion with *.dat* extension
File with tips is plain text file in human readable form and is main source where
you should add, changed and delete tips. Each tip is separated with *%* character
at the beginning of the line, and (as advice), those should be nicely formatted
(proposal is to use around 66 characters per line so they can nicely fit inside
ede-tip window).
*.dat* file is binary file and does not contain any tip strings; it have only
offsets to those in plain text file to allow fast random access to any of
specific tip string. *.dat* files are created with 'ede-tip-compiler' command (see bellow
for the details), and must be updated each time when a source file with tips is updated.
[NOTE]
Both files must exists so ede-tip can read the content.
Example
-------
Let we as example create simple tip file, named 'demo' with some content.
--------------
This is tip one.
%
This is tip two. Nice.
%
This is tip three. Progress, man, progress :)
%
--------------
[NOTE]
Please let end line in each tip contains *%* character. With this we retain a small
compatibility with fortune
Now save this file in 'demo' and invoke 'ede-tip-compiler' on it. Doing that is like:
--------------
ede-tip-compiler demo
--------------
You will see output like this:
--------------
"demo.dat" created
There were 3 strings
Longest string: 46 bytes
Shortest string: 17 bytes
--------------
Output from 'ede-tip-compiler' shows some informations you probably don't need and, most important,
it shows that he created *demo.dat* file. If you want to suppress these outputs, just
use '-s' flag, like:
--------------
ede-tip-compiler -s demo
--------------
'ede-tip-compiler' will, by default, use input name and append *.dat* suffix; the best way is to keep
it like that since ede-tip expects names of tip file and .dat file are the same (or will not be able
to find .dat file). 'ede-tip-compiler' have some more options, and for the details see below.
Configuration
-------------
ede-tip does not have command options and the only file it reads (beside tip files) is 'ede-tip.conf'.
This file should contain path to the tip file name. Here is the sample:
--------------
[etip]
Path = /usr/share/ede/tips/ede
--------------
[NOTE]
Make sure in the same directory exists *.dat* file.
ede-tip-compiler details
------------------------
As you could see from the previous text, 'ede-tip-compiler' is simple command line tool that will
create .dat files. It will correctly scan tip file, calculate offsets (and something more) and spit
that in the file that ede-tip understands.
[NOTE]
You must invoke ede-tip-compiler each time you change file with the tips or .dat companion will contains
incorrect data.
ede-tip-compiler options
------------------------
-s::
Suppress output details
-c [char]::
See [char] as delimiter
-i::
Ignore case in ordering
-o::
Order strings
-r::
Randomize pointers
-x::
Set rotated bit