shizhao@svn.wikimedia.org ha scritto:
Revision: 6674 Author: shizhao Date: 2009-04-22 18:31:25 +0000 (Wed, 22 Apr 2009)
Log Message:
add new parameter: "-gorandom". Specifies that the robot should starting at the random pages returned by [[Special:Random]].
[...]
+-gorandom Specifies that the robot should starting at the random pages
returned by [[Special:Random]].
"""
@@ -1009,6 +1012,14 @@ transclusionPageTitle)) gen = ReferringPageGenerator(transclusionPage, onlyTemplateInclusion=True)
elif arg.startswith('-gorandom'):
for firstPage in RandomPageGenerator(number = 1):
firstPageTitle = firstPage.title()
namespace = wikipedia.Page(site, firstPageTitle).namespace()
firstPageTitle = wikipedia.Page(site,
firstPageTitle).titleWithoutNamespace()
gen = AllpagesPageGenerator(firstPageTitle, namespace,
includeredirects=False) elif arg.startswith('-start'): if arg.startswith('-startxml'): wikipedia.output(u'-startxml : wrong parameter')
I don't agree to implement this option. It isn't necessary request a page to [[Special:Random]] to get a hint about what download with [[Special:Allpages]]. And doesn't look for me useful an user option to do that or similar thing.
I use it: interwiki.py -gorandom
:) Chinese wikipedia: http://zh.wikipedia.org/ My blog: http://shizhao.org twitter: https://twitter.com/shizhao
[[zh:User:Shizhao]]
2009/4/23 Francesco Cosoleto cosoleto@gmail.com
shizhao@svn.wikimedia.org ha scritto:
Revision: 6674 Author: shizhao Date: 2009-04-22 18:31:25 +0000 (Wed, 22 Apr 2009)
Log Message:
add new parameter: "-gorandom". Specifies that the robot should starting at the random pages returned by
[[Special:Random]].
[...]
+-gorandom Specifies that the robot should starting at the random
pages
returned by [[Special:Random]].
"""
@@ -1009,6 +1012,14 @@ transclusionPageTitle)) gen = ReferringPageGenerator(transclusionPage, onlyTemplateInclusion=True)
elif arg.startswith('-gorandom'):
for firstPage in RandomPageGenerator(number = 1):
firstPageTitle = firstPage.title()
namespace = wikipedia.Page(site, firstPageTitle).namespace()
firstPageTitle = wikipedia.Page(site,
firstPageTitle).titleWithoutNamespace()
gen = AllpagesPageGenerator(firstPageTitle, namespace,
includeredirects=False) elif arg.startswith('-start'): if arg.startswith('-startxml'): wikipedia.output(u'-startxml : wrong parameter')
I don't agree to implement this option. It isn't necessary request a page to [[Special:Random]] to get a hint about what download with [[Special:Allpages]]. And doesn't look for me useful an user option to do that or similar thing.
-- Francesco Cosoleto
"L'ho incontrato una volta sola. Fini non è una persona che si possa giudicare avendolo visto una volta sola. E io non ho intenzione di rivederlo." (Roberto Benigni)
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org