Converting wiki templates to HTML
I'm experimenting with wikitext and wikipedia-client gems to obtain
content from the wikipedia api. Is there a javascript library and or
rubygem that helps with the javascript templates being used in the wiki
markdown?
Example:
require 'wikipedia-client'
page = Wikipedia.find( 'Mountain' ).content
parsed = Wikitext::Parser.new.parse(page)
# parsed => "At {{convert|6593|ft|m|0|abbr=on}} it is the third highest
peak in the national park"
See the parsed {{values}} ? I'm wondering if there is a viable solution
for converting the template components of wikipedia.
No comments:
Post a Comment