25 #include <tdecmdlineargs.h> 26 #include <tdeaboutdata.h> 27 #include <tdelocale.h> 32 #define PROGRAM_NAME "kalarm" 34 static TDECmdLineOptions options[] = 37 { "ack-confirm", I18N_NOOP( "Prompt for confirmation when alarm is acknowledged"), 0 }, 39 { "attach <url>", I18N_NOOP( "Attach file to email (repeat as needed)"), 0 }, 40 { "auto-close", I18N_NOOP( "Auto-close alarm window after --late-cancel period"), 0 }, 41 { "bcc", I18N_NOOP( "Blind copy email to self"), 0 }, 43 { "beep", I18N_NOOP( "Beep when message is displayed"), 0 }, 46 { "color <color>", I18N_NOOP( "Message background color (name or hex 0xRRGGBB)"), 0 }, 49 { "colorfg <color>", I18N_NOOP( "Message foreground color (name or hex 0xRRGGBB)"), 0 }, 50 { "calendarURL <url>", I18N_NOOP( "URL of calendar file"), 0 }, 51 { "cancelEvent <eventID>", I18N_NOOP( "Cancel alarm with the specified event ID"), 0 }, 53 { "disable", I18N_NOOP( "Disable the alarm"), 0 }, 55 { "!exec <commandline>", I18N_NOOP( "Execute a shell command line"), 0 }, 56 { "edit <eventID>", I18N_NOOP( "Display the alarm edit dialog to edit the specified alarm"), 0 }, 58 { "edit-new", I18N_NOOP( "Display the alarm edit dialog to edit a new alarm"), 0 }, 59 { "edit-new-preset <templateName>", I18N_NOOP( "Display the alarm edit dialog, preset with a template"), 0 }, 61 { "file <url>", I18N_NOOP( "File to display"), 0 }, 63 { "from-id <ID>", I18N_NOOP( "KMail identity to use as sender of email"), 0 }, 64 { "handleEvent <eventID>", I18N_NOOP( "Trigger or cancel alarm with the specified event ID"), 0 }, 66 { "interval <period>", I18N_NOOP( "Interval between alarm repetitions"), 0 }, 68 { "korganizer", I18N_NOOP( "Show alarm as an event in KOrganizer"), 0 }, 70 { "late-cancel <period>", I18N_NOOP( "Cancel alarm if more than 'period' late when triggered"), "1" }, 72 { "login", I18N_NOOP( "Repeat alarm at every login"), 0 }, 74 { "mail <address>", I18N_NOOP( "Send an email to the given address (repeat as needed)"), 0 }, 76 { "play <url>", I18N_NOOP( "Audio file to play once"), 0 }, 79 { "play-repeat <url>", I18N_NOOP( "Audio file to play repeatedly"), 0 }, 81 { "recurrence <spec>", I18N_NOOP( "Specify alarm recurrence using iCalendar syntax"), 0 }, 83 { "reminder <period>", I18N_NOOP( "Display reminder in advance of alarm"), 0 }, 84 { "reminder-once <period>", I18N_NOOP( "Display reminder once, before first alarm recurrence"), 0 }, 86 { "repeat <count>", I18N_NOOP( "Number of times to repeat alarm (including initial occasion)"), 0 }, 87 { "reset", I18N_NOOP( "Reset the alarm scheduling daemon"), 0 }, 89 { "speak", I18N_NOOP( "Speak the message when it is displayed"), 0 }, 90 { "stop", I18N_NOOP( "Stop the alarm scheduling daemon"), 0 }, 92 { "subject", I18N_NOOP( "Email subject line"), 0 }, 94 { "time <time>", I18N_NOOP( "Trigger alarm at time [[[yyyy-]mm-]dd-]hh:mm, or date yyyy-mm-dd"), 0 }, 95 { "tray", I18N_NOOP( "Display system tray icon"), 0 }, 96 { "triggerEvent <eventID>", I18N_NOOP( "Trigger alarm with the specified event ID"), 0 }, 98 { "until <time>", I18N_NOOP( "Repeat until time [[[yyyy-]mm-]dd-]hh:mm, or date yyyy-mm-dd"), 0 }, 101 { "volume <percent>", I18N_NOOP( "Volume to play audio file"), 0 }, 103 { "+[message]", I18N_NOOP( "Message text to display"), 0 }, 108 int main( int argc, char *argv[]) 110 TDEAboutData aboutData(PROGRAM_NAME, I18N_NOOP( "KAlarm"), KALARM_VERSION, 111 I18N_NOOP( "Personal alarm message, command and email scheduler for TDE"), 112 TDEAboutData::License_GPL, 113 "Copyright 2001-2007, David Jarvie", 0, "http://www.astrojar.org.uk/kalarm"); 114 aboutData.addAuthor( "David Jarvie", 0, "software@astrojar.org.uk"); 116 TDECmdLineArgs::init(argc, argv, &aboutData); 117 TDECmdLineArgs::addCmdLineOptions(options); 118 KUniqueApplication::addCmdLineOptions(); 120 if (!KAlarmApp::start()) 128 KAlarmApp* app = KAlarmApp::getInstance(); 129 app->restoreSession(); the KAlarm application object
|