t* hacker news on gopher
URI git clone git://git.codevoid.de/hn-gopher
DIR Log
DIR Files
DIR Refs
---
DIR commit 837b822cd29a7435100daf6426e86126dcb02dca
DIR parent 5e4345a3d84df25425341020f60ab7385bb8b2a5
URI Author: Stefan Hagen <sh+git[at]codevoid[dot]de>
Date: Mon, 30 Jul 2018 22:05:26 +0200
Add backlink to home
Diffstat:
M hn-scraper.pl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
DIR diff --git a/hn-scraper.pl b/hn-scraper.pl
t@@ -21,7 +21,7 @@ my $server = "hn.algolia.com";
my $api_uri = "/api/v1";
my $go_root = "/srv/codevoid-gopher";
my $go_path = "/hn";
-my $index_count = 60;
+my $index_count = 100;
my $logo =" _______ __ _______\n";
$logo .="| | |.---.-..----.| |--..-----..----. | | |.-----..--.--.--..-----.\n";
t@@ -390,8 +390,10 @@ for my $id (@$json_top) {
close($fh);
}
$count++;
+ # OPTIMIZE: Add pagignation? (who goes to page 2 anyway...)
if($count > $index_count) { last; }
}
+$index_out .= "\n[1|<- go back home|/|server|port]";
saveFile($index_out, "index.gph");
exit 0;