Rosetta Code:Village Pump/RC extraction Tool and Task

Revision as of 15:40, 2 May 2011 by rosettacode>Mwn3d (I think SMW might be able to solve most of this)
RC extraction Tool and Task
This is a particular discussion thread among many which consider Rosetta Code.

Summary

Extracting material from RC specific to one language

Discussion

Idea

I would like to be able to include all RC tasks and documentation for a specific langauge (Language of Your Choice = LOYC) in a language distro. In a Contributions/RosettaCode folder.

This could be pulled manually, but ...

There are a bunch of packaging issues including documentation (like task name URL, etc.) that need to be worked out.

Some automation would help but it isn't straight forward and some of it may require more/different access to RC. Getting the automation to do most of the heavy lifting is one possibility, another is to use it to make manual extraction (what changed since the last pull) easier.

Possibilities:

  • Extract all the pages with code for LOYC
  • Extract just the task description and language segment
  • Extract the date the language segment last changed
  • Extract the code segments into separate files.

Doing all this from the html could be messy.

A read only access to the wiki editor might be easier.

Building some kind of automatic SMW template/pages might make this information more accessible.

Thoughts are appreciated. --Dgamey 13:33, 2 May 2011 (UTC)

What do you mean by "language segment"? There are big plans (not very detailed or solid plans, but plans) to use SMW to add examples to the site. The idea is/was to have each example as its own page with SMW tags for what language it was in, what task it was for, probably a subheading if necessary (e.g. "Iterative" or "Recursive"), and other metadata. A task page would then transclude the content from example pages which implement that task. "Transclusion" was a new concept for me so I will explain it in case it's not clear. Transcluding a page basically copies its wiki-rendered content on to a destination page. In this case it would take the content from an example page and place it (in alphabetical order by language) on the task page. Hopefully we could get edit links to link to the example pages and other little things like that to work, but editing the actual task page would not be an option to edit an example. The task page content would just be "{{task|Category}}Description description. Example input/output. {{template to transclude examples by task name}}". If that sort of system were put in place, the ideas listed here would probably be simple SMW queries. --Mwn3d 15:40, 2 May 2011 (UTC)