2014-03-05 8:57 GMT+01:00 dan entous <[email protected]>:

> hi james,
>
> glad to hear that you're getting ready to upload with gwtoolset. sorry
> that you're running into an issue. at the moment the following characters
> are replaced with a '-' in a title without a method to override any of them:
>
>
> '#','<','>','[',']','|','{','}',':','¬','`','!','"','£','$','^','&','*','(',')','+','=','~','?',',',';',"'",'@'
>
>
> this list was comprised based on several wiki articles:
>
> * https://commons.wikimedia.org/wiki/Commons:File_naming
> *
> http://en.wikipedia.org/wiki/Wikipedia:Naming_conventions_(technical_restrictions)
> * http://www.mediawiki.org/wiki/Help:Bad_title
> * http://commons.wikimedia.org/wiki/MediaWiki:Titleblacklist
>
>
> i'm not sure who would or what process would "approve" the issue of
> relaxing that restriction to also allow the characters: '(',')',','. maybe
> someone else on this list would know. my guess is that if the commons
> admins and community are okay with it, then we can go ahead and allow those
> characters, but i don't know how that's done. maybe via an rfc or village
> pump article with votes ...
>

Previous batch uploads were usually normalising names with the following
(which I think is less stringent)

> def cleanUpTitle(title):
>
> """ Clean up the title of a potential mediawiki page. Otherwise the title of
>     the page might not be allowed by the software.
>
>     """
>     title = title.strip()
>      title = re.sub(u"[<{\\[]", u"(", title)
>      title = re.sub(u"[>}\\]]", u")", title)
>      title = re.sub(u"[ _]?\\(!\\)", u"", title)
>      title = re.sub(u",:[ _]", u", ", title)
>      title = re.sub(u"[;:][ _]", u", ", title)
>      title = re.sub(u"[\t\n ]+", u" ", title)
>      title = re.sub(u"[\r\n ]+", u" ", title)
>      title = re.sub(u"[\n]+", u"", title)
>      title = re.sub(u"[?!]([.\"]|$)", u"\\1", title)
>      title = re.sub(u"[&#%?!]", u"^", title)
>      title = re.sub(u"[;]", u",", title)
>      title = re.sub(u"[/+\\\\:]", u"-", title)
>      title = re.sub(u"--+", u"-", title)
>      title = re.sub(u",,+", u",", title)
>      title = re.sub(u"[-,^]([.]|$)", u"\\1", title)
>      title = title.replace(u" ", u"_")
>      title = title.strip(u"_")
>      return title
>
>
<
https://git.wikimedia.org/blob/pywikibot%2Fcore.git/ffb59e9e241881d13646191a54d55414cfd695aa/scripts%2Fflickrripper.py
>

Hope that helps,
-- 
Jean-Frédéric
_______________________________________________
Glamtools mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/glamtools

Reply via email to