]> gitweb.factorcode.org Git - factor.git/commitdiff
wikipedia: fix links
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 4 Mar 2022 17:23:15 +0000 (09:23 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 4 Mar 2022 17:23:15 +0000 (09:23 -0800)
extra/wikipedia/wikipedia.factor

index 55a3349135d3ff035e2dd8b397c59dce90ba83b8..bdc09a8a02579e6df0c3b7647741213709d5c963 100644 (file)
@@ -19,7 +19,7 @@ language [ "en" ] initialize
 <PRIVATE
 
 : wikipedia-url ( path -- url )
-    language get swap "http://%s.wikipedia.org/wiki/%s" sprintf >url ;
+    language get swap "http://%s.wikipedia.org/%s" sprintf >url ;
 
 : header. ( string -- )
     H{ { font-size 20 } { font-style bold } } format nl ;
@@ -63,7 +63,7 @@ language [ "en" ] initialize
     [ items>sequence ] assoc-map ;
 
 : historical-url ( timestamp -- url )
-    "%B_%d" strftime wikipedia-url ;
+    "wiki/%B_%d" strftime wikipedia-url ;
 
 : historical-get ( timestamp -- xml )
     historical-url http-get nip string>xml ;