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