Hi!
I'm turning to you with request. Is it possible for you to make python script, which would make compitation of articles (from :sl - Slovenian WP): a) created by me (Username: Klemen Kocjancic) and b) linked to http://sl.wikipedia.org/wiki/Portal:Voja%C5%A1tvohttp://sl.wikipedia.org/wiki/
The script should combined both search quiries (with removing duplicated articles) and make a list of articles in following form: yyyy xxxx '''X'''Y yyyy xxxx '''X'''Y yyyy xxxx
X = article's title Y = article's text
Is this possible? Could you recommend someone, if you can't make it? Because I'm using pyton (and AWB) for adding/maintence, I'm requesting script in this language, but if any can write script in any other language, is also fine with me.
Regards, Klemen Kocjancic admin, :sl WP
On 29 August 2011 14:52, Klemen Kocjancic klemenkocjancic@gmail.com wrote:
I'm turning to you with request. Is it possible for you to make python script, which would make compitation of articles (from :sl - Slovenian WP): a) created by me (Username: Klemen Kocjancic) and b) linked to http://sl.wikipedia.org/wiki/Portal:Voja%C5%A1tvohttp://sl.wikipedia.org/wiki/
This is hard to do with a script, but I ran a query on the toolserver to do this for you: mysql> select * from (select rev_page as fr_page, min(rev_id) as fr_rev from pagelinks inner join revision on rev_page=pl_from where pl_namespace=100 and pl_title='Vojaštvo') as firstrevs left join revision on rev_id=fr_rev where rev_user_text='Klemen_Kocjancic' limit 1; Empty set (0.15 sec)
Essentially, it seems none of the 19081 pages linking to Portal:Vojaštvo:
mysql> select count(*) from pagelinks where pl_namespace=100 and pl_title='Vojaštvo'; +----------+ | count(*) | +----------+ | 19081 | +----------+ 1 row in set (0.01 sec)
have you as author of the first revision. Essentially - requests of the nature 'could I get a list of articles that conform to the following rules' should be directed to the Toolserver query service: https://jira.toolserver.org/browse/DBQ
Using pywikipedia, it should be possible to use filter options to archieve the same result, but I haven't used pagegenerators.py much lately.
The script should combined both search quiries (with removing duplicated articles) and make a list of articles in following form: yyyy xxxx '''X'''Y yyyy xxxx '''X'''Y yyyy xxxx
X = article's title Y = article's text
This is unclear to me. What should xxxx and yyyy be? Is the article text supposed to fit onto the same line as the title? What should be done with line breaks?
Best, Merlijn
Thanks for prompt reply!
yyyy xxxx is divider between articles.
About Portal:Vojaštvo: I ran query on AWB (What links to), I got 19074 hits (done right now). Did you use right namespace (not article, but portal)?
Regards, KK
2011/8/29 Merlijn van Deen valhallasw@arctus.nl
On 29 August 2011 14:52, Klemen Kocjancic klemenkocjancic@gmail.comwrote:
I'm turning to you with request. Is it possible for you to make python script, which would make compitation of articles (from :sl - Slovenian WP): a) created by me (Username: Klemen Kocjancic) and b) linked to http://sl.wikipedia.org/wiki/Portal:Voja%C5%A1tvohttp://sl.wikipedia.org/wiki/
This is hard to do with a script, but I ran a query on the toolserver to do this for you: mysql> select * from (select rev_page as fr_page, min(rev_id) as fr_rev from pagelinks inner join revision on rev_page=pl_from where pl_namespace=100 and pl_title='Vojaštvo') as firstrevs left join revision on rev_id=fr_rev where rev_user_text='Klemen_Kocjancic' limit 1; Empty set (0.15 sec)
Essentially, it seems none of the 19081 pages linking to Portal:Vojaštvo:
mysql> select count(*) from pagelinks where pl_namespace=100 and pl_title='Vojaštvo'; +----------+ | count(*) | +----------+ | 19081 | +----------+ 1 row in set (0.01 sec)
have you as author of the first revision. Essentially - requests of the nature 'could I get a list of articles that conform to the following rules' should be directed to the Toolserver query service: https://jira.toolserver.org/browse/DBQ
Using pywikipedia, it should be possible to use filter options to archieve the same result, but I haven't used pagegenerators.py much lately.
The script should combined both search quiries (with removing duplicated articles) and make a list of articles in following form: yyyy xxxx '''X'''Y yyyy xxxx '''X'''Y yyyy xxxx
X = article's title Y = article's text
This is unclear to me. What should xxxx and yyyy be? Is the article text supposed to fit onto the same line as the title? What should be done with line breaks?
Best, Merlijn
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org