/* * main.cpp * Program: kalarm * Copyright © 2001-2012 by David Jarvie * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kalarm.h" #include "kalarmapp.h" #include #include #include #include #include #include #define PROGRAM_NAME "kalarm" int main(int argc, char *argv[]) { KAboutData aboutData(PROGRAM_NAME, 0, ki18n("KAlarm"), KALARM_VERSION, ki18n("Personal alarm message, command and email scheduler for KDE"), KAboutData::License_GPL, ki18n("Copyright 2001-2014, David Jarvie"), KLocalizedString(), "http://www.astrojar.org.uk/kalarm"); aboutData.addAuthor(ki18n("David Jarvie"), KLocalizedString(), "djarvie@kde.org"); aboutData.setOrganizationDomain("kde.org"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions options; options.add("a"); options.add("ack-confirm", ki18n("Prompt for confirmation when alarm is acknowledged")); options.add("A"); options.add("attach ", ki18n("Attach file to email (repeat as needed)")); options.add("auto-close", ki18n("Auto-close alarm window after --late-cancel period")); options.add("bcc", ki18n("Blind copy email to self")); options.add("b"); options.add("beep", ki18n("Beep when message is displayed")); options.add("colour"); options.add("c"); options.add("color ", ki18n("Message background color (name or hex 0xRRGGBB)")); options.add("colourfg"); options.add("C"); options.add("colorfg ", ki18n("Message foreground color (name or hex 0xRRGGBB)")); options.add("cancelEvent ", ki18n("Cancel alarm with the specified event ID")); options.add("d"); options.add("disable", ki18n("Disable the alarm")); options.add("disable-all", ki18n("Disable monitoring of all alarms")); options.add("e"); options.add("!exec ", ki18n("Execute a shell command line")); options.add("E"); options.add("!exec-display ", ki18n("Command line to generate alarm message text")); options.add("edit ", ki18n("Display the alarm edit dialog to edit the specified alarm")); options.add("edit-new-display", ki18n("Display the alarm edit dialog to edit a new display alarm")); options.add("edit-new-command", ki18n("Display the alarm edit dialog to edit a new command alarm")); options.add("edit-new-email", ki18n("Display the alarm edit dialog to edit a new email alarm")); options.add("edit-new-audio", ki18n("Display the alarm edit dialog to edit a new audio alarm")); options.add("edit-new-preset ", ki18n("Display the alarm edit dialog, preset with a template")); options.add("f"); options.add("file ", ki18n("File to display")); options.add("F"); options.add("from-id ", ki18n("KMail identity to use as sender of email")); options.add("i"); options.add("interval ", ki18n("Interval between alarm repetitions")); options.add("k"); options.add("korganizer", ki18n("Show alarm as an event in KOrganizer")); options.add("l"); options.add("late-cancel ", ki18n("Cancel alarm if more than 'period' late when triggered"), "1"); options.add("list", ki18n("Output list of scheduled alarms to stdout")); options.add("L"); options.add("login", ki18n("Repeat alarm at every login")); options.add("m"); options.add("mail
", ki18n("Send an email to the given address (repeat as needed)")); options.add("p"); options.add("play ", ki18n("Audio file to play once")); options.add("P"); options.add("play-repeat ", ki18n("Audio file to play repeatedly")); options.add("recurrence ", ki18n("Specify alarm recurrence using iCalendar syntax")); options.add("R"); options.add("reminder ", ki18n("Display reminder before or after alarm")); options.add("reminder-once ", ki18n("Display reminder once, before or after first alarm recurrence")); options.add("r"); options.add("repeat ", ki18n("Number of times to repeat alarm (including initial occasion)")); options.add("s"); options.add("speak", ki18n("Speak the message when it is displayed")); options.add("S"); options.add("subject ", ki18n("Email subject line")); #ifndef NDEBUG options.add("test-set-time