static int debug;
+static int verbose;
enum host {
HOST_TWITTER = 0,
fprintf(stdout, " --page PAGENUMBER\n");
fprintf(stdout, " --bash\n");
fprintf(stdout, " --debug\n");
+ fprintf(stdout, " --verbose\n");
fprintf(stdout, " --dry-run\n");
fprintf(stdout, " --version\n");
fprintf(stdout, " --help\n");
}
if (user && text && created) {
- printf("[%s] (%.16s) %s\n",
- user, created, text);
+ if (verbose)
+ printf("[%s] (%.16s) %s\n",
+ user, created, text);
+ else
+ printf("[%s] %s\n",
+ user, text);
xmlFree(user);
xmlFree(text);
xmlFree(created);
!strncasecmp(c, "yes", 3))
shrink_urls = 1;
}
+ else if (!strncasecmp(c, "verbose", 7) &&
+ (c[7] == '=')) {
+ c += 8;
+ if (!strncasecmp(c, "true", 4) ||
+ !strncasecmp(c, "yes", 3))
+ verbose = 1;
+ }
} while (!feof(config_file));
if (password)
{
static const struct option options[] = {
{ "debug", 0, NULL, 'd' },
+ { "verbose", 0, NULL, 'V' },
{ "account", 1, NULL, 'a' },
{ "password", 1, NULL, 'p' },
{ "host", 1, NULL, 'H' },
int page_nr;
debug = 0;
+ verbose = 0;
rl_bind_key('\t', rl_insert);
session = session_alloc();
parse_configfile(session);
while (1) {
- option = getopt_long_only(argc, argv, "dqe:p:P:H:a:A:u:hg:sn",
+ option = getopt_long_only(argc, argv, "dp:P:H:a:A:u:hg:snVv",
options, NULL);
if (option == -1)
break;
case 'd':
debug = 1;
break;
+ case 'V':
+ verbose = 1;
+ break;
case 'a':
if (session->account)
free(session->account);