Diff
Not logged in

Differences From:

File src/wiki.c part of check-in [5fb1152dab] - added command: wiki list by stephan on 2008-05-14 19:51:18. [view]

To:

File src/wiki.c part of check-in [87a1a31d1d] - removed 2 remaining debug lines. Cleaned up help text. by stephan on 2008-05-14 20:02:10. [view]

@@ -607,14 +607,26 @@
 
 /*
 ** COMMAND: wiki
 **
-** Usage: %fossil wiki (export|import) EntryName
+** Usage: %fossil wiki (export|import|list) WikiName
+**
+** Run various subcommands to fetch wiki entries.
+**
+**     %fossil wiki export WikiName
+**
+**         Sends the latest version of the WikiName wiki
+**         entry to stdout.
+**
+**     %fossil wiki list
+**
+**         Lists all wiki entries, one per line.
 **
 **
-** TODOS:
+** TODOs:
 **
-** export WikiName ?UUID? ?-f outfile?
+**     %fossil export WikiName ?UUID? ?-f outfile?
+**     %fossil import WikiName ?-f infile?
 */
 void wiki_cmd(void){
   int n;
   db_find_and_open_repository(1);
@@ -642,9 +654,8 @@
     sql = mprintf("select x.rid from tag t, tagxref x "
           "where x.tagid=t.tagid and t.tagname='wiki-%q' "
       " order by x.mtime desc limit 1",
       wname );
-    printf("SQL=%s\n",sql);
     db_prepare(&q, "%z", sql );
     while( db_step(&q) == SQLITE_ROW ){
       rid = db_column_int(&q,0);
       break;
@@ -653,9 +664,8 @@
     if( -1 == rid ){
       fprintf(stderr,"export error: wiki entry [%s] not found.\n",wname);
       exit(1);
     }
-    fprintf(stderr,"export rid==%d\n", rid );
     if( ! content_get(rid,&buf) ){
       fprintf(stderr,"export error: content_get(%d) returned 0\n", rid );
       exit(1);
     }else