Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorials:gopher [2012/01/28 16:19] – [Mole examples] chalstutorials:gopher [2012/01/28 19:29] memnon
Line 126: Line 126:
 ===== Gopher log ===== ===== Gopher log =====
  
-A gopher log ("glog" or "phlog") is similar to a blog, but on gopherspace. You can create your phlog and add it to the [[http://phlogosphere.org/|phogosphere]].+A gopher log ("glog" or "phlog") is similar to a blog, but on gopherspace. You can create your phlog and add it to the [[http://phlogosphere.org/|phlogosphere]].
  
 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 "Continued..." link that will point to the full post.  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 "Continued..." link that will point to the full post. 
Line 273: Line 273:
 When you access the script via gopher://sdfeu.org/7/users/YOUR-USERNAME/figlet.cgi , your browser will ask you to input some text (the way it ask depends on the browser), then it will show your text as figlet transforms it. When you access the script via gopher://sdfeu.org/7/users/YOUR-USERNAME/figlet.cgi , your browser will ask you to input some text (the way it ask depends on the browser), then it will show your text as figlet transforms it.
  
-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's also another thing to stress. In that example, and in content that will be server as a virtual directory (or with an itemtype 1, or 7), won't be displayed if you use access your script via floodgap proxy (and maybe others). In this case you will need to format the output of your script. Luckily this is very easy. For instance, in the figlet.cgi example you will need to modify the echo ... line this way: +Besides what was said in the last paragraph of the figlet.cgi example, there's also another thing to stress. In that example, and in content that will be server as a virtual directory (or with an itemtype 1, or 7), won't be displayed if you access your script via floodgap proxy (and maybe others). In this case you will need to format the output of your script. Luckily this is very easy. For instance, in the figlet.cgi example you will need to modify the echo ... line this way: 
   echo "i$i<TAB><TAB>error.host<TAB>1"   echo "i$i<TAB><TAB>error.host<TAB>1"
 where <TAB> is a tab character (you should already know this!) and error.host and 1 are, respectively, a fake server and port number (you could also have written fake instead of error.host and 300 instead of 1). where <TAB> is a tab character (you should already know this!) and error.host and 1 are, respectively, a fake server and port number (you could also have written fake instead of error.host and 300 instead of 1).