Hello all !
After participating on the jitisi meeting today I edited this page
https://picolisp.com/wiki/?PCE and added direct links to rosettacode
picolisp examples (with #PicoLisp).
I used this two lua scripts to get/generate then:
====
--local html = io.open("roseta-code.html"):read("*a")
local base_url = "http://rosettacode.org"
local html = io.popen("curl " .. base_url ..
"/wiki/Category:PicoLisp"):read("*a")
html = html:gsub("<h2>Pages in category
\"PicoLisp\"</h2>.-</div></div></div><div class=\"printfooter\">",
function(m)
return m:gsub("(/wiki[^\"]+)(\" title=)" ,
function(link, title)
return base_url .. link .. "#PicoLisp" .. title
end)
end)
print(html)
====
====
local html = io.open("roseta-code.html"):read("*a")
--local base_url = "http://rosettacode.org"
--local html = io.popen("curl " .. base_url ..
"/wiki/Category:PicoLisp"):read("*a")
local code_links = html:match("<h2>Pages in category
\"PicoLisp\"</h2>.-</div></div></div><div class=\"printfooter\">")
for link, title in code_links:gmatch("href=\"([^\"]+).->([^<]+)") do
print( string.format("-{^{%s %s}}", link, title))
end
====
Again thank you for all your time and great work !
Cheers !
On 3/7/20 12:21, Alexander Burger wrote:
On Fri, Jul 03, 2020 at 12:53:03AM -0700, C K Kashyap wrote:
Oops....I did not plan my day well...its at 1am here :(....I'll have to
join in the morning to see if the meeting is still on.
Oh, a pity! Sorry, we just finished :(
Surely in 2 weeks it is better (16 UTC)
☺/ A!ex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe