diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 1 | ||||
-rw-r--r-- | tools/configure.ac | 4 | ||||
-rwxr-xr-x | tools/genuuid | 28 |
3 files changed, 31 insertions, 2 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 4605c4a2..5bb41cc0 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -119,6 +119,7 @@ pkginclude_HEADERS = \ src/query.h \ src/format.h \ src/option.h \ + src/series.h \ \ src/item.h \ src/post.h \ diff --git a/tools/configure.ac b/tools/configure.ac index c3a913e6..e078ebc4 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -66,7 +66,7 @@ AC_ARG_ENABLE(doxygen, AM_CONDITIONAL(USE_DOXYGEN, test x$doxygen = xtrue) AC_ARG_ENABLE(cache, - [ --enable-cache Enable use of the --cache option], + [ --enable-cache Enable use of the --cache option], [case "${enableval}" in yes) cache=true ;; no) cache=false ;; @@ -76,7 +76,7 @@ AC_ARG_ENABLE(cache, AM_CONDITIONAL(USE_CACHE_OPTION, test x$cache = xtrue) AC_ARG_ENABLE(python, - [ --enable-python Turn on Python support (experimental)], + [ --enable-python Turn on Python support (experimental)], [case "${enableval}" in yes) python=true ;; no) python=false ;; diff --git a/tools/genuuid b/tools/genuuid new file mode 100755 index 00000000..53fb7a0a --- /dev/null +++ b/tools/genuuid @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +import re +import sys + +def scan_path(path): + bug = uuid = None + with open(path, 'r') as fd: + for line in fd: + match = re.match('\*', line) + if match: + bug = uuid = None + + match = re.search('\[\[bug:([0-9]+)\]\[#[0-9]+\]\]', line) + if match: + bug = match.group(1) + elif bug: + match = re.search(':ID:\s+(.+?)\s*$', line) + if match: + uuid = match.group(1) + print "UPDATE bugs SET cf_uuid='%s' WHERE bug_id=%s;" % (uuid, bug) + +scan_path('/Users/johnw/src/ledger/plan/TODO') +scan_path('/Users/johnw/src/ledger/plan/TODO-3.0') +scan_path('/Users/johnw/src/ledger/plan/TODO-2.6.2') +scan_path('/Users/johnw/src/ledger/plan/TODO-2.6.1') + +### genuuid ends here |