Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle case changes in article titles #26

Open
danielhoherd opened this issue Jul 14, 2017 · 4 comments
Open

Handle case changes in article titles #26

danielhoherd opened this issue Jul 14, 2017 · 4 comments

Comments

@danielhoherd
Copy link

The script appears to not correctly handle case changes in article titles. It aborts with a git error about unknown files due to git add and git commit referencing a filename with incorrect case.

@peterjc
Copy link
Owner

peterjc commented Jul 14, 2017

You mean things like PYTHON to Python? I don't recall seeing this in the wiki's this has been used on so far...

That may in itself cause trouble under Windows or a Mac with the default case insensitive file system, but Linux should be fine.

I'd be willing to take a look at any pull request if you want to try fixing this.

Other can you make a small test wiki and provide the XML dump as a test case (I don't have ready access to a MediaWiki instance to try this on myself anymore)?

@peterjc
Copy link
Owner

peterjc commented Jul 14, 2017

Actually rather than making a small test case, if you are willing to send me your real XML dump (e.g. to my Google Mail address), and details of the page(s) which break, I might be able to try it out some time next week.

@peterjc
Copy link
Owner

peterjc commented Jan 15, 2024

I ran into this myself in some recent testing, and it is due to trying to run this on a case insensitive file system (like Windows and some macOS drives).

As part of the Python 3 work going into v1.1.0, this will now trigger an error and abort. Try running under Linux, or if using a Mac, a case sensitive file system. See 5aad3f8 and the preceding commits.

It may be possible to handle the special case of renaming the page's case, i.e. git remove old case, git add new case, so leaving this issue open.

@peterjc
Copy link
Owner

peterjc commented Feb 7, 2024

In v2.0.0 of the script (i.e. the current master), the process is now:

  • Convert XML dump into mediawiki files, commit those to git
  • Human may choose to remove spam commits and reverts/cleanups
  • Convert mediawiki to mardown ready for GitHub pages

This means the two files PYTHON.mediawiki and Python.mediawiki must coexist, even if one is a redirection to the other. After conversion to Markdown we'd have a single file using a redirect_from entry.

So, sadly this issue as a WON'T FIX. And this was annoying as my primary machine is a Mac where I couldn't run this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants