|
| 1 | +#! /usr/bin/env python |
| 2 | +# |
| 3 | +# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
| 4 | +# This module is free software, and you may redistribute it and/or modify |
| 5 | +# under the same terms as Python, so long as this copyright message and |
| 6 | +# disclaimer are retained in their original form. |
| 7 | +# |
| 8 | +# IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
| 9 | +# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
| 10 | +# OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
| 11 | +# POSSIBILITY OF SUCH DAMAGE. |
| 12 | +# |
| 13 | +# BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
| 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" |
| 16 | +# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 17 | +# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 18 | +# |
| 19 | +# $Id: roundup_admin.py,v 1.1 2002-01-29 19:53:08 jhermann Exp $ |
| 20 | + |
| 21 | +# python version check |
| 22 | +from roundup import version_check |
| 23 | + |
| 24 | +# import the admin tool guts and make it go |
| 25 | +from roundup.admin import AdminTool |
| 26 | +from roundup.i18n import _ |
| 27 | + |
| 28 | +import sys |
| 29 | +tool = AdminTool() |
| 30 | +sys.exit(tool.main()) |
| 31 | + |
| 32 | +# |
| 33 | +# $Log: not supported by cvs2svn $ |
| 34 | +# Revision 1.61 2002/01/05 02:21:21 richard |
| 35 | +# fixes |
| 36 | +# |
| 37 | +# Revision 1.60 2002/01/05 02:11:22 richard |
| 38 | +# I18N'ed roundup admin - and split the code off into a module so it can be used |
| 39 | +# elsewhere. |
| 40 | +# Big issue with this is the doc strings - that's the help. We're probably going to |
| 41 | +# have to switch to not use docstrings, which will suck a little :( |
| 42 | +# |
| 43 | +# Revision 1.59 2001/12/31 05:20:34 richard |
| 44 | +# . #496360 ] table width does not work |
| 45 | +# |
| 46 | +# Revision 1.58 2001/12/31 05:12:52 richard |
| 47 | +# actually handle the advertised <cr> response to "commit y/N?" |
| 48 | +# |
| 49 | +# Revision 1.57 2001/12/31 05:12:01 richard |
| 50 | +# added some quoting instructions to roundup-admin |
| 51 | +# |
| 52 | +# Revision 1.56 2001/12/31 05:09:20 richard |
| 53 | +# Added better tokenising to roundup-admin - handles spaces and stuff. Can |
| 54 | +# use quoting or backslashes. See the roundup.token pydoc. |
| 55 | +# |
| 56 | +# Revision 1.55 2001/12/17 03:52:47 richard |
| 57 | +# Implemented file store rollback. As a bonus, the hyperdb is now capable of |
| 58 | +# storing more than one file per node - if a property name is supplied, |
| 59 | +# the file is called designator.property. |
| 60 | +# I decided not to migrate the existing files stored over to the new naming |
| 61 | +# scheme - the FileClass just doesn't specify the property name. |
| 62 | +# |
| 63 | +# Revision 1.54 2001/12/15 23:09:23 richard |
| 64 | +# Some cleanups in roundup-admin, also made it work again... |
| 65 | +# |
| 66 | +# Revision 1.53 2001/12/13 00:20:00 richard |
| 67 | +# . Centralised the python version check code, bumped version to 2.1.1 (really |
| 68 | +# needs to be 2.1.2, but that isn't released yet :) |
| 69 | +# |
| 70 | +# Revision 1.52 2001/12/12 21:47:45 richard |
| 71 | +# . Message author's name appears in From: instead of roundup instance name |
| 72 | +# (which still appears in the Reply-To:) |
| 73 | +# . envelope-from is now set to the roundup-admin and not roundup itself so |
| 74 | +# delivery reports aren't sent to roundup (thanks Patrick Ohly) |
| 75 | +# |
| 76 | +# Revision 1.51 2001/12/10 00:57:38 richard |
| 77 | +# From CHANGES: |
| 78 | +# . Added the "display" command to the admin tool - displays a node's values |
| 79 | +# . #489760 ] [issue] only subject |
| 80 | +# . fixed the doc/index.html to include the quoting in the mail alias. |
| 81 | +# |
| 82 | +# Also: |
| 83 | +# . fixed roundup-admin so it works with transactions |
| 84 | +# . disabled the back_anydbm module if anydbm tries to use dumbdbm |
| 85 | +# |
| 86 | +# Revision 1.50 2001/12/02 05:06:16 richard |
| 87 | +# . We now use weakrefs in the Classes to keep the database reference, so |
| 88 | +# the close() method on the database is no longer needed. |
| 89 | +# I bumped the minimum python requirement up to 2.1 accordingly. |
| 90 | +# . #487480 ] roundup-server |
| 91 | +# . #487476 ] INSTALL.txt |
| 92 | +# |
| 93 | +# I also cleaned up the change message / post-edit stuff in the cgi client. |
| 94 | +# There's now a clearly marked "TODO: append the change note" where I believe |
| 95 | +# the change note should be added there. The "changes" list will obviously |
| 96 | +# have to be modified to be a dict of the changes, or somesuch. |
| 97 | +# |
| 98 | +# More testing needed. |
| 99 | +# |
| 100 | +# Revision 1.49 2001/12/01 07:17:50 richard |
| 101 | +# . We now have basic transaction support! Information is only written to |
| 102 | +# the database when the commit() method is called. Only the anydbm |
| 103 | +# backend is modified in this way - neither of the bsddb backends have been. |
| 104 | +# The mail, admin and cgi interfaces all use commit (except the admin tool |
| 105 | +# doesn't have a commit command, so interactive users can't commit...) |
| 106 | +# . Fixed login/registration forwarding the user to the right page (or not, |
| 107 | +# on a failure) |
| 108 | +# |
| 109 | +# Revision 1.48 2001/11/27 22:32:03 richard |
| 110 | +# typo |
| 111 | +# |
| 112 | +# Revision 1.47 2001/11/26 22:55:56 richard |
| 113 | +# Feature: |
| 114 | +# . Added INSTANCE_NAME to configuration - used in web and email to identify |
| 115 | +# the instance. |
| 116 | +# . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup |
| 117 | +# signature info in e-mails. |
| 118 | +# . Some more flexibility in the mail gateway and more error handling. |
| 119 | +# . Login now takes you to the page you back to the were denied access to. |
| 120 | +# |
| 121 | +# Fixed: |
| 122 | +# . Lots of bugs, thanks Roché and others on the devel mailing list! |
| 123 | +# |
| 124 | +# Revision 1.46 2001/11/21 03:40:54 richard |
| 125 | +# more new property handling |
| 126 | +# |
| 127 | +# Revision 1.45 2001/11/12 22:51:59 jhermann |
| 128 | +# Fixed option & associated error handling |
| 129 | +# |
| 130 | +# Revision 1.44 2001/11/12 22:01:06 richard |
| 131 | +# Fixed issues with nosy reaction and author copies. |
| 132 | +# |
| 133 | +# Revision 1.43 2001/11/09 22:33:28 richard |
| 134 | +# More error handling fixes. |
| 135 | +# |
| 136 | +# Revision 1.42 2001/11/09 10:11:08 richard |
| 137 | +# . roundup-admin now handles all hyperdb exceptions |
| 138 | +# |
| 139 | +# Revision 1.41 2001/11/09 01:25:40 richard |
| 140 | +# Should parse with python 1.5.2 now. |
| 141 | +# |
| 142 | +# Revision 1.40 2001/11/08 04:42:00 richard |
| 143 | +# Expanded the already-abbreviated "initialise" and "specification" commands, |
| 144 | +# and added a comment to the command help about the abbreviation. |
| 145 | +# |
| 146 | +# Revision 1.39 2001/11/08 04:29:59 richard |
| 147 | +# roundup-admin now accepts abbreviated commands (eg. l = li = lis = list) |
| 148 | +# [thanks Engelbert Gruber for the inspiration] |
| 149 | +# |
| 150 | +# Revision 1.38 2001/11/05 23:45:40 richard |
| 151 | +# Fixed newuser_action so it sets the cookie with the unencrypted password. |
| 152 | +# Also made it present nicer error messages (not tracebacks). |
| 153 | +# |
| 154 | +# Revision 1.37 2001/10/23 01:00:18 richard |
| 155 | +# Re-enabled login and registration access after lopping them off via |
| 156 | +# disabling access for anonymous users. |
| 157 | +# Major re-org of the htmltemplate code, cleaning it up significantly. Fixed |
| 158 | +# a couple of bugs while I was there. Probably introduced a couple, but |
| 159 | +# things seem to work OK at the moment. |
| 160 | +# |
| 161 | +# Revision 1.36 2001/10/21 00:45:15 richard |
| 162 | +# Added author identification to e-mail messages from roundup. |
| 163 | +# |
| 164 | +# Revision 1.35 2001/10/20 11:58:48 richard |
| 165 | +# Catch errors in login - no username or password supplied. |
| 166 | +# Fixed editing of password (Password property type) thanks Roch'e Compaan. |
| 167 | +# |
| 168 | +# Revision 1.34 2001/10/18 02:16:42 richard |
| 169 | +# Oops, committed the admin script with the wierd #! line. |
| 170 | +# Also, made the thing into a class to reduce parameter passing. |
| 171 | +# Nuked the leading whitespace from the help __doc__ displays too. |
| 172 | +# |
| 173 | +# Revision 1.33 2001/10/17 23:13:19 richard |
| 174 | +# Did a fair bit of work on the admin tool. Now has an extra command "table" |
| 175 | +# which displays node information in a tabular format. Also fixed import and |
| 176 | +# export so they work. Removed freshen. |
| 177 | +# Fixed quopri usage in mailgw from bug reports. |
| 178 | +# |
| 179 | +# Revision 1.32 2001/10/17 06:57:29 richard |
| 180 | +# Interactive startup blurb - need to figure how to get the version in there. |
| 181 | +# |
| 182 | +# Revision 1.31 2001/10/17 06:17:26 richard |
| 183 | +# Now with readline support :) |
| 184 | +# |
| 185 | +# Revision 1.30 2001/10/17 06:04:00 richard |
| 186 | +# Beginnings of an interactive mode for roundup-admin |
| 187 | +# |
| 188 | +# Revision 1.29 2001/10/16 03:48:01 richard |
| 189 | +# admin tool now complains if a "find" is attempted with a non-link property. |
| 190 | +# |
| 191 | +# Revision 1.28 2001/10/13 00:07:39 richard |
| 192 | +# More help in admin tool. |
| 193 | +# |
| 194 | +# Revision 1.27 2001/10/11 23:43:04 richard |
| 195 | +# Implemented the comma-separated printing option in the admin tool. |
| 196 | +# Fixed a typo (more of a vim-o actually :) in mailgw. |
| 197 | +# |
| 198 | +# Revision 1.26 2001/10/11 05:03:51 richard |
| 199 | +# Marked the roundup-admin import/export as experimental since they're not fully |
| 200 | +# operational. |
| 201 | +# |
| 202 | +# Revision 1.25 2001/10/10 04:12:32 richard |
| 203 | +# The setup.cfg file is just causing pain. Away it goes. |
| 204 | +# |
| 205 | +# Revision 1.24 2001/10/10 03:54:57 richard |
| 206 | +# Added database importing and exporting through CSV files. |
| 207 | +# Uses the csv module from object-craft for exporting if it's available. |
| 208 | +# Requires the csv module for importing. |
| 209 | +# |
| 210 | +# Revision 1.23 2001/10/09 23:36:25 richard |
| 211 | +# Spit out command help if roundup-admin command doesn't get an argument. |
| 212 | +# |
| 213 | +# Revision 1.22 2001/10/09 07:25:59 richard |
| 214 | +# Added the Password property type. See "pydoc roundup.password" for |
| 215 | +# implementation details. Have updated some of the documentation too. |
| 216 | +# |
| 217 | +# Revision 1.21 2001/10/05 02:23:24 richard |
| 218 | +# . roundup-admin create now prompts for property info if none is supplied |
| 219 | +# on the command-line. |
| 220 | +# . hyperdb Class getprops() method may now return only the mutable |
| 221 | +# properties. |
| 222 | +# . Login now uses cookies, which makes it a whole lot more flexible. We can |
| 223 | +# now support anonymous user access (read-only, unless there's an |
| 224 | +# "anonymous" user, in which case write access is permitted). Login |
| 225 | +# handling has been moved into cgi_client.Client.main() |
| 226 | +# . The "extended" schema is now the default in roundup init. |
| 227 | +# . The schemas have had their page headings modified to cope with the new |
| 228 | +# login handling. Existing installations should copy the interfaces.py |
| 229 | +# file from the roundup lib directory to their instance home. |
| 230 | +# . Incorrectly had a Bizar Software copyright on the cgitb.py module from |
| 231 | +# Ping - has been removed. |
| 232 | +# . Fixed a whole bunch of places in the CGI interface where we should have |
| 233 | +# been returning Not Found instead of throwing an exception. |
| 234 | +# . Fixed a deviation from the spec: trying to modify the 'id' property of |
| 235 | +# an item now throws an exception. |
| 236 | +# |
| 237 | +# Revision 1.20 2001/10/04 02:12:42 richard |
| 238 | +# Added nicer command-line item adding: passing no arguments will enter an |
| 239 | +# interactive more which asks for each property in turn. While I was at it, I |
| 240 | +# fixed an implementation problem WRT the spec - I wasn't raising a |
| 241 | +# ValueError if the key property was missing from a create(). Also added a |
| 242 | +# protected=boolean argument to getprops() so we can list only the mutable |
| 243 | +# properties (defaults to yes, which lists the immutables). |
| 244 | +# |
| 245 | +# Revision 1.19 2001/10/01 06:40:43 richard |
| 246 | +# made do_get have the args in the correct order |
| 247 | +# |
| 248 | +# Revision 1.18 2001/09/18 22:58:37 richard |
| 249 | +# |
| 250 | +# Added some more help to roundu-admin |
| 251 | +# |
| 252 | +# Revision 1.17 2001/08/28 05:58:33 anthonybaxter |
| 253 | +# added missing 'import' statements. |
| 254 | +# |
| 255 | +# Revision 1.16 2001/08/12 06:32:36 richard |
| 256 | +# using isinstance(blah, Foo) now instead of isFooType |
| 257 | +# |
| 258 | +# Revision 1.15 2001/08/07 00:24:42 richard |
| 259 | +# stupid typo |
| 260 | +# |
| 261 | +# Revision 1.14 2001/08/07 00:15:51 richard |
| 262 | +# Added the copyright/license notice to (nearly) all files at request of |
| 263 | +# Bizar Software. |
| 264 | +# |
| 265 | +# Revision 1.13 2001/08/05 07:44:13 richard |
| 266 | +# Instances are now opened by a special function that generates a unique |
| 267 | +# module name for the instances on import time. |
| 268 | +# |
| 269 | +# Revision 1.12 2001/08/03 01:28:33 richard |
| 270 | +# Used the much nicer load_package, pointed out by Steve Majewski. |
| 271 | +# |
| 272 | +# Revision 1.11 2001/08/03 00:59:34 richard |
| 273 | +# Instance import now imports the instance using imp.load_module so that |
| 274 | +# we can have instance homes of "roundup" or other existing python package |
| 275 | +# names. |
| 276 | +# |
| 277 | +# Revision 1.10 2001/07/30 08:12:17 richard |
| 278 | +# Added time logging and file uploading to the templates. |
| 279 | +# |
| 280 | +# Revision 1.9 2001/07/30 03:52:55 richard |
| 281 | +# init help now lists templates and backends |
| 282 | +# |
| 283 | +# Revision 1.8 2001/07/30 02:37:07 richard |
| 284 | +# Freshen is really broken. Commented out. |
| 285 | +# |
| 286 | +# Revision 1.7 2001/07/30 01:28:46 richard |
| 287 | +# Bugfixes |
| 288 | +# |
| 289 | +# Revision 1.6 2001/07/30 00:57:51 richard |
| 290 | +# Now uses getopt, much improved command-line parsing. Much fuller help. Much |
| 291 | +# better internal structure. It's just BETTER. :) |
| 292 | +# |
| 293 | +# Revision 1.5 2001/07/30 00:04:48 richard |
| 294 | +# Made the "init" prompting more friendly. |
| 295 | +# |
| 296 | +# Revision 1.4 2001/07/29 07:01:39 richard |
| 297 | +# Added vim command to all source so that we don't get no steenkin' tabs :) |
| 298 | +# |
| 299 | +# Revision 1.3 2001/07/23 08:45:28 richard |
| 300 | +# ok, so now "./roundup-admin init" will ask questions in an attempt to get a |
| 301 | +# workable instance_home set up :) |
| 302 | +# _and_ anydbm has had its first test :) |
| 303 | +# |
| 304 | +# Revision 1.2 2001/07/23 08:20:44 richard |
| 305 | +# Moved over to using marshal in the bsddb and anydbm backends. |
| 306 | +# roundup-admin now has a "freshen" command that'll load/save all nodes (not |
| 307 | +# retired - mod hyperdb.Class.list() so it lists retired nodes) |
| 308 | +# |
| 309 | +# Revision 1.1 2001/07/23 03:46:48 richard |
| 310 | +# moving the bin files to facilitate out-of-the-boxness |
| 311 | +# |
| 312 | +# Revision 1.1 2001/07/22 11:15:45 richard |
| 313 | +# More Grande Splite stuff |
| 314 | +# |
| 315 | +# |
| 316 | +# vim: set filetype=python ts=4 sw=4 et si |
0 commit comments