3 sfquery.py <filename> <query> <action>
4 <filename> is an XML dump of a SourceForge bug database.
5 <query> is a python command evaluating to 1 or 0.
6 <action> is a python command or commands to perform on each matched
7 object. Multiple command should be separated by the ';'
10 To search for field foo=bar, use the following query:
11 "artifact.get('foo') == 'bar'"
13 To search all field values for the string 'foobar', use the following query:
14 "contains(artifact,'foobar')"
16 The function "contains" will accept a regular expression as well as a
19 The most common actions are
20 "artifact.print_summary()"
22 "artifact.print_all()"
24 ===============================================================
27 Find all the bugs submitted by amundson and print summaries:
29 ./sfquery.py bugs-10-02-2003.xml\
30 "artifact.get('submitted_by') == 'amundson'"\
31 "artifact.print_summary()"
35 Total number of artifacts = 447
36 545221 : xmaxima calls "kill -1"
37 625439 : xmaxima can call "kill -1"
38 624940 : xmaxima-local is broken
39 566870 : plotting programs not found
40 549185 : Bugs were not copied to the mailing list
41 566883 : make distclean broken
42 552045 : strcat missing in mactex.lisp
43 624941 : maxima needs a -quiet option
44 545219 : configure does not accept full paths
45 596204 : Compiler warnings
46 571254 : subdirectories of share are not searched
47 566871 : files not installed
48 689792 : omplotdata and mgnuplot do not honor --with-wish
49 596202 : AUTHORS and ChangeLog are empty
50 530419 : zsolve exists only in documentation
51 573689 : genut package
52 689320 : patch for openmcl support
53 573692 : solver package
54 689794 : tests/Makefile.in uses ${INSTALL_PROGRAM} to install summari
55 689795 : texinfo fixes
58 ------------------------------------------------------------------
59 Find all the *open* bugs submitted by amundson and print summaries:
61 ./sfquery.py bugs-10-02-2003.xml\
62 "artifact.get('submitted_by')=='amundson' and artifact.get('status')=='Open'"\
63 "artifact.print_summary()"
67 Total number of artifacts = 447
68 624941 : maxima needs a -quiet option
69 596204 : Compiler warnings
70 689792 : omplotdata and mgnuplot do not honor --with-wish
71 573689 : genut package
72 573692 : solver package
73 689794 : tests/Makefile.in uses ${INSTALL_PROGRAM} to install summari
74 689795 : texinfo fixes
77 ------------------------------------------------------------------
78 Find a specific bug and print the full record:
80 ./sfquery.py bugs-10-02-2003.xml\
81 "artifact.get('artifact_id') == '596204'"\
82 "artifact.print_all()"
87 Total number of artifacts = 447
88 ==================== artifact ====================
90 submitted_by : amundson
92 artifact_group_id : None
93 summary : Compiler warnings
96 -------------------------------------------------
97 The Maxima build generates many compiler warnings for
98 alll lisps. They should be eliminated if at all possible.
101 -------------------------------------------------
104 open_date : Fri Aug 16 18:34:06 2002
107 ----------- histories -----------
108 ----------- messages -----------
109 --------------------------------
110 =================================================
113 ------------------------------------------------------------------
114 Find all bugs containing plot and print who submitted them and their status:
116 ./sfquery.py bugs-10-02-2003.xml\
117 "contains(artifact,'plot')"\
118 "sys.stdout.write('%s\n' % artifact.get('submitted_by'));sys.stdout.write('%s\n\n' % artifact.get('status'))"