1 /* autogenerated by gen.pl */
4 #define LOGJAM_SHORT_OPTIONS "+vqu:p:a:f:eh"
5 #define LOGJAM_LONG_OPTIONS { \
6 { "version", no_argument, 0, 'v' }, \
7 { "quiet", no_argument, 0, 'q' }, \
8 { "username", required_argument, 0, 'u' }, \
9 { "password", required_argument, 0, 'p' }, \
10 { "postas", required_argument, 0, 'a' }, \
11 { "file", required_argument, 0, 'f' }, \
12 { "edit", no_argument, 0, 'e' }, \
13 { "help", no_argument, 0, 'h' }, \
14 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
17 #define LOGJAM_SUBCOMMANDS { \
18 { "checkfriends", _("Efficiently check friends list for updates."), TRUE, FALSE, TRUE, do_checkfriends }, \
19 { "console", _("Run a command on the LiveJournal console."), TRUE, FALSE, TRUE, do_console }, \
20 { "post", _("Post event immediately."), TRUE, FALSE, TRUE, do_post }, \
21 { "offline", _("Manage offline copies of your journal."), TRUE, TRUE, FALSE, do_offline }, \
22 { "user", _("Manage user list."), FALSE, FALSE, FALSE, do_user }, \
25 #define LOGJAM_HELP_TEXT \
27 " -v, --version Show version of program.\n" \
28 " -q, --quiet Say less.\n" \
30 " -u, --username Username to operate as.\n" \
31 " -p, --password Password for the current user.\n" \
32 " -a, --postas User/community to post as.\n" \
34 " -f, --file File to load.\n" \
35 " -e, --edit Use default editor to edit post.\n"
39 #define CHECKFRIENDS_SHORT_OPTIONS "+h"
40 #define CHECKFRIENDS_LONG_OPTIONS { \
41 { "help", no_argument, 0, 'h' }, \
42 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
45 #define CHECKFRIENDS_SUBCOMMANDS { \
46 { "purge", _("Reset checkfriends information."), TRUE, FALSE, FALSE, do_checkfriends_purge }, \
49 #define CHECKFRIENDS_HELP_TEXT \
50 "Monitors your friends page for updates. Running this is faster and more\n" \
51 "efficient than loading the whole friends page itself.\n"
54 /* checkfriends_purge */
55 #define CHECKFRIENDS_PURGE_SHORT_OPTIONS "+h"
56 #define CHECKFRIENDS_PURGE_LONG_OPTIONS { \
57 { "help", no_argument, 0, 'h' }, \
58 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
61 #define CHECKFRIENDS_PURGE_SUBCOMMANDS { \
64 #define CHECKFRIENDS_PURGE_HELP_TEXT \
65 "Reset checkfriends information.\n"
66 /* checkfriends_purge */
69 #define CONSOLE_SHORT_OPTIONS "+h"
70 #define CONSOLE_LONG_OPTIONS { \
71 { "help", no_argument, 0, 'h' }, \
72 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
75 #define CONSOLE_SUBCOMMANDS { \
78 #define CONSOLE_HELP_TEXT \
79 "Run a command on the LiveJournal console.\n"
83 #define POST_SHORT_OPTIONS "+s:k:eh"
84 #define POST_LONG_OPTIONS { \
85 { "subject", required_argument, 0, 's' }, \
86 { "userpic", required_argument, 0, 'k' }, \
87 { "edit", no_argument, 0, 'e' }, \
88 { "help", no_argument, 0, 'h' }, \
89 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
92 #define POST_SUBCOMMANDS { \
95 #define POST_HELP_TEXT \
96 "Post event immediately.\n" \
98 " -s, --subject Subject for the post.\n" \
99 " -k, --userpic Keyword for the user picture to use.\n" \
100 " -e, --edit Use default editor to edit post.\n"
104 #define OFFLINE_SHORT_OPTIONS "+h"
105 #define OFFLINE_LONG_OPTIONS { \
106 { "help", no_argument, 0, 'h' }, \
107 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
110 #define OFFLINE_SUBCOMMANDS { \
111 { "sync", _("Synchronize offline journal."), TRUE, FALSE, TRUE, do_offline_sync }, \
112 { "cat", _("Show entries from local store."), TRUE, FALSE, FALSE, do_offline_cat }, \
113 { "grep", _("Find entries by regexp."), TRUE, FALSE, FALSE, do_offline_grep }, \
114 { "summary", _("Show a summary of an offline store."), TRUE, FALSE, FALSE, do_offline_summary }, \
115 { "reindex", _("Rebuild the index an offline store."), TRUE, FALSE, FALSE, do_offline_reindex }, \
118 #define OFFLINE_HELP_TEXT \
119 "Manage offline copies of your journal.\n"
123 #define OFFLINE_SYNC_SHORT_OPTIONS "+h"
124 #define OFFLINE_SYNC_LONG_OPTIONS { \
125 { "help", no_argument, 0, 'h' }, \
126 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
129 #define OFFLINE_SYNC_SUBCOMMANDS { \
132 #define OFFLINE_SYNC_HELP_TEXT \
133 "Synchronize offline journal.\n"
137 #define OFFLINE_CAT_SHORT_OPTIONS "+txh"
138 #define OFFLINE_CAT_LONG_OPTIONS { \
139 { "desc", no_argument, 0, 't' }, \
140 { "xml", no_argument, 0, 'x' }, \
141 { "help", no_argument, 0, 'h' }, \
142 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
145 #define OFFLINE_CAT_SUBCOMMANDS { \
148 #define OFFLINE_CAT_HELP_TEXT \
149 "Show entries in local store. Specify entries by itemid or use the\n" \
150 "'latest' token to signify the latest message.\n" \
152 "Example: logjam sync ; logjam cat latest\n" \
155 " -t, --desc Output entries in text format.\n" \
156 " -x, --xml Output entries in XML format.\n"
160 #define OFFLINE_GREP_SHORT_OPTIONS "+txieh"
161 #define OFFLINE_GREP_LONG_OPTIONS { \
162 { "text", no_argument, 0, 't' }, \
163 { "xml", no_argument, 0, 'x' }, \
164 { "ignorecase", no_argument, 0, 'i' }, \
165 { "extended", no_argument, 0, 'e' }, \
166 { "help", no_argument, 0, 'h' }, \
167 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
170 #define OFFLINE_GREP_SUBCOMMANDS { \
173 #define OFFLINE_GREP_HELP_TEXT \
174 "Find entries by regexp.\n" \
176 " -t, --text Output entries in text format.\n" \
177 " -x, --xml Output entries in XML format.\n" \
178 " -i, --ignorecase Ignore case in searches.\n" \
179 " -e, --extended Use Extended Regular Expression syntax.\n"
182 /* offline_summary */
183 #define OFFLINE_SUMMARY_SHORT_OPTIONS "+h"
184 #define OFFLINE_SUMMARY_LONG_OPTIONS { \
185 { "help", no_argument, 0, 'h' }, \
186 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
189 #define OFFLINE_SUMMARY_SUBCOMMANDS { \
192 #define OFFLINE_SUMMARY_HELP_TEXT \
193 "Show a summary of an offline store.\n"
194 /* offline_summary */
196 /* offline_reindex */
197 #define OFFLINE_REINDEX_SHORT_OPTIONS "+h"
198 #define OFFLINE_REINDEX_LONG_OPTIONS { \
199 { "help", no_argument, 0, 'h' }, \
200 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
203 #define OFFLINE_REINDEX_SUBCOMMANDS { \
206 #define OFFLINE_REINDEX_HELP_TEXT \
207 "Rebuild the index an offline store.\n"
208 /* offline_reindex */
211 #define USER_SHORT_OPTIONS "+h"
212 #define USER_LONG_OPTIONS { \
213 { "help", no_argument, 0, 'h' }, \
214 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
217 #define USER_SUBCOMMANDS { \
218 { "add", _("Add a user to the user list."), FALSE, FALSE, FALSE, do_user_add }, \
221 #define USER_HELP_TEXT \
222 "Manage user list.\n"
226 #define USER_ADD_SHORT_OPTIONS "+ph"
227 #define USER_ADD_LONG_OPTIONS { \
228 { "nopassword", no_argument, 0, 'p' }, \
229 { "help", no_argument, 0, 'h' }, \
230 { "list-subcommands", no_argument, 0, OPT_LIST_SUBCOMMANDS }, \
233 #define USER_ADD_SUBCOMMANDS { \
236 #define USER_ADD_HELP_TEXT \
237 "Add a user to LogJam's configured list.\n" \
238 "Usage: logjam user add USERNAME [PASSWORD]\n" \
242 " -p, --nopassword Don't save a password for this user.\n"