github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

tiddlyweb / tiddlyweb

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 14
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (2)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (15)
    • 1.0.x
    • bagdeque
    • bagtube
    • extractwiki
    • filterindex
    • filterindex2
    • filters2
    • genserializers
    • master ✓
    • prefixfiddle
    • revisions1
    • ssl_policy
    • tiddlergen
    • tmp-mgg
    • usertag
  • Tags (1)
    • v1.0.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

TiddlyWeb Core — Read more

  cancel

http://tiddlyweb.peermore.com/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Establish the branch management policy. Comment
Chris Dent (author)
Fri Jan 15 14:40:31 -0800 2010
commit  19f95be54aca42ed539e9fff3c090f981a419ab0
tree    70e93a7643718fd4fa341efd5ec12a0f66a8ba55
parent  01d869823c1731eee492306f0844c263f53ac704
tiddlyweb / index.cgi index.cgi
100755 73 lines (55 sloc) 2.37 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/python
 
"""
This is a CGI script that can be used for running
TiddlyWeb under a web server, instead of using the
sever that is built in.
 
Put the cgi somewhere your web server can run cgis. You
can rename it if you like. Make sure the file is executable.
 
If you are using the text store (you probably are) follow
the instructions in COOKBOOK to make a text store directory
structure somewhere. The directory hierarchy must be writable
by the web server. In tiddlywebconfig.py you need to set server_store
and store_root to point to that directory:
 
'server_store': ['text', {'store_root': '/some/path/to/store'}],
'server_prefix': '/~cdent/tw/index.cgi',
'server_host': {
'scheme': 'http',
'host': 'burningchrome.com',
'port': '80'},
 
You need to choose a location where your tiddlywebconfig.py will
live. This is also where you should put any plugins you are using
and where tiddlyweb.log will be written. You may need to create
tiddlyweb.log yourself, and set its permissions so the server can
write to it.
 
Whatever location you choose for your tiddlywebconfig.py set to
tiddlywebconfig_dir to that directory, in the script below.
 
You will need to set server_prefix and server_host in the
tiddlywebconfig.py in the location that you choose.
 
'server_prefix': '/~cdent/tw/index.cgi',
'server_host': {
'scheme': 'http',
'host': 'burningchrome.com',
'port': '80'},
 
It is a good idea for your store directory and tiddlywebconfig_dir
to be different places.
 
You may need to change the PYTHON_EGG_CACHE setting.
 
See http://tiddlyweb.peemore.com for general documentation and
http://bengillies.net/.a/#%5B%5BRunning%20on%20TiddlyWeb%2C%20Part%20One%5D%5D
for an installation tutorial, specifically for people who
do not have root access on their server.
"""
 
import os
import sys
 
tiddlywebconfig_dir = '/home/cdent/hot_html/tw'
 
os.environ['PYTHON_EGG_CACHE'] = '/tmp'
os.chdir(tiddlywebconfig_dir)
sys.path.insert(0, tiddlywebconfig_dir)
 
from wsgiref.handlers import BaseCGIHandler
from tiddlyweb.web import serve
 
def start():
    app = serve.load_app()
    if not 'PATH_INFO' in os.environ:
        os.environ['PATH_INFO'] = '/'
    BaseCGIHandler(sys.stdin, sys.stdout, sys.stderr, os.environ).run(app)
 
if __name__ == '__main__':
    start()
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server