This repository has been archived on 2024-01-11. You can view files and clone it, but cannot push or open issues or pull requests.
library/static/man.php

31 lines
960 B
PHP

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>the south london library</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='/main.css'>
</head>
<body>
<!-- <form method="get" name="commandform">
<input id="search"
class="search"
type="text"
name="command"
placeholder="&#128269; enter a command here">
<input type="submit" name="submit" style="display: none" />
</form>
<?php
$command = $_GET["command"];
$output=null;
$retval=null;
exec('man --html=cat'.' '.escapeshellarg($command) , $output, $retval);
echo "Returned with status $retval and output:\n";
foreach ($output as $line) { ?>
<?=$line?>
<?php }?> -->
okay so apparently my godawful script segfaults groff somehow. so no manpages for now. just use your terminal.
</body>
</html>