comparison roundup/admin.py @ 2215:19d1cd9ab09b

more doc
author Richard Jones <richard@users.sourceforge.net>
date Sat, 17 Apr 2004 01:47:37 +0000
parents 3f89c8ffe4f1
children f786a1b9dbdf ce7cfd3ac27b
comparison
equal deleted inserted replaced
2214:39ffc2a7d901 2215:19d1cd9ab09b
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: admin.py,v 1.67 2004-04-05 23:43:03 richard Exp $ 19 # $Id: admin.py,v 1.68 2004-04-17 01:47:37 richard Exp $
20 20
21 '''Administration commands for maintaining Roundup trackers. 21 '''Administration commands for maintaining Roundup trackers.
22 ''' 22 '''
23 __docformat__ = 'restructuredtext' 23 __docformat__ = 'restructuredtext'
24 24
1018 1018
1019 def do_export(self, args): 1019 def do_export(self, args):
1020 '''Usage: export [class[,class]] export_dir 1020 '''Usage: export [class[,class]] export_dir
1021 Export the database to colon-separated-value files. 1021 Export the database to colon-separated-value files.
1022 1022
1023 Optionally limit the export to just the names classes.
1024
1023 This action exports the current data from the database into 1025 This action exports the current data from the database into
1024 colon-separated-value files that are placed in the nominated 1026 colon-separated-value files that are placed in the nominated
1025 destination directory. The journals are not exported. 1027 destination directory.
1026 ''' 1028 '''
1027 # grab the directory to export to 1029 # grab the directory to export to
1028 if len(args) < 1: 1030 if len(args) < 1:
1029 raise UsageError, _('Not enough arguments supplied') 1031 raise UsageError, _('Not enough arguments supplied')
1030 if rcsv.error: 1032 if rcsv.error:
1066 jf.close() 1068 jf.close()
1067 return 0 1069 return 0
1068 1070
1069 def do_import(self, args): 1071 def do_import(self, args):
1070 '''Usage: import import_dir 1072 '''Usage: import import_dir
1071 Import a database from the directory containing CSV files, one per 1073 Import a database from the directory containing CSV files, two per
1072 class to import. 1074 class to import.
1073 1075
1074 The files must define the same properties as the class (including 1076 The files used in the import are:
1075 having a "header" line with those property names.) 1077
1078 <class>.csv
1079 This must define the same properties as the class (including
1080 having a "header" line with those property names.)
1081 <class>-journals.csv
1082 This defines the journals for the items being imported.
1076 1083
1077 The imported nodes will have the same nodeid as defined in the 1084 The imported nodes will have the same nodeid as defined in the
1078 import file, thus replacing any existing content. 1085 import file, thus replacing any existing content.
1079 1086
1080 The new nodes are added to the existing database - if you want to 1087 The new nodes are added to the existing database - if you want to

Roundup Issue Tracker: http://roundup-tracker.org/