Next: , Previous: , Up: Resource file   [Contents][Index]


5.1.5 %?… Special Texts

The text part of a resource file line may be provided with different special texts which may occur in any53 number and order. All these texts start with a ‘%’ (percent) character which may be protected by a leading ‘\’ (backslash) character if the ‘%’ (percent) character itself is wanted to be used in the text part, e.g. ‘\%’. The ‘%’ character is mostly trailed by an optional format instruction, (see Format Instruction, for the detailed description of the format instruction and its components), and then trailed by a distinguishing mark —which defines the kind of the special text to be used— and if it is a letter, Gcal accepts it case-sensitive.

The purpose of these special texts is mainly to suppress output of fixed dates in definite cases, either, or to provide them with particular texts respectively to start external commands. See Description of all %?… Special Texts, for a complete description of all usable special texts, and Summary of all %?… Special Texts, for an according short-list of them.

For example, the resource file speci-1.rc

$ cat speci-1.rc
-| ; I'm veracious very special :)
-| ;
-| 0 1. Today is %>1u*K , %>02&*D  %U  %Y !
-| 0 2. It's the %>03&*N  day of the year.
-| 0 3. The actual week number is: %k .
-| 0 4. Currently, it's %t*  o'clock, Mr. %-USER .
-| 0 5. Hurry up with your work~\
-|    by reason sunrise is at %o+5158+00738+61,2: .

is displayed as follows (in case today’s date is the 4th October 1996):

$ gcal --resource-file=speci-1.rc -H no -ox
-|
-| Mon, Oct   4th 1999: 1. Today is MONDAY, 04th October 1999!
-|                      2. It's the 277th day of the year.
-|                      3. The actual week number is: 40.
-|                      4. Currently, it's 06:53pm o'clock, Mr. esken.
-|                      5. Hurry up with your work
-|                         by reason sunrise is at 07:33.

Next: , Previous: , Up: Resource file   [Contents][Index]