This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:gopher [2012/01/28 16:17] – [Mole examples] chals | tutorials:gopher [2012/01/28 19:57] (current) – memnon | ||
---|---|---|---|
Line 22: | Line 22: | ||
===== Creating your Gopherspace ===== | ===== Creating your Gopherspace ===== | ||
- | You can use the command " | + | You can use the command " |
You can use mkgopher to publish documents, create directories, | You can use mkgopher to publish documents, create directories, | ||
Line 126: | Line 126: | ||
===== Gopher log ===== | ===== Gopher log ===== | ||
- | A gopher log (" | + | A gopher log (" |
Maintaining a glog consists basically (but not necessarily) in creating an entry (in your log directory) and modifying your phlog gophermap so that the new entry is displayed with its creation date. Here is a script that you can run on SDF-EU called mkgopherentry that will allow you to do exactly that. It will also extract the first paragraph from the entry and will add it on the gophermap with a " | Maintaining a glog consists basically (but not necessarily) in creating an entry (in your log directory) and modifying your phlog gophermap so that the new entry is displayed with its creation date. Here is a script that you can run on SDF-EU called mkgopherentry that will allow you to do exactly that. It will also extract the first paragraph from the entry and will add it on the gophermap with a " | ||
Line 258: | Line 258: | ||
=== figlet.cgi === | === figlet.cgi === | ||
- | You can add some interactivity by using the itemtype 7. This itemtype is intended to make it possible to type some characters in a search field in your browser. However, you can use it to make it possible to pass arguments to your scripts. The following example will use some text you type in the search field and will pass it through the program figlet. | + | You can add some interactivity by using the itemtype 7. This itemtype is intended to make it possible to type some characters in a search field in your browser. However, you can use it to make it possible to pass arguments to your scripts. The following example will use the text you type in the search field and will pass it through the program figlet. |
<code bash> | <code bash> | ||
Line 273: | Line 273: | ||
When you access the script via gopher:// | When you access the script via gopher:// | ||
- | The i in the echo... line is important here. Indeed, the document is been accessed with an itemtype 7 (but the same applies for itemtype 1), so the document should be structured similarly to gophermaps. It's not a gophermap, though. That's why you need to explicitily state the line should be displayed as simple (or inline) text. | + | The i in the echo... line is important here. Indeed, the document is being accessed with an itemtype 7 (but the same applies for itemtype 1), so the document should be structured similarly to gophermaps. It's not a gophermap, though. That's why you need to explicitily state the line should be displayed as simple (or inline) text. |
==== Caveat ==== | ==== Caveat ==== | ||
- | Besides what was said in the last paragraph of the figlet.cgi example, there' | + | Besides what was said in the last paragraph of the figlet.cgi example, there' |
echo " | echo " | ||
where <TAB> is a tab character (you should already know this!) and error.host and 1 are, respectively, | where <TAB> is a tab character (you should already know this!) and error.host and 1 are, respectively, | ||