|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 2349 (0x92d) Types: TextFile Names: »remind.macros«
└─⟦8648bda34⟧ Bits:30007244 EUUGD5_II: X11R5 └─⟦87c3ac0e0⟧ »./contrib-3/contrib-3.00« └─⟦de8ce1454⟧ └─⟦this⟧ »contrib/lib/iv/src/bin/alert/remind.macros«
#ifndef REMIND_MACROS #define REMIND_MACROS /* * a set of macros to aid in creating beautiful reminders with remind(1) * * some points to note - * * getting certain characters into the final output is hard - * instead, use the following substitutions * for ' use ▶01◀ ( character \001 ) * for ; use ▶02◀ ( character \002 ) * for \ use ▶03◀ ( character \003 ) * for newline use ; * * use DOSHOWTIME to incorporate the output of a command * executed at the time the reminder appears on the screen * use DOPOSTTIME for commands to be executed at the time * "remind" is run * * HEAD centers the text, and underlines it with **'s * COMMENT is useful for text that should not appear in the * reminder, but is needed to flag a time or date * PAD fills the remainder of the line with spaces, so that the * dialog will in fact be the right width - use it at least * once if using centered text * * NL causes a new line * RMARG, LMARG and MARGINS set the margin positions * * use ;; for a new paragraph */ /* some (nroff) formatting macros */ #define RMARG(r).ll r/**/m #define LMARG(l).in l #define MARGINS(l,r)LMARG(l);RMARG(r) #define NL .br #define LINES(count).br;.sp count #define LINE LINES(1) #define PAD \\l▶01◀|\\n(.lu\\ ▶01◀ #define RAGGED .na #define CENTRE .ad c #define FILL .ad b #define LEFT .ad l #define RIGHT .ad r #define COMMENT(text).\\" text " #define HEAD(text).ce;text;.ce;\\l▶01◀\\n(.nu\\&*▶01◀;PAD /* macros which will cause commands to be executed at various times */ #define date /bin/date #define awk /bin/awk #define cat /bin/cat #define DOPOSTTIME(command)'`command`' #define DOSHOWTIME(command)'"\'\`command\`\'"' #define DATE DOSHOWTIME((date | awk '{OFS=\"▶03◀ \";print \$1,\$2,\$3}')) #define TIME DOSHOWTIME((date | awk '{split(\$4,time,\":\");print time[1] \":\" time[2];}')) #define INCLUDE(name)DOSHOWTIME(cat name) /* these simplify regular postings */ #define DAILY(time)COMMENT(every day time) #define MONDAYS(time)COMMENT(every Mon time) #define TUESDAYS(time)COMMENT(every Tue time) #define WEDNESDAYS(time)COMMENT(every Wed time) #define THURSDAYS(time)COMMENT(every Thu time) #define FRIDAYS(time)COMMENT(every Fri time) #define SATURDAYS(time)COMMENT(every Sat time) #define SUNDAYS(time)COMMENT(every Sun time) #endif