You are not logged in.

#1 2004-09-30 13:18:26

dp
Member
From: Aarau, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

fortune-mod-wikiquote-$LC

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

#2 2004-09-30 14:53:12

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: fortune-mod-wikiquote-$LC

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

#3 2004-09-30 15:05:55

dp
Member
From: Aarau, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: fortune-mod-wikiquote-$LC

lanrat wrote:

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  roll  8)  big_smile

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:

wikiquote is gnu-fdl.png


The impossible missions are the only ones which succeed.

Offline

#4 2004-09-30 15:15:37

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: fortune-mod-wikiquote-$LC

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

#5 2004-09-30 16:07:48

dp
Member
From: Aarau, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: fortune-mod-wikiquote-$LC

lanrat wrote:

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

#6 2004-09-30 22:25:21

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: fortune-mod-wikiquote-$LC

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

Board footer

Powered by FluxBB