Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Verbose mode shows status IDs

  • Loading branch information...
commit 40ccc8d509ab110222bebee5691f490fd82c014e 1 parent 61fb909
@theappleman theappleman authored
Showing with 10 additions and 5 deletions.
  1. +1 −1  bti.1
  2. +8 −3 bti.c
  3. +1 −1  bti.xml
View
2  bti.1
@@ -96,7 +96,7 @@ Performs all steps that would normally be done for a given action, but will not
.PP
\fB\-\-verbose\fR
.RS 4
-Verbose mode
+Verbose mode\&. Print status IDs and timestamps\&.
.RE
.PP
\fB\-\-bash\fR
View
11 bti.c
@@ -317,6 +317,7 @@ static void parse_statuses(xmlDocPtr doc, xmlNodePtr current)
xmlChar *text = NULL;
xmlChar *user = NULL;
xmlChar *created = NULL;
+ xmlChar *id = NULL;
xmlNodePtr userinfo;
current = current->xmlChildrenNode;
@@ -326,6 +327,8 @@ static void parse_statuses(xmlDocPtr doc, xmlNodePtr current)
created = xmlNodeListGetString(doc, current->xmlChildrenNode, 1);
if (!xmlStrcmp(current->name, (const xmlChar *)"text"))
text = xmlNodeListGetString(doc, current->xmlChildrenNode, 1);
+ if (!xmlStrcmp(current->name, (const xmlChar *)"id"))
+ id = xmlNodeListGetString(doc, current->xmlChildrenNode, 1);
if (!xmlStrcmp(current->name, (const xmlChar *)"user")) {
userinfo = current->xmlChildrenNode;
while (userinfo != NULL) {
@@ -338,19 +341,21 @@ static void parse_statuses(xmlDocPtr doc, xmlNodePtr current)
}
}
- if (user && text && created) {
+ if (user && text && created && id) {
if (verbose)
- printf("[%s] (%.16s) %s\n",
- user, created, text);
+ printf("[%s] {%s} (%.16s) %s\n",
+ user, id, created, text);
else
printf("[%s] %s\n",
user, text);
xmlFree(user);
xmlFree(text);
xmlFree(created);
+ xmlFree(id);
user = NULL;
text = NULL;
created = NULL;
+ id = NULL;
}
}
current = current->next;
View
2  bti.xml
@@ -183,7 +183,7 @@
<term><option>--verbose</option></term>
<listitem>
<para>
- Verbose mode
+ Verbose mode. Print status IDs and timestamps.
</para>
</listitem>
</varlistentry>
Please sign in to comment.
Something went wrong with that request. Please try again.