xkcd: need to html-unescape.
parent
4fce958402
commit
9f44b1c37a
|
@ -1,11 +1,11 @@
|
||||||
! Copyright (C) 2011 John Benediktsson
|
! Copyright (C) 2011 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: accessors formatting html.parser html.parser.analyzer
|
USING: accessors formatting html.entities html.parser
|
||||||
html.parser.printer http.client images.http images.viewer
|
html.parser.analyzer html.parser.printer http.client images.http
|
||||||
images.viewer.prettyprint io io.streams.string kernel parser
|
images.viewer images.viewer.prettyprint io io.streams.string
|
||||||
prettyprint.custom prettyprint.sections regexp sequences strings
|
kernel parser prettyprint.custom prettyprint.sections regexp
|
||||||
ui wrap.strings ;
|
sequences strings ui wrap.strings ;
|
||||||
|
|
||||||
IN: xkcd
|
IN: xkcd
|
||||||
|
|
||||||
|
@ -22,7 +22,8 @@ IN: xkcd
|
||||||
: comic-text ( url -- string )
|
: comic-text ( url -- string )
|
||||||
http-get nip parse-html
|
http-get nip parse-html
|
||||||
"transcript" find-by-id-between
|
"transcript" find-by-id-between
|
||||||
[ html-text. ] with-string-writer ;
|
[ html-text. ] with-string-writer
|
||||||
|
html-unescape ;
|
||||||
|
|
||||||
: comic-text. ( url -- )
|
: comic-text. ( url -- )
|
||||||
comic-text 80 wrap-string print ;
|
comic-text 80 wrap-string print ;
|
||||||
|
|
Loading…
Reference in New Issue