@@ -246,22 +246,25 @@ def help_commands_html(self, indent_re=indent_re):
246
246
"""
247
247
commands = sorted (iter (self .commands .values ()),
248
248
key = operator .attrgetter ('__name__' ))
249
+ print ("<table>" )
249
250
for command in commands :
250
251
h = _ (command .__doc__ ).split ('\n ' )
251
252
name = command .__name__ [3 :]
252
- usage = h [0 ]
253
+ usage = h [0 ]. replace ( '<' , '<' ). replace ( '>' , '>' )[ 7 :]
253
254
print ("""
254
255
<tr><td valign=top><strong>%(name)s</strong></td>
255
- <td><tt>%(usage)s</tt><p >
256
+ <td><tt>- %(usage)s</tt>
256
257
<pre>""" % locals ())
257
- indent = indent_re .match (h [3 ])
258
+ indent = indent_re .match (h [1 ])
258
259
if indent : indent = len (indent .group (1 )) # noqa: E701
259
- for line in h [3 :]:
260
+ for line in h [1 :]:
261
+ line = line .replace ('<' ,'<' ).replace ('>' ,'>' )
260
262
if indent :
261
263
print (line [indent :])
262
264
else :
263
265
print (line )
264
266
print ('</pre></td></tr>\n ' )
267
+ print ("</table>" )
265
268
266
269
def help_all (self ):
267
270
print (_ ("""
@@ -540,7 +543,6 @@ def do_create(self, args):
540
543
541
544
def do_display (self , args ):
542
545
'' """Usage: display designator[,designator]*
543
-
544
546
Show the property values for the given node(s).
545
547
546
548
A designator is a classname and a nodeid concatenated,
@@ -585,16 +587,19 @@ def do_display(self, args):
585
587
586
588
def do_export (self , args , export_files = True ):
587
589
'' """Usage: export [[-]class[,class]] export_dir
588
- Export the database to colon-separated-value files.
590
+ Export the database and file content.
591
+
592
+ Database content is exported to colon separated files.
589
593
To exclude the files (e.g. for the msg or file class),
590
594
use the exporttables command.
591
595
592
596
Optionally limit the export to just the named classes
593
- or exclude the named classes, if the 1st argument starts with '-'.
597
+ or exclude the named classes, if the 1st argument
598
+ starts with '-'.
594
599
595
600
This action exports the current data from the database into
596
601
colon-separated-value files that are placed in the nominated
597
- destination directory.
602
+ export_dir directory.
598
603
"""
599
604
# grab the directory to export to
600
605
if len (args ) < 1 :
@@ -697,15 +702,19 @@ class colon_separated(csv.excel):
697
702
698
703
def do_exporttables (self , args ):
699
704
'' """Usage: exporttables [[-]class[,class]] export_dir
700
- Export the database to colon-separated-value files, excluding the
701
- files below $TRACKER_HOME/db/files/ (which can be archived separately).
705
+ Export only the database to files, no file content.
706
+
707
+ Database content is exported to colon separated files.
708
+ The files below $TRACKER_HOME/db/files/ (which can be
709
+ archived separately) are not part of the export.
702
710
To include the files, use the export command.
703
711
704
712
Optionally limit the export to just the named classes
705
- or exclude the named classes, if the 1st argument starts with '-'.
713
+ or exclude the named classes, if the 1st argument
714
+ starts with '-'.
706
715
707
716
This action exports the current data from the database into
708
- colon-separated-value files that are placed in the nominated
717
+ colon-separated-value files that are placed in the export_dir
709
718
destination directory.
710
719
"""
711
720
return self .do_export (args , export_files = False )
@@ -835,9 +844,8 @@ def do_find(self, args):
835
844
return 0
836
845
837
846
def do_genconfig (self , args , update = False ):
838
- '' """Usage: genconfig <filename>
839
- Generate a new tracker config file (ini style) with default
840
- values in <filename>.
847
+ '' """Usage: genconfig filename
848
+ Create a new tracker config file with default values in filename.
841
849
"""
842
850
if len (args ) < 1 :
843
851
raise UsageError (_ ('Not enough arguments supplied' ))
@@ -1185,9 +1193,10 @@ def make_readable(hist):
1185
1193
1186
1194
def do_import (self , args , import_files = True ):
1187
1195
'' """Usage: import import_dir
1188
- Import a database from the directory containing CSV files,
1189
- two per class to import.
1196
+ Import a database and file contents from the directory.
1190
1197
1198
+ The directory should have the same format as one containing
1199
+ the output of export. There are two files imported per class.
1191
1200
The files used in the import are:
1192
1201
1193
1202
<class>.csv
@@ -1276,8 +1285,9 @@ class colon_separated(csv.excel):
1276
1285
1277
1286
def do_importtables (self , args ):
1278
1287
'' """Usage: importtables export_dir
1279
-
1280
1288
This imports the database tables exported using exporttables.
1289
+
1290
+ It does not import the content of files like msgs and files.
1281
1291
"""
1282
1292
return self .do_import (args , import_files = False )
1283
1293
@@ -1523,7 +1533,6 @@ def do_list(self, args):
1523
1533
1524
1534
def do_migrate (self , args ): # noqa: ARG002 - args unused
1525
1535
'' """Usage: migrate
1526
-
1527
1536
Update a tracker's database to be compatible with the Roundup
1528
1537
codebase.
1529
1538
@@ -1553,9 +1562,7 @@ def do_migrate(self, args): # noqa: ARG002 - args unused
1553
1562
1554
1563
def do_pack (self , args ):
1555
1564
'' """Usage: pack period | date
1556
-
1557
- Remove journal entries older than a period of time specified or
1558
- before a certain date.
1565
+ Remove journal entries older than the date/period.
1559
1566
1560
1567
A period is specified using the suffixes "y", "m", and "d". The
1561
1568
suffix "w" (for "week") means 7 days.
@@ -1592,8 +1599,9 @@ def do_pack(self, args):
1592
1599
1593
1600
def do_perftest (self , args ):
1594
1601
'' """Usage: perftest [mode] [arguments]*
1602
+ Time operations in Roundup.
1595
1603
1596
- Time operations in Roundup. Supported arguments:
1604
+ Supported arguments:
1597
1605
1598
1606
[password] [rounds=<integer>] [scheme=<scheme>]
1599
1607
@@ -1665,7 +1673,9 @@ def do_perftest(self, args):
1665
1673
1666
1674
def do_pragma (self , args ):
1667
1675
'' """Usage: pragma setting=value | 'list'
1668
- Set internal admin settings to a value. E.G.
1676
+ Set internal admin settings to a value.
1677
+
1678
+ For example:
1669
1679
1670
1680
pragma verbose=True
1671
1681
pragma verbose=yes
@@ -1877,13 +1887,13 @@ def do_rollback(self, args): # noqa: ARG002 - args unused
1877
1887
1878
1888
def do_security (self , args ):
1879
1889
'' """Usage: security [Role name]
1890
+ Display the Permissions available to one or all Roles.
1880
1891
1881
- Display the Permissions available to one or all Roles.
1882
- Also validates that any properties defined in a
1883
- permission are valid.
1892
+ Also validates that any properties defined in a
1893
+ permission are valid.
1884
1894
1885
- Run this after changing your permissions to catch
1886
- typos.
1895
+ Run this after changing your permissions to catch
1896
+ typos.
1887
1897
"""
1888
1898
if len (args ) == 1 :
1889
1899
role = args [0 ]
@@ -2167,9 +2177,10 @@ def do_templates(self, args):
2167
2177
2168
2178
def do_updateconfig (self , args ):
2169
2179
'' """Usage: updateconfig <filename>
2170
- Generate an updated tracker config file (ini style) in
2171
- <filename>. Use current settings from existing roundup
2172
- tracker in tracker home.
2180
+ Merge existing tracker config with new settings.
2181
+
2182
+ Output the updated config file to <filename>. Use current
2183
+ settings from existing roundup tracker in tracker home.
2173
2184
"""
2174
2185
self .do_genconfig (args , update = True )
2175
2186
0 commit comments