~ubuntu-branches/ubuntu/quantal/cubictemp/quantal

« back to all changes in this revision

Viewing changes to doc/start.html

  • Committer: Bazaar Package Importer
  • Author(s): Mohammed Adnène Trojette
  • Date: 2009-03-21 19:56:53 UTC
  • mfrom: (3.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090321195653-2tj0jz2itpfyxt8y
Tags: 2.0-1
* New upstream release.
* debian/control:
   + bump Standards-Version to 3.8.1.
   + bump debhelper compatibility to 7.
   + add ${misc:Depends} to Depends.
* Remove unneeded patches and patching system accordingly.
* Update debian/copyright: licence is now MIT.
* Update packaging to prevent FTBFS. Thanks to Josselin
  Mouette. (Closes: #516162)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
<html>
4
 
        <head>
5
 
                <LINK REL=StyleSheet HREF="./style/style.css" TYPE="text/css">
6
 
        </head>
7
 
                <a href="intro.html">&lt;--previous</a> |
8
 
        <a href="./index.html">contents</a> |
9
 
        <a href="templates.html">next--&gt;</a> 
10
 
 
11
 
        <hr>
12
 
        <body>
13
 
        <h1>Getting Started</h1>
14
 
                
15
 
<p> This section gives a quick overview of Cubictemp, centered around a very
16
 
simple example. </p>
17
 
 
18
 
 
19
 
<h2> Hello walrus: A Basic Substitution Example </h2>
20
 
 
21
 
<p> The simplest function of a templating system is basic substitution - that
22
 
is, taking one piece of text, and inserting it into another. Consider the
23
 
following line:</p>
24
 
 
25
 
<code class="template">
26
 
        Hello @!foo!@.
27
 
</code>
28
 
 
29
 
<p>This line is a complete Cubictemp template. It contains the single
30
 
substitution tag - 
31
 
 
32
 
<code class="template">
33
 
        @!foo!@
34
 
</code>
35
 
 
36
 
- which we can use to insert the word "walrus" at the appropriate spot like
37
 
this: </p>
38
 
 
39
 
<pre><div class="pythoncode"><font color="#C00000">import</font> <font color="#000000">cubictemp</font>
40
 
 
41
 
<font color="#000000">template</font> <font color="#0000C0">=</font> <font color="#004080">"Hello @!foo!@."</font>
42
 
<font color="#000000">temp</font> <font color="#0000C0">=</font> <font color="#000000">cubictemp</font><font color="#0000C0">.</font><font color="#000000">Temp</font><font color="#0000C0">(</font><font color="#000000">template</font><font color="#0000C0">,</font> <font color="#000000">foo</font><font color="#0000C0">=</font><font color="#004080">"walrus"</font><font color="#0000C0">)</font>
43
 
<font color="#C00000">print</font> <font color="#000000">temp</font><font color="#000000"></font></div></pre>
44
 
 
45
 
<p>When we run the snippet of code above, the following output is
46
 
produced:</p>
47
 
 
48
 
<code class="output">
49
 
Hello walrus.
50
 
</code>
51
 
 
52
 
<p>That's it - the example above is perhaps the simplest possible Cubictemp
53
 
example. </p>
54
 
 
55
 
        </body>
56
 
        <hr>
57
 
    <table width="100%">
58
 
        <tr>
59
 
            <td>
60
 
                        <a href="intro.html">&lt;--previous</a> |
61
 
        <a href="./index.html">contents</a> |
62
 
        <a href="templates.html">next--&gt;</a> 
63
 
 
64
 
            </td>
65
 
            <td align="right">
66
 
                (11/16/04)
67
 
            </td>
68
 
        </tr>
69
 
    </table>
70
 
        <center> Cubictemp v0.4 Manual </center>
71
 
</html>