|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| autom4te.cache/ | | 03-May-2024 | - | 8,176 | 7,458 |
| cgi/ | | 03-May-2024 | - | 4,577 | 3,367 |
| contrib/ | | 03-May-2024 | - | 51 | 34 |
| cs/ | | 03-May-2024 | - | 10,285 | 7,193 |
| csharp/ | | 03-May-2024 | - | 337 | 213 |
| dso/ | | 03-May-2024 | - | 66 | 39 |
| imd/ | | 03-May-2024 | - | 1,646 | 1,341 |
| java-jni/ | | 03-May-2024 | - | 2,322 | 1,624 |
| m4/ | | 03-May-2024 | - | 98 | 91 |
| man/man3/ | | 03-May-2024 | - | 5,031 | 4,204 |
| mod_ecs/ | | 03-May-2024 | - | 979 | 699 |
| perl/ | | 03-May-2024 | - | 842 | 597 |
| ports/ | | 03-May-2024 | - | 309 | 227 |
| python/ | | 03-May-2024 | - | 7,048 | 5,148 |
| ruby/ | | 03-May-2024 | - | 1,967 | 1,446 |
| scripts/ | | 03-May-2024 | - | 912 | 783 |
| util/ | | 03-May-2024 | - | 19,462 | 12,946 |
| Android.mk | D | 03-May-2024 | 37 | 2 | 1 |
| CS_LICENSE | D | 03-May-2024 | 2.6 KiB | 62 | 45 |
| ClearSilver.h | D | 03-May-2024 | 1.7 KiB | 78 | 48 |
| INSTALL | D | 03-May-2024 | 4.9 KiB | 125 | 94 |
| LICENSE | D | 03-May-2024 | 669 | 21 | 13 |
| Makefile | D | 03-May-2024 | 3.4 KiB | 132 | 102 |
| README | D | 03-May-2024 | 2.4 KiB | 67 | 50 |
| README.python | D | 03-May-2024 | 2.1 KiB | 66 | 47 |
| acconfig.h | D | 03-May-2024 | 1.4 KiB | 66 | 18 |
| aclocal.m4 | D | 03-May-2024 | 35 KiB | 930 | 898 |
| autogen.sh | D | 03-May-2024 | 167 | 12 | 6 |
| config.guess | D | 03-May-2024 | 37.6 KiB | 1,318 | 1,141 |
| config.sub | D | 03-May-2024 | 27.6 KiB | 1,412 | 1,273 |
| configure | D | 03-May-2024 | 235.4 KiB | 8,321 | 7,172 |
| configure.in | D | 03-May-2024 | 14.6 KiB | 513 | 477 |
| cs_config.h | D | 03-May-2024 | 6.3 KiB | 239 | 58 |
| cs_config.h.in | D | 03-May-2024 | 6 KiB | 239 | 163 |
| install-sh | D | 03-May-2024 | 4.7 KiB | 239 | 152 |
| mkinstalldirs | D | 03-May-2024 | 728 | 41 | 23 |
| rules.mk.in | D | 03-May-2024 | 3.8 KiB | 170 | 145 |
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