2008-09-22 18:16:50 +04:00
|
|
|
ede-tip documentation
|
|
|
|
=====================
|
2008-01-14 15:02:43 +03:00
|
|
|
|
2008-09-22 18:16:50 +04:00
|
|
|
ede-tip is 'Tip of the Day' program which will show tips about EDE usage.
|
2008-01-16 15:58:08 +03:00
|
|
|
It is also capable to show fortune-like tips, reading fortune files.
|
2008-01-14 15:02:43 +03:00
|
|
|
|
2008-09-22 17:58:31 +04:00
|
|
|
image:images/ede-tip.jpg[ede-tip]
|
2008-01-16 15:58:08 +03:00
|
|
|
|
|
|
|
Details
|
|
|
|
-------
|
|
|
|
|
2008-09-22 18:16:50 +04:00
|
|
|
ede-tip will be usually invoked when EDE is started, and if you don't want
|
2008-01-16 15:58:08 +03:00
|
|
|
this, you can always uncheck 'Show tips at startup' checkbox.
|
|
|
|
|
2008-09-22 18:16:50 +04:00
|
|
|
ede-tip will read tips from fortune-like file, which is based on two parts:
|
2008-01-16 15:58:08 +03:00
|
|
|
|
|
|
|
* 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
|
2008-09-22 17:58:31 +04:00
|
|
|
ede-tip window).
|
2008-01-16 15:58:08 +03:00
|
|
|
|
|
|
|
*.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
|
2008-09-22 17:58:31 +04:00
|
|
|
specific tip string. *.dat* files are created with 'ede-tip-compiler' command (see bellow
|
2008-01-16 15:58:08 +03:00
|
|
|
for the details), and must be updated each time when a source file with tips is updated.
|
|
|
|
|
|
|
|
[NOTE]
|
2008-09-22 17:58:31 +04:00
|
|
|
Both files must exists so ede-tip can read the content.
|
2008-01-16 15:58:08 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2008-09-22 17:58:31 +04:00
|
|
|
Now save this file in 'demo' and invoke 'ede-tip-compiler' on it. Doing that is like:
|
2008-01-16 15:58:08 +03:00
|
|
|
--------------
|
2008-09-22 17:58:31 +04:00
|
|
|
ede-tip-compiler demo
|
2008-01-16 15:58:08 +03:00
|
|
|
--------------
|
|
|
|
|
|
|
|
You will see output like this:
|
|
|
|
--------------
|
|
|
|
"demo.dat" created
|
|
|
|
There were 3 strings
|
|
|
|
Longest string: 46 bytes
|
|
|
|
Shortest string: 17 bytes
|
|
|
|
--------------
|
|
|
|
|
2008-09-22 17:58:31 +04:00
|
|
|
Output from 'ede-tip-compiler' shows some informations you probably don't need and, most important,
|
2008-01-16 15:58:08 +03:00
|
|
|
it shows that he created *demo.dat* file. If you want to suppress these outputs, just
|
|
|
|
use '-s' flag, like:
|
|
|
|
|
|
|
|
--------------
|
2008-09-22 17:58:31 +04:00
|
|
|
ede-tip-compiler -s demo
|
2008-01-16 15:58:08 +03:00
|
|
|
--------------
|
|
|
|
|
2008-09-22 17:58:31 +04:00
|
|
|
'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.
|
2008-01-16 15:58:08 +03:00
|
|
|
|
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
2008-09-22 18:16:50 +04:00
|
|
|
ede-tip does not have command options and the only file it reads (beside tip files) is 'ede-tip.conf'.
|
2008-01-16 15:58:08 +03:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
2008-09-22 17:58:31 +04:00
|
|
|
ede-tip-compiler details
|
|
|
|
------------------------
|
2008-01-16 15:58:08 +03:00
|
|
|
|
2008-09-22 17:58:31 +04:00
|
|
|
As you could see from the previous text, 'ede-tip-compiler' is simple command line tool that will
|
2008-01-16 15:58:08 +03:00
|
|
|
create .dat files. It will correctly scan tip file, calculate offsets (and something more) and spit
|
2008-09-22 17:58:31 +04:00
|
|
|
that in the file that ede-tip understands.
|
2008-01-16 15:58:08 +03:00
|
|
|
|
|
|
|
[NOTE]
|
2008-09-22 17:58:31 +04:00
|
|
|
You must invoke ede-tip-compiler each time you change file with the tips or .dat companion will contains
|
2008-01-16 15:58:08 +03:00
|
|
|
incorrect data.
|
|
|
|
|
2008-09-22 17:58:31 +04:00
|
|
|
ede-tip-compiler options
|
|
|
|
------------------------
|
2008-01-16 15:58:08 +03:00
|
|
|
|
|
|
|
-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
|