Changeset 185

Show
Ignore:
Timestamp:
08/16/08 21:32:23 (4 months ago)
Author:
rgrp
Message:

[shakespeare][xs]: bump version number to 0.6a from 0.5dev (should have done this a while ago).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/shakespeare/__init__.py

    Revision 169 Revision 185
    1''' 1''' 
    2Introduction 2Introduction 
    3************ 3************ 
    4 4 
    5The Open Shakespeare package provides a full open set of shakespeare's works 5The Open Shakespeare package provides a full open set of shakespeare's works 
    6(often in multiple versions) along with ancillary material, a variety of tools 6(often in multiple versions) along with ancillary material, a variety of tools 
    7and a python API. 7and a python API. 
    8 8 
    9Specifically in addition to the works themselves (often in multiple versions) 9Specifically in addition to the works themselves (often in multiple versions) 
    10there is an introduction, a chronology, explanatory notes, a concordance and 10there is an introduction, a chronology, explanatory notes, a concordance and 
    11search facilities. 11search facilities. 
    12 12 
    13All material is open source/open knowledge so that anyone can use, redistribute 13All material is open source/open knowledge so that anyone can use, redistribute 
    14and reuse these materials freely. For exact details of the license under which 14and reuse these materials freely. For exact details of the license under which 
    15this package is made available please see COPYING.txt. 15this package is made available please see COPYING.txt. 
    16 16 
    17Open Shakespeare has been developed under the aegis of the Open Knowledge 17Open Shakespeare has been developed under the aegis of the Open Knowledge 
    18Foundation (http://www.okfn.org/). 18Foundation (http://www.okfn.org/). 
    19 19 
    20Contact the Project 20Contact the Project 
    21******************* 21******************* 
    22 22 
    23Please mail info@okfn.org or join the okfn-discuss mailing list: 23Please mail info@okfn.org or join the okfn-discuss mailing list: 
    24 24 
    25  http://lists.okfn.org/listinfo/okfn-discuss 25  http://lists.okfn.org/listinfo/okfn-discuss 
    26 26 
    27 27 
    28Installation and Setup 28Installation and Setup 
    29********************** 29********************** 
    30 30 
    311. Install the code 311. Install the code 
    32=================== 32=================== 
    33 33 
    341.1: (EITHER) Install using setup.py (preferred) 341.1: (EITHER) Install using setup.py (preferred) 
    35------------------------------------------------ 35------------------------------------------------ 
    36 36 
    37Install ``shakespeare`` using easy_install:: 37Install ``shakespeare`` using easy_install:: 
    38 38 
    39    easy_install shakespeare 39    easy_install shakespeare 
    40 40 
    41NB: If you don't have easy_install you can get from here: 41NB: If you don't have easy_install you can get from here: 
    42 42 
    43<http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions> 43<http://peak.telecommunity.com/DevCenter/EasyInstall#installation-instructions> 
    44 44 
    45 45 
    461.2 (OR) Get the code straight from subversion 461.2 (OR) Get the code straight from subversion 
    47------------------------------------------------ 47------------------------------------------------ 
    48 48 
    491. Check out the subversion trunk:: 491. Check out the subversion trunk:: 
    50 50 
    51    svn co https://knowledgeforge.net/shakespeare/svn/trunk 51    svn co https://knowledgeforge.net/shakespeare/svn/trunk 
    52 52 
    532. Do:: 532. Do:: 
    54 54 
    55    sudo python setup.py develop 55    sudo python setup.py develop 
    56 56 
    57 57 
    58Getting Started 58Getting Started 
    59*************** 59*************** 
    60 60 
    61As a user: 61As a user: 
    62========== 62========== 
    63 63 
    641. Basic setup 641. Basic setup 
    65-------------- 65-------------- 
    66 66 
    67To access most of the main features of Open Shakespeare you need a database. 67To access most of the main features of Open Shakespeare you need a database. 
    68For this an other bits and bobs of configuration you will need a configuration 68For this an other bits and bobs of configuration you will need a configuration 
    69file. 69file. 
    70 70 
    71You can make a config file as follows:: 71You can make a config file as follows:: 
    72 72 
    73    paster make-config shakespeare {your-config.ini} 73    paster make-config shakespeare {your-config.ini} 
    74 74 
    75Tweak the config file as appropriate and then setup the application:: 75Tweak the config file as appropriate and then setup the application:: 
    76 76 
    77    paster setup-app config.ini 77    paster setup-app config.ini 
    78  78  
    79[TODO: this should be part of setup-app] 79[TODO: this should be part of setup-app] 
    80 80 
    81Run:: 81Run:: 
    82 82 
    83    $ shakespeare-admin db create 83    $ shakespeare-admin db create 
    84    $ shakespeare-admin db init 84    $ shakespeare-admin db init 
    85 85 
    862. Extras 862. Extras 
    87--------- 87--------- 
    88 88 
    891. Search index. [TODO] 891. Search index. [TODO] 
    90 90 
    912. You can start a web server to provide a easy-to-use web interface to the 912. You can start a web server to provide a easy-to-use web interface to the 
    92shakespeare material and facilities by doing:: 92shakespeare material and facilities by doing:: 
    93 93 
    94    $ paster serve {your-config.ini} 94    $ paster serve {your-config.ini} 
    95 95 
    96NB: {your-config.ini} should be replaced with the name of the config file you 96NB: {your-config.ini} should be replaced with the name of the config file you 
    97created earlier. 97created earlier. 
    98 98 
    99 99 
    100As a developer: 100As a developer: 
    101=============== 101=============== 
    102 102 
    1030. Setup 1030. Setup 
    104-------- 104-------- 
    105 105 
    106Follow the basic steps above put with an ini file named: development.ini 106Follow the basic steps above put with an ini file named: development.ini 
    107 107 
    108NB: you'll probably want to change log levels to debug. 108NB: you'll probably want to change log levels to debug. 
    109 109 
    1101. Check out the administrative commands 1101. Check out the administrative commands 
    111---------------------------------------- 111---------------------------------------- 
    112 112 
    113    $ bin/shakespeare-admin help. 113    $ bin/shakespeare-admin help. 
    114 114 
    1152. Run the tests using either py.test of nosetests:: 1152. Run the tests using either py.test of nosetests:: 
    116---------------------------------------------------- 116---------------------------------------------------- 
    117 117 
    118    $ nosetests shakespeare 118    $ nosetests shakespeare 
    119''' 119''' 
    120__version__ = '0.5dev120__version__ = '0.6a
    121__application_name__ = 'shakespeare' 121__application_name__ = 'shakespeare' 
    122 122 
    123def conf(): 123def conf(): 
    124    import os 124    import os 
    125    defaultPath = os.path.abspath('./development.ini') 125    defaultPath = os.path.abspath('./development.ini') 
    126    envVarName = __application_name__.upper() + 'CONF' 126    envVarName = __application_name__.upper() + 'CONF' 
    127    confPath = os.environ.get(envVarName, defaultPath) 127    confPath = os.environ.get(envVarName, defaultPath) 
    128    if not os.path.exists(confPath): 128    if not os.path.exists(confPath): 
    129        raise ValueError('No Configuration file exists at: %s' % confPath) 129        raise ValueError('No Configuration file exists at: %s' % confPath) 
    130 130 
    131    # register the config 131    # register the config 
    132    import paste.deploy 132    import paste.deploy 
    133    import shakespeare.config.environment 133    import shakespeare.config.environment 
    134    pasteconf = paste.deploy.appconfig('config:' + confPath) 134    pasteconf = paste.deploy.appconfig('config:' + confPath) 
    135 135 
    136    shakespeare.config.environment.load_environment(pasteconf.global_conf, 136    shakespeare.config.environment.load_environment(pasteconf.global_conf, 
    137        pasteconf.local_conf) 137        pasteconf.local_conf) 
    138    from pylons import config 138    from pylons import config 
    139    conf = config 139    conf = config 
    140 140 
    141    # import ConfigParser 141    # import ConfigParser 
    142    # conf = ConfigParser.SafeConfigParser() 142    # conf = ConfigParser.SafeConfigParser() 
    143    # conf.read(confPath) 143    # conf.read(confPath) 
    144 144 
    145    return conf 145    return conf 
    146      146