wpoa / open-access-media-importer

A tool for harvesting media files from Open Access articles for upload into Wikimedia Commons
http://commons.wikimedia.org/wiki/User:Open_Access_Media_Importer_Bot
23 stars 8 forks source link

Avoid minuses at the beginning of file names #75

Open Daniel-Mietchen opened 11 years ago

Daniel-Mietchen commented 11 years ago

Example: http://commons.wikimedia.org/wiki/File:-Catenin-Is-Critical-for-Cerebellar-Foliation-and-Lamination-pone.0064451.s001.ogv

erlehmann commented 10 years ago

Just delete them?

Daniel-Mietchen commented 10 years ago

That would be an option, but I would actually prefer to leave the "β-Catenin" intact, though the Greek letters have long gone when we meddled around with file naming. However, they are also gone in the cite template, where the "β-Catenin" should stay as part of the article title (similar problems affect author names with non-ASCII components). Could it be that whatever causes the β to be replaced by a ? is also affecting the file name, such that we have an intermediate file name starting with ?-Catenin, in which we then delete the "?"?

In that case, I suggest making sure that the β remains as such throughout, so that the minus will not be the first character in the file name.