From: richard Date: Fri, 16 Aug 2002 04:26:42 +0000 (+0000) Subject: moving towards full database export X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=356467c77c906d84407c28f872f94c4c4c160ade;p=roundup.git moving towards full database export git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@955 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/TODO.txt b/TODO.txt index bebe7de..63e0c91 100644 --- a/TODO.txt +++ b/TODO.txt @@ -13,6 +13,7 @@ pending hyperdb: range searching of values (dates in particular) pending hyperdb: make creator, creation and activity available pre-commit pending hyperdb: migrate "id" property to be Number type pending hyperdb: allow classes to define their ordering (properties, asc/desc) +pending hyperdb: entire database export and import (files, journals and all) pending instance: including much simpler upgrade path and the use of non-Python configuration files (ConfigParser) pending instance: move the header link config out into an html template diff --git a/roundup/admin.py b/roundup/admin.py index bed62a4..48b96d6 100644 --- a/roundup/admin.py +++ b/roundup/admin.py @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: admin.py,v 1.21 2002-08-01 01:07:37 richard Exp $ +# $Id: admin.py,v 1.22 2002-08-16 04:26:42 richard Exp $ import sys, os, getpass, getopt, re, UserDict, shlex, shutil try: @@ -808,17 +808,23 @@ Command help: return 0 def do_export(self, args): - '''Usage: export class[,class] destination_dir + '''Usage: export [class[,class]] destination_dir Export the database to tab-separated-value files. This action exports the current data from the database into tab-separated-value files that are placed in the nominated destination directory. The journals are not exported. ''' - if len(args) < 2: + # grab the directory to export to + if len(args) < 1: raise UsageError, _('Not enough arguments supplied') - classes = args[0].split(',') - dir = args[1] + dir = args[-1] + + # get the list of classes to export + if len(args) == 2: + classes = args[0].split(',') + else: + classes = self.db.classes.keys() # use the csv parser if we can - it's faster if csv is not None: @@ -831,7 +837,7 @@ Command help: f.write(':'.join(cl.properties.keys()) + '\n') # all nodes for this class - properties = cl.properties.items() + properties = cl.getprops() for nodeid in cl.list(): l = [] for prop, proptype in properties: @@ -1164,6 +1170,9 @@ if __name__ == '__main__': # # $Log: not supported by cvs2svn $ +# Revision 1.21 2002/08/01 01:07:37 richard +# include info about new user roles +# # Revision 1.20 2002/08/01 00:56:22 richard # Added the web access and email access permissions, so people can restrict # access to users who register through the email interface (for example).