Fossil SCM
Improvements to the build and TH1 scripting docs.
Commit
901427f5cd1f2ca8e0d5517b643b08e9f5356476
Parent
df12c1b05318862…
2 files changed
+33
-14
+78
-39
+33
-14
| --- www/build.wiki | ||
| +++ www/build.wiki | ||
| @@ -26,39 +26,39 @@ | ||
| 26 | 26 | <p><hr> |
| 27 | 27 | |
| 28 | 28 | <h2>1.0 Obtaining The Source Code</h2> |
| 29 | 29 | |
| 30 | 30 | <p>Fossil is self-hosting, so you can obtain a ZIP archive or tarball |
| 31 | -containing a snapshot of the <em>latest</em> version directly from | |
| 32 | -Fossil's own fossil repository. Additionally, source archives of | |
| 31 | +containing a snapshot of the <em>latest</em> version directly from | |
| 32 | +Fossil's own fossil repository. Additionally, source archives of | |
| 33 | 33 | <em>released</em> versions of |
| 34 | 34 | fossil are available from the <a href="http://www.fossil-scm.org/download.html">downloads page</a>. |
| 35 | 35 | To obtain a development version of fossil, follow these steps:</p> |
| 36 | 36 | |
| 37 | 37 | <ol> |
| 38 | 38 | <li><p>Point your web browser to |
| 39 | 39 | <a href="http://www.fossil-scm.org/"> |
| 40 | 40 | http://www.fossil-scm.org/</a>.</p></li> |
| 41 | 41 | |
| 42 | -<li><p>Click on the | |
| 43 | -<a href="http://www.fossil-scm.org/fossil/timeline">Timeline</a> | |
| 42 | +<li><p>Click on the | |
| 43 | +<a href="http://www.fossil-scm.org/fossil/timeline">Timeline</a> | |
| 44 | 44 | link at the top of the page.</p></li> |
| 45 | 45 | |
| 46 | 46 | <li><p>Select a version of of Fossil you want to download. The latest |
| 47 | 47 | version on the trunk branch is usually a good choice. Click on its |
| 48 | 48 | link.</p></li> |
| 49 | 49 | |
| 50 | 50 | <li><p>Finally, click on one of the |
| 51 | 51 | "Zip Archive" or "Tarball" links, according to your preference. |
| 52 | -These link will build a ZIP archive or a gzip-compressed tarball of the | |
| 52 | +These link will build a ZIP archive or a gzip-compressed tarball of the | |
| 53 | 53 | complete source code and download it to your computer. |
| 54 | 54 | </ol> |
| 55 | 55 | |
| 56 | 56 | <h2>Aside: Is it really safe to use an unreleased development version of |
| 57 | 57 | the Fossil source code?</h2> |
| 58 | 58 | |
| 59 | -Yes! Any check-in on the | |
| 59 | +Yes! Any check-in on the | |
| 60 | 60 | [/timeline?t=trunk | trunk branch] of the Fossil |
| 61 | 61 | [http://fossil-scm.org/fossil/timeline | Fossil self-hosting repository] |
| 62 | 62 | will work fine. (Dodgy code is always on a branch.) In the unlikely |
| 63 | 63 | event that you pick a version with a serious bug, it still won't |
| 64 | 64 | clobber your files. Fossil uses several |
| @@ -90,10 +90,14 @@ | ||
| 90 | 90 | |
| 91 | 91 | <li><p> |
| 92 | 92 | To build a statically linked binary (suitable for use inside a chroot |
| 93 | 93 | jail) add the <b>--static</b> option. |
| 94 | 94 | |
| 95 | +<li><p> | |
| 96 | +To enable the native [./th1.md#tclEval | Tcl integration feature] feature, | |
| 97 | +add the <b>--with-tcl=1</b> and <b>--with-tcl-private-stubs=1</b> options. | |
| 98 | + | |
| 95 | 99 | <li><p> |
| 96 | 100 | Other configuration options can be seen by running |
| 97 | 101 | <b>./configure --help</b> |
| 98 | 102 | </ol> |
| 99 | 103 | |
| @@ -102,20 +106,26 @@ | ||
| 102 | 106 | |
| 103 | 107 | <ol type="a"> |
| 104 | 108 | <li><p><i>Unix</i> → the configure-generated Makefile should work on |
| 105 | 109 | all Unix and Unix-like systems. Simply type "<b>make</b>". |
| 106 | 110 | |
| 107 | -<li><p><i>Unix without running "configure"</i> → if you prefer to avoid running configure, you | |
| 108 | -can also use: <b>make -f Makefile.classic</b>. You may want to make minor | |
| 109 | -edits to Makefile.classic to configure the build for your system. | |
| 111 | +<li><p><i>Unix without running "configure"</i> → if you prefer to avoid | |
| 112 | +running configure, you can also use: <b>make -f Makefile.classic</b>. You may | |
| 113 | +want to make minor edits to Makefile.classic to configure the build for your | |
| 114 | +system. | |
| 110 | 115 | |
| 111 | 116 | <li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile: |
| 112 | 117 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will |
| 113 | 118 | need either Cygwin or Msys as build environment. On Cygwin, Linux |
| 114 | 119 | or Darwin you may want to make minor edits to win/Makefile.mingw |
| 115 | 120 | to configure the cross-compile environment. |
| 116 | 121 | |
| 122 | +To enable the native [./th1.md#tclEval | Tcl integration feature], use a | |
| 123 | +command line like the following (all on one line): | |
| 124 | + | |
| 125 | +<b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b> | |
| 126 | + | |
| 117 | 127 | Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see |
| 118 | 128 | <a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>. |
| 119 | 129 | |
| 120 | 130 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 121 | 131 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| @@ -134,10 +144,19 @@ | ||
| 134 | 144 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 135 | 145 | </pre></blockquote> |
| 136 | 146 | <blockquote><pre> |
| 137 | 147 | buildmsvc.bat FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 138 | 148 | </pre></blockquote> |
| 149 | +To enable the optional native [./th1.md#tclEval | Tcl integration feature], | |
| 150 | +run one of the following commands or add the "FOSSIL_ENABLE_TCL=1" | |
| 151 | +argument to one of the other NMAKE command lines: | |
| 152 | +<blockquote><pre> | |
| 153 | +nmake /f Makefile.msc FOSSIL_ENABLE_TCL=1 | |
| 154 | +</pre></blockquote> | |
| 155 | +<blockquote><pre> | |
| 156 | +buildmsvc.bat FOSSIL_ENABLE_TCL=1 | |
| 157 | +</pre></blockquote> | |
| 139 | 158 | |
| 140 | 159 | <li><p><i>Cygwin</i> → The same as other Unix-like systems. It is |
| 141 | 160 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 142 | 161 | making sure you have the "libsqlite3-devel" , "zlib-devel" and |
| 143 | 162 | "openssl-devel" packages installed first. |
| @@ -146,12 +165,12 @@ | ||
| 146 | 165 | |
| 147 | 166 | <h2>3.0 Installing</h2> |
| 148 | 167 | |
| 149 | 168 | <ol> |
| 150 | 169 | <li value="8"> |
| 151 | -<p>The finished binary is named "fossil" (or "fossil.exe" on Windows). | |
| 152 | -Put this binary in a | |
| 170 | +<p>The finished binary is named "fossil" (or "fossil.exe" on Windows). | |
| 171 | +Put this binary in a | |
| 153 | 172 | directory that is somewhere on your PATH environment variable. |
| 154 | 173 | It does not matter where.</p> |
| 155 | 174 | |
| 156 | 175 | <li> |
| 157 | 176 | <p><b>(Optional:)</b> |
| @@ -167,14 +186,14 @@ | ||
| 167 | 186 | Fossil manually, then refer to the |
| 168 | 187 | [./makefile.wiki | Fossil Build Process] document which describes |
| 169 | 188 | in detail what the makefiles do behind the scenes. |
| 170 | 189 | |
| 171 | 190 | <li><p> |
| 172 | - The fossil executable is self-contained and stand-alone and usually | |
| 173 | - requires no special libraries or other software to be installed. However, | |
| 191 | + The fossil executable is self-contained and stand-alone and usually | |
| 192 | + requires no special libraries or other software to be installed. However, | |
| 174 | 193 | the "--tk" option to the [/help/diff|diff command] requires that Tcl/Tk |
| 175 | - be installed on the local machine. You can get Tcl/Tk from | |
| 194 | + be installed on the local machine. You can get Tcl/Tk from | |
| 176 | 195 | [http://www.activestate.com/activetcl|ActiveState]. |
| 177 | 196 | |
| 178 | 197 | <li><p> |
| 179 | 198 | To build on older Macs (circa 2002, MacOS 10.2) edit the Makefile |
| 180 | 199 | generated by configure to add the following lines: |
| 181 | 200 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -26,39 +26,39 @@ | |
| 26 | <p><hr> |
| 27 | |
| 28 | <h2>1.0 Obtaining The Source Code</h2> |
| 29 | |
| 30 | <p>Fossil is self-hosting, so you can obtain a ZIP archive or tarball |
| 31 | containing a snapshot of the <em>latest</em> version directly from |
| 32 | Fossil's own fossil repository. Additionally, source archives of |
| 33 | <em>released</em> versions of |
| 34 | fossil are available from the <a href="http://www.fossil-scm.org/download.html">downloads page</a>. |
| 35 | To obtain a development version of fossil, follow these steps:</p> |
| 36 | |
| 37 | <ol> |
| 38 | <li><p>Point your web browser to |
| 39 | <a href="http://www.fossil-scm.org/"> |
| 40 | http://www.fossil-scm.org/</a>.</p></li> |
| 41 | |
| 42 | <li><p>Click on the |
| 43 | <a href="http://www.fossil-scm.org/fossil/timeline">Timeline</a> |
| 44 | link at the top of the page.</p></li> |
| 45 | |
| 46 | <li><p>Select a version of of Fossil you want to download. The latest |
| 47 | version on the trunk branch is usually a good choice. Click on its |
| 48 | link.</p></li> |
| 49 | |
| 50 | <li><p>Finally, click on one of the |
| 51 | "Zip Archive" or "Tarball" links, according to your preference. |
| 52 | These link will build a ZIP archive or a gzip-compressed tarball of the |
| 53 | complete source code and download it to your computer. |
| 54 | </ol> |
| 55 | |
| 56 | <h2>Aside: Is it really safe to use an unreleased development version of |
| 57 | the Fossil source code?</h2> |
| 58 | |
| 59 | Yes! Any check-in on the |
| 60 | [/timeline?t=trunk | trunk branch] of the Fossil |
| 61 | [http://fossil-scm.org/fossil/timeline | Fossil self-hosting repository] |
| 62 | will work fine. (Dodgy code is always on a branch.) In the unlikely |
| 63 | event that you pick a version with a serious bug, it still won't |
| 64 | clobber your files. Fossil uses several |
| @@ -90,10 +90,14 @@ | |
| 90 | |
| 91 | <li><p> |
| 92 | To build a statically linked binary (suitable for use inside a chroot |
| 93 | jail) add the <b>--static</b> option. |
| 94 | |
| 95 | <li><p> |
| 96 | Other configuration options can be seen by running |
| 97 | <b>./configure --help</b> |
| 98 | </ol> |
| 99 | |
| @@ -102,20 +106,26 @@ | |
| 102 | |
| 103 | <ol type="a"> |
| 104 | <li><p><i>Unix</i> → the configure-generated Makefile should work on |
| 105 | all Unix and Unix-like systems. Simply type "<b>make</b>". |
| 106 | |
| 107 | <li><p><i>Unix without running "configure"</i> → if you prefer to avoid running configure, you |
| 108 | can also use: <b>make -f Makefile.classic</b>. You may want to make minor |
| 109 | edits to Makefile.classic to configure the build for your system. |
| 110 | |
| 111 | <li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile: |
| 112 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will |
| 113 | need either Cygwin or Msys as build environment. On Cygwin, Linux |
| 114 | or Darwin you may want to make minor edits to win/Makefile.mingw |
| 115 | to configure the cross-compile environment. |
| 116 | |
| 117 | Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see |
| 118 | <a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>. |
| 119 | |
| 120 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 121 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| @@ -134,10 +144,19 @@ | |
| 134 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 135 | </pre></blockquote> |
| 136 | <blockquote><pre> |
| 137 | buildmsvc.bat FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 138 | </pre></blockquote> |
| 139 | |
| 140 | <li><p><i>Cygwin</i> → The same as other Unix-like systems. It is |
| 141 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 142 | making sure you have the "libsqlite3-devel" , "zlib-devel" and |
| 143 | "openssl-devel" packages installed first. |
| @@ -146,12 +165,12 @@ | |
| 146 | |
| 147 | <h2>3.0 Installing</h2> |
| 148 | |
| 149 | <ol> |
| 150 | <li value="8"> |
| 151 | <p>The finished binary is named "fossil" (or "fossil.exe" on Windows). |
| 152 | Put this binary in a |
| 153 | directory that is somewhere on your PATH environment variable. |
| 154 | It does not matter where.</p> |
| 155 | |
| 156 | <li> |
| 157 | <p><b>(Optional:)</b> |
| @@ -167,14 +186,14 @@ | |
| 167 | Fossil manually, then refer to the |
| 168 | [./makefile.wiki | Fossil Build Process] document which describes |
| 169 | in detail what the makefiles do behind the scenes. |
| 170 | |
| 171 | <li><p> |
| 172 | The fossil executable is self-contained and stand-alone and usually |
| 173 | requires no special libraries or other software to be installed. However, |
| 174 | the "--tk" option to the [/help/diff|diff command] requires that Tcl/Tk |
| 175 | be installed on the local machine. You can get Tcl/Tk from |
| 176 | [http://www.activestate.com/activetcl|ActiveState]. |
| 177 | |
| 178 | <li><p> |
| 179 | To build on older Macs (circa 2002, MacOS 10.2) edit the Makefile |
| 180 | generated by configure to add the following lines: |
| 181 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -26,39 +26,39 @@ | |
| 26 | <p><hr> |
| 27 | |
| 28 | <h2>1.0 Obtaining The Source Code</h2> |
| 29 | |
| 30 | <p>Fossil is self-hosting, so you can obtain a ZIP archive or tarball |
| 31 | containing a snapshot of the <em>latest</em> version directly from |
| 32 | Fossil's own fossil repository. Additionally, source archives of |
| 33 | <em>released</em> versions of |
| 34 | fossil are available from the <a href="http://www.fossil-scm.org/download.html">downloads page</a>. |
| 35 | To obtain a development version of fossil, follow these steps:</p> |
| 36 | |
| 37 | <ol> |
| 38 | <li><p>Point your web browser to |
| 39 | <a href="http://www.fossil-scm.org/"> |
| 40 | http://www.fossil-scm.org/</a>.</p></li> |
| 41 | |
| 42 | <li><p>Click on the |
| 43 | <a href="http://www.fossil-scm.org/fossil/timeline">Timeline</a> |
| 44 | link at the top of the page.</p></li> |
| 45 | |
| 46 | <li><p>Select a version of of Fossil you want to download. The latest |
| 47 | version on the trunk branch is usually a good choice. Click on its |
| 48 | link.</p></li> |
| 49 | |
| 50 | <li><p>Finally, click on one of the |
| 51 | "Zip Archive" or "Tarball" links, according to your preference. |
| 52 | These link will build a ZIP archive or a gzip-compressed tarball of the |
| 53 | complete source code and download it to your computer. |
| 54 | </ol> |
| 55 | |
| 56 | <h2>Aside: Is it really safe to use an unreleased development version of |
| 57 | the Fossil source code?</h2> |
| 58 | |
| 59 | Yes! Any check-in on the |
| 60 | [/timeline?t=trunk | trunk branch] of the Fossil |
| 61 | [http://fossil-scm.org/fossil/timeline | Fossil self-hosting repository] |
| 62 | will work fine. (Dodgy code is always on a branch.) In the unlikely |
| 63 | event that you pick a version with a serious bug, it still won't |
| 64 | clobber your files. Fossil uses several |
| @@ -90,10 +90,14 @@ | |
| 90 | |
| 91 | <li><p> |
| 92 | To build a statically linked binary (suitable for use inside a chroot |
| 93 | jail) add the <b>--static</b> option. |
| 94 | |
| 95 | <li><p> |
| 96 | To enable the native [./th1.md#tclEval | Tcl integration feature] feature, |
| 97 | add the <b>--with-tcl=1</b> and <b>--with-tcl-private-stubs=1</b> options. |
| 98 | |
| 99 | <li><p> |
| 100 | Other configuration options can be seen by running |
| 101 | <b>./configure --help</b> |
| 102 | </ol> |
| 103 | |
| @@ -102,20 +106,26 @@ | |
| 106 | |
| 107 | <ol type="a"> |
| 108 | <li><p><i>Unix</i> → the configure-generated Makefile should work on |
| 109 | all Unix and Unix-like systems. Simply type "<b>make</b>". |
| 110 | |
| 111 | <li><p><i>Unix without running "configure"</i> → if you prefer to avoid |
| 112 | running configure, you can also use: <b>make -f Makefile.classic</b>. You may |
| 113 | want to make minor edits to Makefile.classic to configure the build for your |
| 114 | system. |
| 115 | |
| 116 | <li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile: |
| 117 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will |
| 118 | need either Cygwin or Msys as build environment. On Cygwin, Linux |
| 119 | or Darwin you may want to make minor edits to win/Makefile.mingw |
| 120 | to configure the cross-compile environment. |
| 121 | |
| 122 | To enable the native [./th1.md#tclEval | Tcl integration feature], use a |
| 123 | command line like the following (all on one line): |
| 124 | |
| 125 | <b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b> |
| 126 | |
| 127 | Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see |
| 128 | <a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>. |
| 129 | |
| 130 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 131 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| @@ -134,10 +144,19 @@ | |
| 144 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 145 | </pre></blockquote> |
| 146 | <blockquote><pre> |
| 147 | buildmsvc.bat FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 148 | </pre></blockquote> |
| 149 | To enable the optional native [./th1.md#tclEval | Tcl integration feature], |
| 150 | run one of the following commands or add the "FOSSIL_ENABLE_TCL=1" |
| 151 | argument to one of the other NMAKE command lines: |
| 152 | <blockquote><pre> |
| 153 | nmake /f Makefile.msc FOSSIL_ENABLE_TCL=1 |
| 154 | </pre></blockquote> |
| 155 | <blockquote><pre> |
| 156 | buildmsvc.bat FOSSIL_ENABLE_TCL=1 |
| 157 | </pre></blockquote> |
| 158 | |
| 159 | <li><p><i>Cygwin</i> → The same as other Unix-like systems. It is |
| 160 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 161 | making sure you have the "libsqlite3-devel" , "zlib-devel" and |
| 162 | "openssl-devel" packages installed first. |
| @@ -146,12 +165,12 @@ | |
| 165 | |
| 166 | <h2>3.0 Installing</h2> |
| 167 | |
| 168 | <ol> |
| 169 | <li value="8"> |
| 170 | <p>The finished binary is named "fossil" (or "fossil.exe" on Windows). |
| 171 | Put this binary in a |
| 172 | directory that is somewhere on your PATH environment variable. |
| 173 | It does not matter where.</p> |
| 174 | |
| 175 | <li> |
| 176 | <p><b>(Optional:)</b> |
| @@ -167,14 +186,14 @@ | |
| 186 | Fossil manually, then refer to the |
| 187 | [./makefile.wiki | Fossil Build Process] document which describes |
| 188 | in detail what the makefiles do behind the scenes. |
| 189 | |
| 190 | <li><p> |
| 191 | The fossil executable is self-contained and stand-alone and usually |
| 192 | requires no special libraries or other software to be installed. However, |
| 193 | the "--tk" option to the [/help/diff|diff command] requires that Tcl/Tk |
| 194 | be installed on the local machine. You can get Tcl/Tk from |
| 195 | [http://www.activestate.com/activetcl|ActiveState]. |
| 196 | |
| 197 | <li><p> |
| 198 | To build on older Macs (circa 2002, MacOS 10.2) edit the Makefile |
| 199 | generated by configure to add the following lines: |
| 200 |
+78
-39
| --- www/th1.md | ||
| +++ www/th1.md | ||
| @@ -166,90 +166,90 @@ | ||
| 166 | 166 | All commands starting with "tcl", with the exception of "tclReady", |
| 167 | 167 | require the Tcl integration subsystem be included at compile-time. |
| 168 | 168 | Additionally, the "tcl" repository setting must be enabled at runtime |
| 169 | 169 | in order to successfully make use of these commands. |
| 170 | 170 | |
| 171 | -TH1 anoncap Command | |
| -------------------- | ||
| 171 | +<a name="anoncap"></a>TH1 anoncap Command | |
| 172 | +----------------------------------------- | |
| 172 | 173 | |
| 173 | 174 | * anoncap STRING... |
| 174 | 175 | |
| 175 | 176 | Returns true if the anonymous user has all of the capabilities listed |
| 176 | 177 | in STRING. |
| 177 | 178 | |
| 178 | -TH1 anycap Command | |
| ------------------- | ||
| 179 | +<a name="anycap"></a>TH1 anycap Command | |
| 180 | +--------------------------------------- | |
| 179 | 181 | |
| 180 | 182 | * anycap STRING |
| 181 | 183 | |
| 182 | 184 | Returns true if the current user user has any one of the capabilities |
| 183 | 185 | listed in STRING. |
| 184 | 186 | |
| 185 | -TH1 artifact Command | |
| --------------------- | ||
| 187 | +<a name="artifact"></a>TH1 artifact Command | |
| 188 | +------------------------------------------- | |
| 186 | 189 | |
| 187 | 190 | * artifact ID ?FILENAME? |
| 188 | 191 | |
| 189 | 192 | Attempts to locate the specified artifact and return its contents. An |
| 190 | 193 | error is generated if the repository is not open or the artifact cannot |
| 191 | 194 | be found. |
| 192 | 195 | |
| 193 | -TH1 checkout Command | |
| --------------------- | ||
| 196 | +<a name="checkout"></a>TH1 checkout Command | |
| 197 | +------------------------------------------- | |
| 194 | 198 | |
| 195 | 199 | * checkout ?BOOLEAN? |
| 196 | 200 | |
| 197 | 201 | Return the fully qualified directory name of the current checkout or an |
| 198 | 202 | empty string if it is not available. Optionally, it will attempt to find |
| 199 | 203 | the current checkout, opening the configuration ("user") database and the |
| 200 | 204 | repository as necessary, if the boolean argument is non-zero. |
| 201 | 205 | |
| 202 | -TH1 combobox Command | |
| --------------------- | ||
| 206 | +<a name="combobox"></a>TH1 combobox Command | |
| 207 | +------------------------------------------- | |
| 203 | 208 | |
| 204 | 209 | * combobox NAME TEXT-LIST NUMLINES |
| 205 | 210 | |
| 206 | 211 | Generates and emits an HTML combobox. NAME is both the name of the |
| 207 | 212 | CGI parameter and the name of a variable that contains the currently |
| 208 | 213 | selected value. TEXT-LIST is a list of possible values for the |
| 209 | 214 | combobox. NUMLINES is 1 for a true combobox. If NUMLINES is greater |
| 210 | 215 | than one then the display is a listbox with the number of lines given. |
| 211 | 216 | |
| 212 | -TH1 date Command | |
| ----------------- | ||
| 217 | +<a name="date"></a>TH1 date Command | |
| 218 | +----------------------------------- | |
| 213 | 219 | |
| 214 | 220 | * date ?-local? |
| 215 | 221 | |
| 216 | 222 | Return a strings which is the current time and date. If the -local |
| 217 | 223 | option is used, the date appears using localtime instead of UTC. |
| 218 | 224 | |
| 219 | -TH1 decorate Command | |
| --------------------- | ||
| 225 | +<a name="decorate"></a>TH1 decorate Command | |
| 226 | +------------------------------------------- | |
| 220 | 227 | |
| 221 | 228 | * decorate STRING |
| 222 | 229 | |
| 223 | 230 | Renders STRING as wiki content; however, only links are handled. No |
| 224 | 231 | other markup is processed. |
| 225 | 232 | |
| 226 | -TH1 enable_output Command | |
| -------------------------- | ||
| 233 | +<a name="enable_output"></a>TH1 enable_output Command | |
| 234 | +----------------------------------------------------- | |
| 227 | 235 | |
| 228 | 236 | * enable_output BOOLEAN |
| 229 | 237 | |
| 230 | 238 | Enable or disable sending output when the combobox, puts, or wiki |
| 231 | 239 | commands are used. |
| 232 | 240 | |
| 233 | -TH1 getParameter Command | |
| ------------------------- | ||
| 241 | +<a name="getParameter"></a>TH1 getParameter Command | |
| 242 | +--------------------------------------------------- | |
| 234 | 243 | |
| 235 | 244 | * getParameter NAME ?DEFAULT? |
| 236 | 245 | |
| 237 | 246 | Returns the value of the specified query parameter or the specified |
| 238 | 247 | default value when there is no matching query parameter. |
| 239 | 248 | |
| 240 | -TH1 globalState Command | |
| ------------------------ | ||
| 249 | +<a name="globalState"></a>TH1 globalState Command | |
| 250 | +------------------------------------------------- | |
| 241 | 251 | |
| 242 | 252 | * globalState NAME ?DEFAULT? |
| 243 | 253 | |
| 244 | 254 | Returns a string containing the value of the specified global state |
| 245 | 255 | variable -OR- the specified default value. The supported items are: |
| @@ -266,20 +266,20 @@ | ||
| 266 | 266 | |
| 267 | 267 | Attempts to query for unsupported global state variables will result |
| 268 | 268 | in a script error. Additional global state variables may be exposed |
| 269 | 269 | in the future. |
| 270 | 270 | |
| 271 | -TH1 hascap Command | |
| ------------------- | ||
| 271 | +<a name="hascap"></a>TH1 hascap Command | |
| 272 | +--------------------------------------- | |
| 272 | 273 | |
| 273 | 274 | * hascap STRING... |
| 274 | 275 | |
| 275 | 276 | Returns true if the current user has all of the capabilities listed |
| 276 | 277 | in STRING. |
| 277 | 278 | |
| 278 | -TH1 hasfeature Command | |
| ----------------------- | ||
| 279 | +<a name="hasfeature"></a>TH1 hasfeature Command | |
| 280 | +----------------------------------------------- | |
| 279 | 281 | |
| 280 | 282 | * hasfeature STRING |
| 281 | 283 | |
| 282 | 284 | Returns true if the binary has the given compile-time feature enabled. |
| 283 | 285 | The possible features are: |
| @@ -294,27 +294,27 @@ | ||
| 294 | 294 | 1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._ |
| 295 | 295 | 1. **json** -- _Support for the JSON APIs._ |
| 296 | 296 | 1. **markdown** -- _Support for Markdown documentation format._ |
| 297 | 297 | 1. **unicodeCmdLine** -- _The command line arguments are Unicode._ |
| 298 | 298 | |
| 299 | -TH1 html Command | |
| ----------------- | ||
| 299 | +<a name="html"></a>TH1 html Command | |
| 300 | +----------------------------------- | |
| 300 | 301 | |
| 301 | 302 | * html STRING |
| 302 | 303 | |
| 303 | 304 | Outputs the STRING escaped for HTML. |
| 304 | 305 | |
| 305 | -TH1 htmlize Command | |
| -------------------- | ||
| 306 | +<a name="htmlize"></a>TH1 htmlize Command | |
| 307 | +----------------------------------------- | |
| 306 | 308 | |
| 307 | 309 | * htmlize STRING |
| 308 | 310 | |
| 309 | 311 | Escape all characters of STRING which have special meaning in HTML. |
| 310 | 312 | Returns the escaped string. |
| 311 | 313 | |
| 312 | -TH1 http Command | |
| ----------------- | ||
| 314 | +<a name="http"></a>TH1 http Command | |
| 315 | +----------------------------------- | |
| 313 | 316 | |
| 314 | 317 | * http ?-asynchronous? ?--? url ?payload? |
| 315 | 318 | |
| 316 | 319 | Performs an HTTP or HTTPS request for the specified URL. If a |
| 317 | 320 | payload is present, it will be interpreted as text/plain and |
| @@ -322,35 +322,35 @@ | ||
| 322 | 322 | be used. Upon success, if the -asynchronous option is used, an |
| 323 | 323 | empty string is returned as the result; otherwise, the response |
| 324 | 324 | from the server is returned as the result. Synchronous requests |
| 325 | 325 | are not currently implemented. |
| 326 | 326 | |
| 327 | -TH1 httpize Command | |
| -------------------- | ||
| 327 | +<a name="httpize"></a>TH1 httpize Command | |
| 328 | +----------------------------------------- | |
| 328 | 329 | |
| 329 | 330 | * httpize STRING |
| 330 | 331 | |
| 331 | 332 | Escape all characters of STRING which have special meaning in URI |
| 332 | 333 | components. Returns the escaped string. |
| 333 | 334 | |
| 334 | -TH1 linecount Command | |
| ---------------------- | ||
| 335 | +<a name="linecount"></a>TH1 linecount Command | |
| 336 | +--------------------------------------------- | |
| 335 | 337 | |
| 336 | 338 | * linecount STRING MAX MIN |
| 337 | 339 | |
| 338 | 340 | Returns one more than the number of \n characters in STRING. But |
| 339 | 341 | never returns less than MIN or more than MAX. |
| 340 | 342 | |
| 341 | -TH1 puts Command | |
| ----------------- | ||
| 343 | +<a name="puts"></a>TH1 puts Command | |
| 344 | +----------------------------------- | |
| 342 | 345 | |
| 343 | 346 | * puts STRING |
| 344 | 347 | |
| 345 | 348 | Outputs the STRING unchanged. |
| 346 | 349 | |
| 347 | -TH1 query Command | |
| ------------------ | ||
| 350 | +<a name="query"></a>TH1 query Command | |
| 351 | +------------------------------------- | |
| 348 | 352 | |
| 349 | 353 | * query SQL CODE |
| 350 | 354 | |
| 351 | 355 | Runs the SQL query given by the SQL argument. For each row in the result |
| 352 | 356 | set, run CODE. |
| @@ -357,52 +357,52 @@ | ||
| 357 | 357 | |
| 358 | 358 | In SQL, parameters such as $var are filled in using the value of variable |
| 359 | 359 | "var". Result values are stored in variables with the column name prior |
| 360 | 360 | to each invocation of CODE. |
| 361 | 361 | |
| 362 | -TH1 randhex Command | |
| -------------------- | ||
| 362 | +<a name="randhex"></a>TH1 randhex Command | |
| 363 | +----------------------------------------- | |
| 363 | 364 | |
| 364 | 365 | * randhex N |
| 365 | 366 | |
| 366 | 367 | Returns a string of N*2 random hexadecimal digits with N<50. If N is |
| 367 | 368 | omitted, use a value of 10. |
| 368 | 369 | |
| 369 | -TH1 regexp Command | |
| ------------------- | ||
| 370 | +<a name="regexp"></a>TH1 regexp Command | |
| 371 | +--------------------------------------- | |
| 370 | 372 | |
| 371 | 373 | * regexp ?-nocase? ?--? exp string |
| 372 | 374 | |
| 373 | 375 | Checks the string against the specified regular expression and returns |
| 374 | 376 | non-zero if it matches. If the regular expression is invalid or cannot |
| 375 | 377 | be compiled, an error will be generated. |
| 376 | 378 | |
| 377 | -TH1 reinitialize Command | |
| ------------------------- | ||
| 379 | +<a name="reinitialize"></a>TH1 reinitialize Command | |
| 380 | +--------------------------------------------------- | |
| 378 | 381 | |
| 379 | 382 | * reinitialize ?FLAGS? |
| 380 | 383 | |
| 381 | 384 | Reinitializes the TH1 interpreter using the specified flags. |
| 382 | 385 | |
| 383 | -TH1 render Command | |
| ------------------- | ||
| 386 | +<a name="render"></a>TH1 render Command | |
| 387 | +--------------------------------------- | |
| 384 | 388 | |
| 385 | 389 | * render STRING |
| 386 | 390 | |
| 387 | 391 | Renders the TH1 template and writes the results. |
| 388 | 392 | |
| 389 | -TH1 repository Command | |
| ----------------------- | ||
| 393 | +<a name="repository"></a>TH1 repository Command | |
| 394 | +----------------------------------------------- | |
| 390 | 395 | |
| 391 | 396 | * repository ?BOOLEAN? |
| 392 | 397 | |
| 393 | 398 | Returns the fully qualified file name of the open repository or an empty |
| 394 | 399 | string if one is not currently open. Optionally, it will attempt to open |
| 395 | 400 | the repository if the boolean argument is non-zero. |
| 396 | 401 | |
| 397 | -TH1 searchable Command | |
| ----------------------- | ||
| 402 | +<a name="searchable"></a>TH1 searchable Command | |
| 403 | +----------------------------------------------- | |
| 398 | 404 | |
| 399 | 405 | * searchable STRING... |
| 400 | 406 | |
| 401 | 407 | Return true if searching in any of the document classes identified |
| 402 | 408 | by STRING is enabled for the repository and user has the necessary |
| @@ -426,104 +426,104 @@ | ||
| 426 | 426 | if {[searchable cdtw]} {...} |
| 427 | 427 | |
| 428 | 428 | This command is useful for enabling or disabling a "Search" entry on the |
| 429 | 429 | menu bar. |
| 430 | 430 | |
| 431 | -TH1 setParameter Command | |
| ------------------------- | ||
| 431 | +<a name="setParameter"></a>TH1 setParameter Command | |
| 432 | +--------------------------------------------------- | |
| 432 | 433 | |
| 433 | 434 | * setParameter NAME VALUE |
| 434 | 435 | |
| 435 | 436 | Sets the value of the specified query parameter. |
| 436 | 437 | |
| 437 | -TH1 setting Command | |
| -------------------- | ||
| 438 | +<a name="setting"></a>TH1 setting Command | |
| 439 | +----------------------------------------- | |
| 438 | 440 | |
| 439 | 441 | * setting name |
| 440 | 442 | |
| 441 | 443 | Gets and returns the value of the specified setting. |
| 442 | 444 | |
| 443 | -TH1 styleHeader Command | |
| ------------------------ | ||
| 445 | +<a name="styleHeader"></a>TH1 styleHeader Command | |
| 446 | +------------------------------------------------- | |
| 444 | 447 | |
| 445 | 448 | * styleHeader TITLE |
| 446 | 449 | |
| 447 | 450 | Render the configured style header. |
| 448 | 451 | |
| 449 | -TH1 styleFooter Command | |
| ------------------------ | ||
| 452 | +<a name="styleFooter"></a>TH1 styleFooter Command | |
| 453 | +------------------------------------------------- | |
| 450 | 454 | |
| 451 | 455 | * styleFooter |
| 452 | 456 | |
| 453 | 457 | Render the configured style footer. |
| 454 | 458 | |
| 455 | -TH1 tclEval Command | |
| -------------------- | ||
| 459 | +<a name="tclEval"></a>TH1 tclEval Command | |
| 460 | +----------------------------------------- | |
| 456 | 461 | |
| 457 | 462 | **This command requires the Tcl integration feature.** |
| 458 | 463 | |
| 459 | 464 | * tclEval arg ?arg ...? |
| 460 | 465 | |
| 461 | 466 | Evaluates the Tcl script and returns its result verbatim. If a Tcl script |
| 462 | 467 | error is generated, it will be transformed into a TH1 script error. A Tcl |
| 463 | 468 | interpreter will be created automatically if it has not been already. |
| 464 | 469 | |
| 465 | -TH1 tclExpr Command | |
| -------------------- | ||
| 470 | +<a name="tclExpr"></a>TH1 tclExpr Command | |
| 471 | +----------------------------------------- | |
| 466 | 472 | |
| 467 | 473 | **This command requires the Tcl integration feature.** |
| 468 | 474 | |
| 469 | 475 | * tclExpr arg ?arg ...? |
| 470 | 476 | |
| 471 | 477 | Evaluates the Tcl expression and returns its result verbatim. If a Tcl |
| 472 | 478 | script error is generated, it will be transformed into a TH1 script error. |
| 473 | 479 | A Tcl interpreter will be created automatically if it has not been already. |
| 474 | 480 | |
| 475 | -TH1 tclInvoke Command | |
| ---------------------- | ||
| 481 | +<a name="tclInvoke"></a>TH1 tclInvoke Command | |
| 482 | +--------------------------------------------- | |
| 476 | 483 | |
| 477 | 484 | **This command requires the Tcl integration feature.** |
| 478 | 485 | |
| 479 | 486 | * tclInvoke command ?arg ...? |
| 480 | 487 | |
| 481 | 488 | Invokes the Tcl command using the supplied arguments. No additional |
| 482 | 489 | substitutions are performed on the arguments. A Tcl interpreter will |
| 483 | 490 | be created automatically if it has not been already. |
| 484 | 491 | |
| 485 | -TH1 tclReady Command | |
| --------------------- | ||
| 492 | +<a name="tclReady"></a>TH1 tclReady Command | |
| 493 | +------------------------------------------- | |
| 486 | 494 | |
| 487 | 495 | * tclReady |
| 488 | 496 | |
| 489 | 497 | Returns true if the binary has the Tcl integration feature enabled and it |
| 490 | 498 | is currently available for use by TH1 scripts. |
| 491 | 499 | |
| 492 | -TH1 trace Command | |
| ------------------ | ||
| 500 | +<a name="trace"></a>TH1 trace Command | |
| 501 | +------------------------------------- | |
| 493 | 502 | |
| 494 | 503 | * trace STRING |
| 495 | 504 | |
| 496 | 505 | Generates a TH1 trace message if TH1 tracing is enabled. |
| 497 | 506 | |
| 498 | -TH1 stime Command | |
| ------------------ | ||
| 507 | +<a name="stime"></a>TH1 stime Command | |
| 508 | +------------------------------------- | |
| 499 | 509 | |
| 500 | 510 | * stime |
| 501 | 511 | |
| 502 | 512 | Returns the number of microseconds of CPU time consumed by the current |
| 503 | 513 | process in system space. |
| 504 | 514 | |
| 505 | -TH1 utime Command | |
| ------------------ | ||
| 515 | +<a name="utime"></a>TH1 utime Command | |
| 516 | +------------------------------------- | |
| 506 | 517 | |
| 507 | 518 | * utime |
| 508 | 519 | |
| 509 | 520 | Returns the number of microseconds of CPU time consumed by the current |
| 510 | 521 | process in user space. |
| 511 | 522 | |
| 512 | -TH1 wiki Command | |
| ----------------- | ||
| 523 | +<a name="wiki"></a>TH1 wiki Command | |
| 524 | +----------------------------------- | |
| 513 | 525 | |
| 514 | 526 | * wiki STRING |
| 515 | 527 | |
| 516 | 528 | Renders STRING as wiki content. |
| 517 | 529 | |
| @@ -536,22 +536,22 @@ | ||
| 536 | 536 | Tcl commands: |
| 537 | 537 | |
| 538 | 538 | * th1Eval |
| 539 | 539 | * th1Expr |
| 540 | 540 | |
| 541 | -Tcl th1Eval Command | |
| -------------------- | ||
| 541 | +<a name="th1Eval"></a>Tcl th1Eval Command | |
| 542 | +----------------------------------------- | |
| 542 | 543 | |
| 543 | 544 | **This command requires the Tcl integration feature.** |
| 544 | 545 | |
| 545 | 546 | * th1Eval arg |
| 546 | 547 | |
| 547 | 548 | Evaluates the TH1 script and returns its result verbatim. If a TH1 script |
| 548 | 549 | error is generated, it will be transformed into a Tcl script error. |
| 549 | 550 | |
| 550 | -Tcl th1Expr Command | |
| -------------------- | ||
| 551 | +<a name="th1Expr"></a>Tcl th1Expr Command | |
| 552 | +----------------------------------------- | |
| 551 | 553 | |
| 552 | 554 | **This command requires the Tcl integration feature.** |
| 553 | 555 | |
| 554 | 556 | * th1Expr arg |
| 555 | 557 | |
| 556 | 558 |
| --- www/th1.md | |
| +++ www/th1.md | |
| @@ -166,90 +166,90 @@ | |
| 166 | All commands starting with "tcl", with the exception of "tclReady", |
| 167 | require the Tcl integration subsystem be included at compile-time. |
| 168 | Additionally, the "tcl" repository setting must be enabled at runtime |
| 169 | in order to successfully make use of these commands. |
| 170 | |
| 171 | TH1 anoncap Command |
| -------------------- | |
| 172 | |
| 173 | * anoncap STRING... |
| 174 | |
| 175 | Returns true if the anonymous user has all of the capabilities listed |
| 176 | in STRING. |
| 177 | |
| 178 | TH1 anycap Command |
| ------------------- | |
| 179 | |
| 180 | * anycap STRING |
| 181 | |
| 182 | Returns true if the current user user has any one of the capabilities |
| 183 | listed in STRING. |
| 184 | |
| 185 | TH1 artifact Command |
| --------------------- | |
| 186 | |
| 187 | * artifact ID ?FILENAME? |
| 188 | |
| 189 | Attempts to locate the specified artifact and return its contents. An |
| 190 | error is generated if the repository is not open or the artifact cannot |
| 191 | be found. |
| 192 | |
| 193 | TH1 checkout Command |
| --------------------- | |
| 194 | |
| 195 | * checkout ?BOOLEAN? |
| 196 | |
| 197 | Return the fully qualified directory name of the current checkout or an |
| 198 | empty string if it is not available. Optionally, it will attempt to find |
| 199 | the current checkout, opening the configuration ("user") database and the |
| 200 | repository as necessary, if the boolean argument is non-zero. |
| 201 | |
| 202 | TH1 combobox Command |
| --------------------- | |
| 203 | |
| 204 | * combobox NAME TEXT-LIST NUMLINES |
| 205 | |
| 206 | Generates and emits an HTML combobox. NAME is both the name of the |
| 207 | CGI parameter and the name of a variable that contains the currently |
| 208 | selected value. TEXT-LIST is a list of possible values for the |
| 209 | combobox. NUMLINES is 1 for a true combobox. If NUMLINES is greater |
| 210 | than one then the display is a listbox with the number of lines given. |
| 211 | |
| 212 | TH1 date Command |
| ----------------- | |
| 213 | |
| 214 | * date ?-local? |
| 215 | |
| 216 | Return a strings which is the current time and date. If the -local |
| 217 | option is used, the date appears using localtime instead of UTC. |
| 218 | |
| 219 | TH1 decorate Command |
| --------------------- | |
| 220 | |
| 221 | * decorate STRING |
| 222 | |
| 223 | Renders STRING as wiki content; however, only links are handled. No |
| 224 | other markup is processed. |
| 225 | |
| 226 | TH1 enable_output Command |
| -------------------------- | |
| 227 | |
| 228 | * enable_output BOOLEAN |
| 229 | |
| 230 | Enable or disable sending output when the combobox, puts, or wiki |
| 231 | commands are used. |
| 232 | |
| 233 | TH1 getParameter Command |
| ------------------------- | |
| 234 | |
| 235 | * getParameter NAME ?DEFAULT? |
| 236 | |
| 237 | Returns the value of the specified query parameter or the specified |
| 238 | default value when there is no matching query parameter. |
| 239 | |
| 240 | TH1 globalState Command |
| ------------------------ | |
| 241 | |
| 242 | * globalState NAME ?DEFAULT? |
| 243 | |
| 244 | Returns a string containing the value of the specified global state |
| 245 | variable -OR- the specified default value. The supported items are: |
| @@ -266,20 +266,20 @@ | |
| 266 | |
| 267 | Attempts to query for unsupported global state variables will result |
| 268 | in a script error. Additional global state variables may be exposed |
| 269 | in the future. |
| 270 | |
| 271 | TH1 hascap Command |
| ------------------- | |
| 272 | |
| 273 | * hascap STRING... |
| 274 | |
| 275 | Returns true if the current user has all of the capabilities listed |
| 276 | in STRING. |
| 277 | |
| 278 | TH1 hasfeature Command |
| ----------------------- | |
| 279 | |
| 280 | * hasfeature STRING |
| 281 | |
| 282 | Returns true if the binary has the given compile-time feature enabled. |
| 283 | The possible features are: |
| @@ -294,27 +294,27 @@ | |
| 294 | 1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._ |
| 295 | 1. **json** -- _Support for the JSON APIs._ |
| 296 | 1. **markdown** -- _Support for Markdown documentation format._ |
| 297 | 1. **unicodeCmdLine** -- _The command line arguments are Unicode._ |
| 298 | |
| 299 | TH1 html Command |
| ----------------- | |
| 300 | |
| 301 | * html STRING |
| 302 | |
| 303 | Outputs the STRING escaped for HTML. |
| 304 | |
| 305 | TH1 htmlize Command |
| -------------------- | |
| 306 | |
| 307 | * htmlize STRING |
| 308 | |
| 309 | Escape all characters of STRING which have special meaning in HTML. |
| 310 | Returns the escaped string. |
| 311 | |
| 312 | TH1 http Command |
| ----------------- | |
| 313 | |
| 314 | * http ?-asynchronous? ?--? url ?payload? |
| 315 | |
| 316 | Performs an HTTP or HTTPS request for the specified URL. If a |
| 317 | payload is present, it will be interpreted as text/plain and |
| @@ -322,35 +322,35 @@ | |
| 322 | be used. Upon success, if the -asynchronous option is used, an |
| 323 | empty string is returned as the result; otherwise, the response |
| 324 | from the server is returned as the result. Synchronous requests |
| 325 | are not currently implemented. |
| 326 | |
| 327 | TH1 httpize Command |
| -------------------- | |
| 328 | |
| 329 | * httpize STRING |
| 330 | |
| 331 | Escape all characters of STRING which have special meaning in URI |
| 332 | components. Returns the escaped string. |
| 333 | |
| 334 | TH1 linecount Command |
| ---------------------- | |
| 335 | |
| 336 | * linecount STRING MAX MIN |
| 337 | |
| 338 | Returns one more than the number of \n characters in STRING. But |
| 339 | never returns less than MIN or more than MAX. |
| 340 | |
| 341 | TH1 puts Command |
| ----------------- | |
| 342 | |
| 343 | * puts STRING |
| 344 | |
| 345 | Outputs the STRING unchanged. |
| 346 | |
| 347 | TH1 query Command |
| ------------------ | |
| 348 | |
| 349 | * query SQL CODE |
| 350 | |
| 351 | Runs the SQL query given by the SQL argument. For each row in the result |
| 352 | set, run CODE. |
| @@ -357,52 +357,52 @@ | |
| 357 | |
| 358 | In SQL, parameters such as $var are filled in using the value of variable |
| 359 | "var". Result values are stored in variables with the column name prior |
| 360 | to each invocation of CODE. |
| 361 | |
| 362 | TH1 randhex Command |
| -------------------- | |
| 363 | |
| 364 | * randhex N |
| 365 | |
| 366 | Returns a string of N*2 random hexadecimal digits with N<50. If N is |
| 367 | omitted, use a value of 10. |
| 368 | |
| 369 | TH1 regexp Command |
| ------------------- | |
| 370 | |
| 371 | * regexp ?-nocase? ?--? exp string |
| 372 | |
| 373 | Checks the string against the specified regular expression and returns |
| 374 | non-zero if it matches. If the regular expression is invalid or cannot |
| 375 | be compiled, an error will be generated. |
| 376 | |
| 377 | TH1 reinitialize Command |
| ------------------------- | |
| 378 | |
| 379 | * reinitialize ?FLAGS? |
| 380 | |
| 381 | Reinitializes the TH1 interpreter using the specified flags. |
| 382 | |
| 383 | TH1 render Command |
| ------------------- | |
| 384 | |
| 385 | * render STRING |
| 386 | |
| 387 | Renders the TH1 template and writes the results. |
| 388 | |
| 389 | TH1 repository Command |
| ----------------------- | |
| 390 | |
| 391 | * repository ?BOOLEAN? |
| 392 | |
| 393 | Returns the fully qualified file name of the open repository or an empty |
| 394 | string if one is not currently open. Optionally, it will attempt to open |
| 395 | the repository if the boolean argument is non-zero. |
| 396 | |
| 397 | TH1 searchable Command |
| ----------------------- | |
| 398 | |
| 399 | * searchable STRING... |
| 400 | |
| 401 | Return true if searching in any of the document classes identified |
| 402 | by STRING is enabled for the repository and user has the necessary |
| @@ -426,104 +426,104 @@ | |
| 426 | if {[searchable cdtw]} {...} |
| 427 | |
| 428 | This command is useful for enabling or disabling a "Search" entry on the |
| 429 | menu bar. |
| 430 | |
| 431 | TH1 setParameter Command |
| ------------------------- | |
| 432 | |
| 433 | * setParameter NAME VALUE |
| 434 | |
| 435 | Sets the value of the specified query parameter. |
| 436 | |
| 437 | TH1 setting Command |
| -------------------- | |
| 438 | |
| 439 | * setting name |
| 440 | |
| 441 | Gets and returns the value of the specified setting. |
| 442 | |
| 443 | TH1 styleHeader Command |
| ------------------------ | |
| 444 | |
| 445 | * styleHeader TITLE |
| 446 | |
| 447 | Render the configured style header. |
| 448 | |
| 449 | TH1 styleFooter Command |
| ------------------------ | |
| 450 | |
| 451 | * styleFooter |
| 452 | |
| 453 | Render the configured style footer. |
| 454 | |
| 455 | TH1 tclEval Command |
| -------------------- | |
| 456 | |
| 457 | **This command requires the Tcl integration feature.** |
| 458 | |
| 459 | * tclEval arg ?arg ...? |
| 460 | |
| 461 | Evaluates the Tcl script and returns its result verbatim. If a Tcl script |
| 462 | error is generated, it will be transformed into a TH1 script error. A Tcl |
| 463 | interpreter will be created automatically if it has not been already. |
| 464 | |
| 465 | TH1 tclExpr Command |
| -------------------- | |
| 466 | |
| 467 | **This command requires the Tcl integration feature.** |
| 468 | |
| 469 | * tclExpr arg ?arg ...? |
| 470 | |
| 471 | Evaluates the Tcl expression and returns its result verbatim. If a Tcl |
| 472 | script error is generated, it will be transformed into a TH1 script error. |
| 473 | A Tcl interpreter will be created automatically if it has not been already. |
| 474 | |
| 475 | TH1 tclInvoke Command |
| ---------------------- | |
| 476 | |
| 477 | **This command requires the Tcl integration feature.** |
| 478 | |
| 479 | * tclInvoke command ?arg ...? |
| 480 | |
| 481 | Invokes the Tcl command using the supplied arguments. No additional |
| 482 | substitutions are performed on the arguments. A Tcl interpreter will |
| 483 | be created automatically if it has not been already. |
| 484 | |
| 485 | TH1 tclReady Command |
| --------------------- | |
| 486 | |
| 487 | * tclReady |
| 488 | |
| 489 | Returns true if the binary has the Tcl integration feature enabled and it |
| 490 | is currently available for use by TH1 scripts. |
| 491 | |
| 492 | TH1 trace Command |
| ------------------ | |
| 493 | |
| 494 | * trace STRING |
| 495 | |
| 496 | Generates a TH1 trace message if TH1 tracing is enabled. |
| 497 | |
| 498 | TH1 stime Command |
| ------------------ | |
| 499 | |
| 500 | * stime |
| 501 | |
| 502 | Returns the number of microseconds of CPU time consumed by the current |
| 503 | process in system space. |
| 504 | |
| 505 | TH1 utime Command |
| ------------------ | |
| 506 | |
| 507 | * utime |
| 508 | |
| 509 | Returns the number of microseconds of CPU time consumed by the current |
| 510 | process in user space. |
| 511 | |
| 512 | TH1 wiki Command |
| ----------------- | |
| 513 | |
| 514 | * wiki STRING |
| 515 | |
| 516 | Renders STRING as wiki content. |
| 517 | |
| @@ -536,22 +536,22 @@ | |
| 536 | Tcl commands: |
| 537 | |
| 538 | * th1Eval |
| 539 | * th1Expr |
| 540 | |
| 541 | Tcl th1Eval Command |
| -------------------- | |
| 542 | |
| 543 | **This command requires the Tcl integration feature.** |
| 544 | |
| 545 | * th1Eval arg |
| 546 | |
| 547 | Evaluates the TH1 script and returns its result verbatim. If a TH1 script |
| 548 | error is generated, it will be transformed into a Tcl script error. |
| 549 | |
| 550 | Tcl th1Expr Command |
| -------------------- | |
| 551 | |
| 552 | **This command requires the Tcl integration feature.** |
| 553 | |
| 554 | * th1Expr arg |
| 555 | |
| 556 |
| --- www/th1.md | |
| +++ www/th1.md | |
| @@ -166,90 +166,90 @@ | |
| 166 | All commands starting with "tcl", with the exception of "tclReady", |
| 167 | require the Tcl integration subsystem be included at compile-time. |
| 168 | Additionally, the "tcl" repository setting must be enabled at runtime |
| 169 | in order to successfully make use of these commands. |
| 170 | |
| -------------------- | |
| 171 | <a name="anoncap"></a>TH1 anoncap Command |
| 172 | ----------------------------------------- |
| 173 | |
| 174 | * anoncap STRING... |
| 175 | |
| 176 | Returns true if the anonymous user has all of the capabilities listed |
| 177 | in STRING. |
| 178 | |
| ------------------- | |
| 179 | <a name="anycap"></a>TH1 anycap Command |
| 180 | --------------------------------------- |
| 181 | |
| 182 | * anycap STRING |
| 183 | |
| 184 | Returns true if the current user user has any one of the capabilities |
| 185 | listed in STRING. |
| 186 | |
| --------------------- | |
| 187 | <a name="artifact"></a>TH1 artifact Command |
| 188 | ------------------------------------------- |
| 189 | |
| 190 | * artifact ID ?FILENAME? |
| 191 | |
| 192 | Attempts to locate the specified artifact and return its contents. An |
| 193 | error is generated if the repository is not open or the artifact cannot |
| 194 | be found. |
| 195 | |
| --------------------- | |
| 196 | <a name="checkout"></a>TH1 checkout Command |
| 197 | ------------------------------------------- |
| 198 | |
| 199 | * checkout ?BOOLEAN? |
| 200 | |
| 201 | Return the fully qualified directory name of the current checkout or an |
| 202 | empty string if it is not available. Optionally, it will attempt to find |
| 203 | the current checkout, opening the configuration ("user") database and the |
| 204 | repository as necessary, if the boolean argument is non-zero. |
| 205 | |
| --------------------- | |
| 206 | <a name="combobox"></a>TH1 combobox Command |
| 207 | ------------------------------------------- |
| 208 | |
| 209 | * combobox NAME TEXT-LIST NUMLINES |
| 210 | |
| 211 | Generates and emits an HTML combobox. NAME is both the name of the |
| 212 | CGI parameter and the name of a variable that contains the currently |
| 213 | selected value. TEXT-LIST is a list of possible values for the |
| 214 | combobox. NUMLINES is 1 for a true combobox. If NUMLINES is greater |
| 215 | than one then the display is a listbox with the number of lines given. |
| 216 | |
| ----------------- | |
| 217 | <a name="date"></a>TH1 date Command |
| 218 | ----------------------------------- |
| 219 | |
| 220 | * date ?-local? |
| 221 | |
| 222 | Return a strings which is the current time and date. If the -local |
| 223 | option is used, the date appears using localtime instead of UTC. |
| 224 | |
| --------------------- | |
| 225 | <a name="decorate"></a>TH1 decorate Command |
| 226 | ------------------------------------------- |
| 227 | |
| 228 | * decorate STRING |
| 229 | |
| 230 | Renders STRING as wiki content; however, only links are handled. No |
| 231 | other markup is processed. |
| 232 | |
| -------------------------- | |
| 233 | <a name="enable_output"></a>TH1 enable_output Command |
| 234 | ----------------------------------------------------- |
| 235 | |
| 236 | * enable_output BOOLEAN |
| 237 | |
| 238 | Enable or disable sending output when the combobox, puts, or wiki |
| 239 | commands are used. |
| 240 | |
| ------------------------- | |
| 241 | <a name="getParameter"></a>TH1 getParameter Command |
| 242 | --------------------------------------------------- |
| 243 | |
| 244 | * getParameter NAME ?DEFAULT? |
| 245 | |
| 246 | Returns the value of the specified query parameter or the specified |
| 247 | default value when there is no matching query parameter. |
| 248 | |
| ------------------------ | |
| 249 | <a name="globalState"></a>TH1 globalState Command |
| 250 | ------------------------------------------------- |
| 251 | |
| 252 | * globalState NAME ?DEFAULT? |
| 253 | |
| 254 | Returns a string containing the value of the specified global state |
| 255 | variable -OR- the specified default value. The supported items are: |
| @@ -266,20 +266,20 @@ | |
| 266 | |
| 267 | Attempts to query for unsupported global state variables will result |
| 268 | in a script error. Additional global state variables may be exposed |
| 269 | in the future. |
| 270 | |
| ------------------- | |
| 271 | <a name="hascap"></a>TH1 hascap Command |
| 272 | --------------------------------------- |
| 273 | |
| 274 | * hascap STRING... |
| 275 | |
| 276 | Returns true if the current user has all of the capabilities listed |
| 277 | in STRING. |
| 278 | |
| ----------------------- | |
| 279 | <a name="hasfeature"></a>TH1 hasfeature Command |
| 280 | ----------------------------------------------- |
| 281 | |
| 282 | * hasfeature STRING |
| 283 | |
| 284 | Returns true if the binary has the given compile-time feature enabled. |
| 285 | The possible features are: |
| @@ -294,27 +294,27 @@ | |
| 294 | 1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._ |
| 295 | 1. **json** -- _Support for the JSON APIs._ |
| 296 | 1. **markdown** -- _Support for Markdown documentation format._ |
| 297 | 1. **unicodeCmdLine** -- _The command line arguments are Unicode._ |
| 298 | |
| ----------------- | |
| 299 | <a name="html"></a>TH1 html Command |
| 300 | ----------------------------------- |
| 301 | |
| 302 | * html STRING |
| 303 | |
| 304 | Outputs the STRING escaped for HTML. |
| 305 | |
| -------------------- | |
| 306 | <a name="htmlize"></a>TH1 htmlize Command |
| 307 | ----------------------------------------- |
| 308 | |
| 309 | * htmlize STRING |
| 310 | |
| 311 | Escape all characters of STRING which have special meaning in HTML. |
| 312 | Returns the escaped string. |
| 313 | |
| ----------------- | |
| 314 | <a name="http"></a>TH1 http Command |
| 315 | ----------------------------------- |
| 316 | |
| 317 | * http ?-asynchronous? ?--? url ?payload? |
| 318 | |
| 319 | Performs an HTTP or HTTPS request for the specified URL. If a |
| 320 | payload is present, it will be interpreted as text/plain and |
| @@ -322,35 +322,35 @@ | |
| 322 | be used. Upon success, if the -asynchronous option is used, an |
| 323 | empty string is returned as the result; otherwise, the response |
| 324 | from the server is returned as the result. Synchronous requests |
| 325 | are not currently implemented. |
| 326 | |
| -------------------- | |
| 327 | <a name="httpize"></a>TH1 httpize Command |
| 328 | ----------------------------------------- |
| 329 | |
| 330 | * httpize STRING |
| 331 | |
| 332 | Escape all characters of STRING which have special meaning in URI |
| 333 | components. Returns the escaped string. |
| 334 | |
| ---------------------- | |
| 335 | <a name="linecount"></a>TH1 linecount Command |
| 336 | --------------------------------------------- |
| 337 | |
| 338 | * linecount STRING MAX MIN |
| 339 | |
| 340 | Returns one more than the number of \n characters in STRING. But |
| 341 | never returns less than MIN or more than MAX. |
| 342 | |
| ----------------- | |
| 343 | <a name="puts"></a>TH1 puts Command |
| 344 | ----------------------------------- |
| 345 | |
| 346 | * puts STRING |
| 347 | |
| 348 | Outputs the STRING unchanged. |
| 349 | |
| ------------------ | |
| 350 | <a name="query"></a>TH1 query Command |
| 351 | ------------------------------------- |
| 352 | |
| 353 | * query SQL CODE |
| 354 | |
| 355 | Runs the SQL query given by the SQL argument. For each row in the result |
| 356 | set, run CODE. |
| @@ -357,52 +357,52 @@ | |
| 357 | |
| 358 | In SQL, parameters such as $var are filled in using the value of variable |
| 359 | "var". Result values are stored in variables with the column name prior |
| 360 | to each invocation of CODE. |
| 361 | |
| -------------------- | |
| 362 | <a name="randhex"></a>TH1 randhex Command |
| 363 | ----------------------------------------- |
| 364 | |
| 365 | * randhex N |
| 366 | |
| 367 | Returns a string of N*2 random hexadecimal digits with N<50. If N is |
| 368 | omitted, use a value of 10. |
| 369 | |
| ------------------- | |
| 370 | <a name="regexp"></a>TH1 regexp Command |
| 371 | --------------------------------------- |
| 372 | |
| 373 | * regexp ?-nocase? ?--? exp string |
| 374 | |
| 375 | Checks the string against the specified regular expression and returns |
| 376 | non-zero if it matches. If the regular expression is invalid or cannot |
| 377 | be compiled, an error will be generated. |
| 378 | |
| ------------------------- | |
| 379 | <a name="reinitialize"></a>TH1 reinitialize Command |
| 380 | --------------------------------------------------- |
| 381 | |
| 382 | * reinitialize ?FLAGS? |
| 383 | |
| 384 | Reinitializes the TH1 interpreter using the specified flags. |
| 385 | |
| ------------------- | |
| 386 | <a name="render"></a>TH1 render Command |
| 387 | --------------------------------------- |
| 388 | |
| 389 | * render STRING |
| 390 | |
| 391 | Renders the TH1 template and writes the results. |
| 392 | |
| ----------------------- | |
| 393 | <a name="repository"></a>TH1 repository Command |
| 394 | ----------------------------------------------- |
| 395 | |
| 396 | * repository ?BOOLEAN? |
| 397 | |
| 398 | Returns the fully qualified file name of the open repository or an empty |
| 399 | string if one is not currently open. Optionally, it will attempt to open |
| 400 | the repository if the boolean argument is non-zero. |
| 401 | |
| ----------------------- | |
| 402 | <a name="searchable"></a>TH1 searchable Command |
| 403 | ----------------------------------------------- |
| 404 | |
| 405 | * searchable STRING... |
| 406 | |
| 407 | Return true if searching in any of the document classes identified |
| 408 | by STRING is enabled for the repository and user has the necessary |
| @@ -426,104 +426,104 @@ | |
| 426 | if {[searchable cdtw]} {...} |
| 427 | |
| 428 | This command is useful for enabling or disabling a "Search" entry on the |
| 429 | menu bar. |
| 430 | |
| ------------------------- | |
| 431 | <a name="setParameter"></a>TH1 setParameter Command |
| 432 | --------------------------------------------------- |
| 433 | |
| 434 | * setParameter NAME VALUE |
| 435 | |
| 436 | Sets the value of the specified query parameter. |
| 437 | |
| -------------------- | |
| 438 | <a name="setting"></a>TH1 setting Command |
| 439 | ----------------------------------------- |
| 440 | |
| 441 | * setting name |
| 442 | |
| 443 | Gets and returns the value of the specified setting. |
| 444 | |
| ------------------------ | |
| 445 | <a name="styleHeader"></a>TH1 styleHeader Command |
| 446 | ------------------------------------------------- |
| 447 | |
| 448 | * styleHeader TITLE |
| 449 | |
| 450 | Render the configured style header. |
| 451 | |
| ------------------------ | |
| 452 | <a name="styleFooter"></a>TH1 styleFooter Command |
| 453 | ------------------------------------------------- |
| 454 | |
| 455 | * styleFooter |
| 456 | |
| 457 | Render the configured style footer. |
| 458 | |
| -------------------- | |
| 459 | <a name="tclEval"></a>TH1 tclEval Command |
| 460 | ----------------------------------------- |
| 461 | |
| 462 | **This command requires the Tcl integration feature.** |
| 463 | |
| 464 | * tclEval arg ?arg ...? |
| 465 | |
| 466 | Evaluates the Tcl script and returns its result verbatim. If a Tcl script |
| 467 | error is generated, it will be transformed into a TH1 script error. A Tcl |
| 468 | interpreter will be created automatically if it has not been already. |
| 469 | |
| -------------------- | |
| 470 | <a name="tclExpr"></a>TH1 tclExpr Command |
| 471 | ----------------------------------------- |
| 472 | |
| 473 | **This command requires the Tcl integration feature.** |
| 474 | |
| 475 | * tclExpr arg ?arg ...? |
| 476 | |
| 477 | Evaluates the Tcl expression and returns its result verbatim. If a Tcl |
| 478 | script error is generated, it will be transformed into a TH1 script error. |
| 479 | A Tcl interpreter will be created automatically if it has not been already. |
| 480 | |
| ---------------------- | |
| 481 | <a name="tclInvoke"></a>TH1 tclInvoke Command |
| 482 | --------------------------------------------- |
| 483 | |
| 484 | **This command requires the Tcl integration feature.** |
| 485 | |
| 486 | * tclInvoke command ?arg ...? |
| 487 | |
| 488 | Invokes the Tcl command using the supplied arguments. No additional |
| 489 | substitutions are performed on the arguments. A Tcl interpreter will |
| 490 | be created automatically if it has not been already. |
| 491 | |
| --------------------- | |
| 492 | <a name="tclReady"></a>TH1 tclReady Command |
| 493 | ------------------------------------------- |
| 494 | |
| 495 | * tclReady |
| 496 | |
| 497 | Returns true if the binary has the Tcl integration feature enabled and it |
| 498 | is currently available for use by TH1 scripts. |
| 499 | |
| ------------------ | |
| 500 | <a name="trace"></a>TH1 trace Command |
| 501 | ------------------------------------- |
| 502 | |
| 503 | * trace STRING |
| 504 | |
| 505 | Generates a TH1 trace message if TH1 tracing is enabled. |
| 506 | |
| ------------------ | |
| 507 | <a name="stime"></a>TH1 stime Command |
| 508 | ------------------------------------- |
| 509 | |
| 510 | * stime |
| 511 | |
| 512 | Returns the number of microseconds of CPU time consumed by the current |
| 513 | process in system space. |
| 514 | |
| ------------------ | |
| 515 | <a name="utime"></a>TH1 utime Command |
| 516 | ------------------------------------- |
| 517 | |
| 518 | * utime |
| 519 | |
| 520 | Returns the number of microseconds of CPU time consumed by the current |
| 521 | process in user space. |
| 522 | |
| ----------------- | |
| 523 | <a name="wiki"></a>TH1 wiki Command |
| 524 | ----------------------------------- |
| 525 | |
| 526 | * wiki STRING |
| 527 | |
| 528 | Renders STRING as wiki content. |
| 529 | |
| @@ -536,22 +536,22 @@ | |
| 536 | Tcl commands: |
| 537 | |
| 538 | * th1Eval |
| 539 | * th1Expr |
| 540 | |
| -------------------- | |
| 541 | <a name="th1Eval"></a>Tcl th1Eval Command |
| 542 | ----------------------------------------- |
| 543 | |
| 544 | **This command requires the Tcl integration feature.** |
| 545 | |
| 546 | * th1Eval arg |
| 547 | |
| 548 | Evaluates the TH1 script and returns its result verbatim. If a TH1 script |
| 549 | error is generated, it will be transformed into a Tcl script error. |
| 550 | |
| -------------------- | |
| 551 | <a name="th1Expr"></a>Tcl th1Expr Command |
| 552 | ----------------------------------------- |
| 553 | |
| 554 | **This command requires the Tcl integration feature.** |
| 555 | |
| 556 | * th1Expr arg |
| 557 | |
| 558 |