• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..27-Apr-2010-

cgi/H27-Apr-2010-4,5473,350

contrib/H27-Apr-2010-5134

cs/H27-Apr-2010-10,2857,197

csharp/H27-Apr-2010-337213

dso/H27-Apr-2010-6639

imd/H03-May-2022-1,6461,341

java-jni/H03-May-2022-2,1691,529

m4/H27-Apr-2010-9891

man/man3/H27-Apr-2010-4,9914,169

mod_ecs/H27-Apr-2010-979699

perl/H27-Apr-2010-830592

ports/H27-Apr-2010-309227

python/H03-May-2022-6,9495,087

ruby/H27-Apr-2010-1,9671,446

scripts/H27-Apr-2010-912783

util/H03-May-2022-19,43112,925

CS_LICENSEH A D30-Jun-20052.6 KiB6245

ClearSilver.hH A D30-Jun-20051.7 KiB7848

INSTALLH A D30-Jun-20054.9 KiB12594

LICENSEH A D17-Nov-2006669 2113

MakefileH A D12-Jul-20073.4 KiB132102

READMEH A D30-Jun-20052.4 KiB6750

README.pythonH A D30-Jun-20052.1 KiB6647

acconfig.hH A D30-Jun-20051.4 KiB6618

aclocal.m4H A D12-Jul-200735 KiB930898

autogen.shH A D17-Nov-2005167 126

config.guessH A D03-May-202243 KiB1,4811,288

config.subH A D03-May-202234.8 KiB1,8031,662

configureH A D12-Jul-2007235.4 KiB8,3217,172

configure.inH A D12-Jul-200714.6 KiB513477

cs_config.h.inH A D15-Dec-20066 KiB239163

install-shH A D30-Jun-20054.7 KiB239152

mkinstalldirsH A D30-Jun-2005728 4123

rules.mk.inH A D03-May-20223.8 KiB170145

README

1************************************
2* Clearsilver README
3************************************
4
5For more information, see the website:
6
7  http://www.clearsilver.net/
8
9This package includes Clearsilver, the CGI kit and HTML templating
10system. For information about building and installing, see the
11included INSTALL file. This package also includes tools which
12help you use Clearsilver, as well as a few examples.
13
14************************************************************
15*** Clearsilver
16
17* Clearsilver - This is our html template system and cgi kit.
18
19There are too many great things about clearsilver to list them all
20here, but here are some of the salient points:
21
22  * get the html out of your code
23  * loops, conditionals, macros, and stuff
24  * cgi kit unifies query variable and cookie handling
25  * super-easy to go from static mockup to dynamic page
26  * run multiple front-ends on the same application code
27  * super-fast C-library
28  * unifies Query variable and cookie handling
29  * language neutral (C,C++,Python,Ruby,Perl,Java,C#)
30  * nice iterative page debugging/development features
31  * generate static-data-driven page content without using any code
32  * did I mention super-fast?
33
34Supported language information:
35
36  README.python
37
38*************************************************************
39*** Tools
40
41* trans.py
42
43This is our transparent translation system. It's based on how we did
44translation at Yahoo!. You leave all the english strings right in the
45clearsilver templates. trans parses the html and extracts your
46language strings into a translation database. You can then translate
47the strings using any means. (it includes tools for dump and loading
48per-language files for shipping to translators). Occasionally trans
49isn't smart enough to find your language strings, in this case you can
50manually extract them into static language string files and trans will
51automatically pick them up. When it comes time to ship, trans
52generates language-independent templates, and a set of language files
53from your database.
54
55*************************************************************
56*** Examples
57
58* static.cgi
59
60This is a standalone binary which handles Clearsilver rendering of
61static content. This is a great way to play with clearsilver syntax
62before you start writing dynamic CGIs with it. This is also a great
63way to do webpage mockups with much more power than server side
64includes.  See the INSTALL file for information about configuring
65this for use with apache.
66
67

README.python

1
2
3************************************************************
4*** Python Environment Information
5
6* Python      - we know it and love it
7* Apache      - the defacto standard
8
9* PyApache/mod_python
10
11Either one is fine, the goal is to load all Python code once, before
12Apache forks. Then, for every web-request, Apache just makes a
13function call into the Python environment which serves the page. This
14is "really fast" as it gets rid of all of the parsing and loading of
15Python. Various versions of PyApache and mod_python have gained and
16lost and gained again the ability to do this well. We used a hacked
17version of PyApache way back when, I think mod_python does this out of
18the box today.
19
20
21
22************************************************************
23*** Python Tools
24
25* CSPage.py
26
27This is our "page rendering superclass". It's pretty simple and has
28nice machinery for some of the stuff talked about on this list. For
29example, it has nice debugging and redirect support, and it has a
30mechanism for mapping form submit buttons to method names. Here is an
31example of how the form stuff works:
32
33 <form action="foo.py">
34   <input type=submit name="Action.Foo" value="Do Foo!">
35 </form>
36
37 class MyPage(CSPage):
38    def setup(self):
39        # this runs before everything else
40        pass
41    def display(self):
42        # this is a regular non-submission render
43        pass
44    def Action_Foo(self):
45        # this is run automatically when the Foo submit button is clicked
46        pass
47
48* odb.py
49
50This is an object to relational database mapping tool. It makes
51interacting with SQL databases really easy. It gives you a place to
52put all your SQL code. It also could be changed to work with flat
53files as well. We have some nice hooks to connect this to Clearsilver,
54so rendering database data into webpages is really easy. Here is an
55example:
56
57rows = mydb.mytable.fetchAllRows()        # fetch all rows
58rows.hdfExport("CGI.tabledata",ncgi.hdf)  # export them into the dataset
59
60# it is also really easy to change rows:
61
62row = mydb.mytable.fetchRow( ('user', 'jeske') )
63row.email = 'jeske at chat.net'
64row.save()
65
66