This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub get_bookshelf { | |
my $rep = $ua.get("$bbaseurl$bookid"); | |
if ! $rep.is-success { | |
die "Can't contact $bbaseurl"; | |
} | |
# first we need to know the number of page | |
my $xmldoc = parse-html($rep.content, :TAG<div>, :class<page_list>, :SINGLE, :nowhitespace); | |
my @pages = $xmldoc.elements(:TAG<li>, :RECURSE); | |
my $number_of_page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Config::Simple::Role; | |
class Config::Simple does Config::Simple::Role { | |
multi method new($filename) { | |
return self.bless(:filename($filename)); | |
} | |
multi method new($filename, Str :$b) { | |
my $module = "Config::Simple::$b"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Gumbo::Parser; # replace with HTML::Parser::XML | |
use XML; | |
my $parser = Gumbo::Parser.new; | |
my $html = qqx{wget -o /dev/null -O - https://www.fimfiction.net/bookshelf/149291/}; | |
say "Getting/parsing a wegpage with a quite huge xml tree, prepare yourself some coffee if you use H:P:X"; | |
say "webpage is "~$html.chars~" size."; | |
my $xml = $parser.parse($html); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use lib './', '/root/testmodif/s/perl6-html-parser-xml/lib/'; | |
use FicClass; | |
use Gumbo; | |
use StoryFactory; | |
use HTTP::UserAgent; | |
use HTTP::Cookie; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use Gumbo; | |
use XML; | |
use HTTP::UserAgent; | |
#We define some base url, notice that I don't use https | |
my $bbaseurl = "http://www.fimfiction.net/bookshelf/"; | |
my $fimbaseurl = "http://www.fimfiction.net/"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@testperl6:~/piko/DBIish# perl6 -e 'use NativeCall; sub sqlite3_libversion_number() returns int32 is native("libsqlite3.so") is export { ... }; say sqlite3_libversion_number()' | |
3008007 | |
root@testperl6:~/piko/DBIish# perl6 -e 'use NativeCall; sub sqlite3_libversion_number() returns Int is native("libsqlite3.so") is export { ... }; say sqlite3_libversion_number()' | |
895812289686267399 | |
root@testperl6:~/piko/DBIish# uname -a | |
Linux testperl6 3.16.0-4-586 #1 Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09) i686 GNU/Linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Gumbo::Parser; # replace with HTML::Parser::XML | |
use XML; | |
my $parser = Gumbo::Parser.new; | |
my $html = qqx{wget -o /dev/null -O - https://www.fimfiction.net/bookshelf/149291/}; | |
say "Getting/parsing a wegpage with a quite huge xml tree, prepare yourself some coffee if you use H:P:X"; | |
say "webpage is "~$html.chars~" size."; | |
my $xml = $parser.parse($html); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local camera_x | |
local camera_y | |
local link_x | |
local link_y | |
-- $0114 | |
-- $6C[0x01] - Indicates whether you are standing in a doorway | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lorom | |
; $04CB is free ram, let use 12x2 bytes for our changes | |
!TABLE_ICHANGE = $04CB | |
!CPY_ORIGINAL_INPUT = $7C | |
; $80-81 copy of input | |
!CPY_INPUT = $80 | |
!ROOM_COUNTER = $2B2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local framestarted = 0 | |
function savestateloaded() | |
framestarted = 0; | |
end | |
event.onloadstate(savestateloaded); | |
function to_rta(ftime) | |
local cpy = ftime |
OlderNewer