You are not logged in.
does anybody know a good way to make a (or more) fortune-mod(s) out of http://www.wikiquote.org/ ?
The impossible missions are the only ones which succeed.
Offline
All of them ????????? :-) I'll think about it.
But before we do anything we should check if it's legal and ok with wikiquote rules.
Offline
All of them ????????? :-) I'll think about it.
But before we do anything we should check if it's legal and ok with wikiquote rules.
yes, of course all of them
8)
actually i'm searching for a easy way (a perl script or something like that) that can be given to wikiquote admins and they then can make a weekly update of different fortune-mods (fortune-mods-wikiquote-people, -occupations, -literature, -films, -tv-shows, -themes)
about legality:
The impossible missions are the only ones which succeed.
Offline
Have you seen this ? http://download.wikimedia.org/index_wikiquote.php
There are official dumps of wikiquote database. Now it's just a matter of making a conversion script to the fortune cookies file format. It shouldn't be too complicated, I think.
I have to leave my workplace now but I'll look into these dumps later today. Stay tuned :-)
Offline
Have you seen this ? http://download.wikimedia.org/index_wikiquote.php
There are official dumps of wikiquote database. Now it's just a matter of making a conversion script to the fortune cookies file format. It shouldn't be too complicated, I think.
I have to leave my workplace now but I'll look into these dumps later today. Stay tuned :-)
no, i didn't know something like this exists
WOW! - thanx for letting me know
the sql file for en is about 9MB big
however, i have no idea where to start handling it
The impossible missions are the only ones which succeed.
Offline
Ok. I admit it. I was wrong. And after 4 hours of trying to convert these sql dumps to something useful I give up.
Wiki sql structure is too simple and the quote text is mixed with a lot of formatting stuff and other wiki tags. They are not easy to be removed. I used sed to clear the file with regular expressions but it turned out that even single record has to be splited further with a very wise algorithm (I could only produce very bad looking author, author quotes pairs).
Maybe some very advanced awk/perl script would be better in this situation but I think it's just not worth it. You would have to implement the whole wiki rendering engine in it to properly remove unnecessary tags and formatting to make it more apropriate to be used as fortune cookies files (I also used some perl script found on the net to convert sql dump into static html but this is not useful too - to many small files, errors, formatting, etc).
I still think it is possible to convert these files but I also think it would be easier to achieve the same effect just by copying/pasting/manually reformatting quotes from the web pages :-) (they don't like autospiders/bots though so be careful!).
Or maybe we'll just wait until wikiquote change the format to something more usable ;-)
Offline