+1 (belated) This is the book Rich and I used for the practical aspects of the independent study. Was helpful for learning more about Processing specifically, as well as gaining exposure to visualizations and programming in a more general sense.
Joomla to Mediawiki help
My programming skills are near nonexistent, so I need some serious help here.
I have some pages (about 150) in a Joomla install that I want to open up to collaborative editing. I figure the best way to do this is to put the content of those Joomla pages into a wiki. Since both are based on MySQL databases, I figure exporting, converting and importing is my best bet.
(I’m figuring I’ll do the export and import using CSV files and phpMyAdmin, because I know how to do that and learning the database commands seems more difficult than it’s worth here. Ditto for massive regexing, plus the fact that I don’t know all the tags that might be lurking in the content.)
Perl seems to have the best combination of capabilities, but the CSV import extension returns an array of hashes. I know that data types can nest somewhat in Perl, but I have no idea how to traverse the hashes in the array to get the two fields out of the Joomla database export. Concatenating the fields should be simple, and the HTML-to-Wiki conversion extension looks reasonably easy. But again, I don’t know to create the CSV to import into the Wiki database.
PHP has a function to read CSV a line at a time, making the variable much less complex, but I can’t find a converter from HTML to MediaWiki.
Python has been a bust so far as finding anything.
So, any direction? Things I have missed or not considered?
Leave a Reply
You must be logged in to post a comment.
3 Answers
Not really an answer, but what the news Web world really needs is a commenting system that has all the reputation bells and whistles of the HacksHackers/Stack Overflow/Server Fault/Super User/Doctype systems.
It's awesomeness stems from that not only does it foster accountability, it's "sticky," i.e. it rewards/encourages return visits and responsible participation. (And that will save the news industry before the iPad does.) The more I play with it, the more I like it.
<Swipe at Microsoft>
It's certainly one of the more impressive things I've seen built with C#/ASP.NET/IIS
</Swipe at Microsoft>
And if someone builds a reputationally-deep commenting system with Django/Python, so much the better! : )
Leave a Reply
You must be logged in to post a comment.
As a side note, if you're interested in Processing, I found the O'Reilly book "Visualizing Data" to be excellent. The book goes from 'hello world' level to actually building some of the visualizations on Ben Fry's site.
Make sure that you download the errata though, as there are a number of errors in the code as printed that could trip up a beginner.
Leave a Reply
You must be logged in to post a comment.
Despite "Python has been a bust," here's a possible Python-based approach:
Django makes it possible to point it at an existing, legacy database:
http://docs.djangoproject.com/en/dev/howto/legacy-databases/
Here's a real-world series on how the above works:
http://www.mechanicalgirl.com/view/working-django-admin-and-legacy-databases-part-1/
http://www.mechanicalgirl.com/view/working-django-admin-and-legacy-databases-part-2/
http://www.mechanicalgirl.com/view/working-django-admin-and-legacy-databases-part-3/
Once you've got a Django handle on your data, it's easy to pull it out in a variety of editable, serialized formats (xml, json, yaml):
http://docs.djangoproject.com/en/dev/ref/django-admin/#dumpdata-appname-appname-appname-model
So then, you'll be able to re-arrange your data to fit into something like this (pretty nifty) already-built Django wiki app (with revision and markup support). http://code.google.com/p/django-wikiapp/
Is it a lot? Sure as heck is, but if you intend for your project to be around, one of Python's (and by extension Django's) selling points is maintainability.
Other great resources for the journey are the Google group:
http://groups.google.com/group/django-users/
and the IRC channel:
irc://irc.freenode.net/
Also — and this is the important bit — now you'll have your data in a framework, as opposed to a more narrowly focused application such as Joomla or Mediawiki, so down the road when yet another bit of inspiration hits you, you'll be in a much better shape to build out your framework rather than jumping through hoops trying to bend an app into doing something for which is wasn't designed!
Leave a Reply
You must be logged in to post a comment.
If you find processing useful but aren't so much into Java, give Nodebox a try. It's a similar thing, but it uses Python instead.
Leave a Reply
You must be logged in to post a comment.
Is the Joomla site still running? If so, perhaps scraping it might be better/easier than extracting from the db, depending on how simple the internal structure of Joomla is, I don't have experience with it personally. Or perhaps extract it directly from the db and then use a script to tidy?
I've used MediaWiki quite a lot in the past and I wouldn't ever try inserting anything directly in to the MediaWiki database. It's really quite complex with various dependencies and such.
Since it is only 150 articles, you could either script a http post to create new articles in the wiki, or just copy and paste, as no doubt they need editing/categorising along the way anyhow.
Leave a Reply
You must be logged in to post a comment.
Your Answer
Please login to post questions.

Lotta people like http://github.com/ericflo/django-threadedcomments
Whichever Django comment app you use, you’ll want to mix in some anti-spam. I really like reCaptcha. Here’s one how-to:
http://www.chrisumbel.com/article/recaptcha_with_django
Lotta people like django-threadedcomments
Whichever Django comment app you use, you’ll want to mix in some anti-spam. I really like reCaptcha. Here’s one how-to: http://www.chrisumbel.com/article/recaptcha_with_django
+1 for universal reputation system
What are the best Django comment systems outside of contrib.comments?