# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 23
# self = https://watcher.sour.is/conv/phhl5bq
Hi @<~duriny https://envs.net/~duriny/twtxt.txt> may I ask you how you have done that fortune output on your website? Thanks
@carsten I am guessing some server side CGI, possibly just shell, or PHP. But almost sure shell.
@david Got it! I was getting 127 as return code, command note found, using full path for fortune (/usr/games/fortune) did the trick. Now it works.
@carsten Using zs or mkws or some other static site generator (SSg)? 🤔
@carsten Using zs or mkws or some other static site generator (SSg)? 🤔
@carsten Really simple with just pp or https://mkws.sh, check it out https://mkws.sh/pp.html

<@doctype html>
fortune

fortune




#!
/usr/games/fortune
#!

@adi Even simpler with zs 😅


<!doctype html>
<head>
  <title>fortune</title>
</head>
<body>
  <h1>fortune</h1>
  <pre><code>{{ /usr/games/fortune }}</code></pre>
</body>
</html>


😂
@adi Even simpler with zs 😅


<!doctype html>
<head>
  <title>fortune</title>
</head>
<body>
  <h1>fortune</h1>
  <pre><code>{{ /usr/games/fortune }}</code></pre>
</body>
</html>


😂
@carsten you're on the right track :) check out https://help.envs.net/website
@carsten If you're interesed in the source of my home page: http://sprunge.us/qi3eGf
@carsten If you're interested in the source of my home page: http://sprunge.us/qi3eGf
@prologic How is that simpler?
But there:

<@doctype html>
fortune

fortune



$(/usr/games/fortune)
Personally I think <!--#include virtual=cgi-bin/fortune.sh--> is the simplest, but I'm an envs.neter, I'm clearly biased :D
@<~duriny https://envs.net/~duriny/twtxt.txt> But you're serving as CGI. 😁
As I said, I'm clearly biased ;)
But! You could also run pp under CGI!
pp as in the perl compiler/packager thingy? Yeah you can run any shell script in a server side CGI, as long as the permissions and PATH are all correct. Although envs.net already supports perl for CGI, so you could just use <!--#include virtual="cgi-bin/foo.pl" --> rather than calling pp
@<~duriny https://envs.net/~duriny/twtxt.txt> No, pp as in http://mkws.sh/pp.html
huh, neat
@<~duriny https://envs.net/~duriny/twtxt.txt> (#phhl5bq) ah thanks. welcome that
@<~duriny https://envs.net/~duriny/twtxt.txt> (#phhl5bq) thanks again. me also user of envs. very nice server.
@adi ah even nicer. I saw mkws for the first time. I like that kind of simplicity
@carsten Thanks! Have fun with it if you get to use it!