Commit Graph

64 Commits

Author SHA1 Message Date
Daniel Lenski 8d8fdc27fb Update README.md 2020-12-21 15:27:24 -08:00
Daniel Lenski d64cdd6b19 v2.0 2020-12-21 14:55:12 -08:00
Daniel Lenski c04f8849d2 newer mwclient, fix deprecation warning 2020-12-21 14:54:50 -08:00
Daniel Lenski 64da0d6b3e Python3.x - ify 2020-12-21 14:53:21 -08:00
Dan Lenski fa546f7b6a
Merge pull request #5 from jwilk-forks/encoding
Decode article name with locale encoding
2019-06-04 09:30:18 -07:00
Jakub Wilk bd45e692c4 Decode article name with locale encoding
Fixes:

    $ wp2git --lang en József_Kürschák
    Connected to https://en.wikipedia.org/w/
    Traceback (most recent call last):
      File ".../bin/wp2git", line 11, in <module>
        load_entry_point('wp2git==1.0.1.dev6+gac1bf31', 'console_scripts', 'wp2git')()
      File ".../lib/python2.7/site-packages/wp2git/wp2git.py", line 69, in main
        page = site.pages[args.article_name]
      File ".../lib/python2.7/site-packages/mwclient/listing.py", line 234, in __getitem__
        return self.get(name, None)
      File ".../lib/python2.7/site-packages/mwclient/listing.py", line 255, in get
        namespace = self.guess_namespace(name)
      File ".../lib/python2.7/site-packages/mwclient/listing.py", line 282, in guess_namespace
        if name.startswith(u'%s:' % self.site.namespaces[ns].replace(' ', '_')):
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
2019-06-04 09:39:40 +02:00
Dan Lenski ac1bf3187a
Merge pull request #4 from jwilk-forks/userid
Don't require userid to be set
2019-06-03 14:57:55 -07:00
Jakub Wilk 258d87face Don't require userid to be set
Fixes:

    $ wp2git --lang en Adblock_Plus
    ...
    >> Minor Revision 233246255 by Clarityfiend at Thu Aug 21 03:17:46 2008: minor tweak
    Traceback (most recent call last):
      File ".../bin/wp2git", line 11, in <module>
        load_entry_point('wp2git==1.0.1.dev4+gb519d2d', 'console_scripts', 'wp2git')()
      File ".../lib/python2.7/site-packages/wp2git/wp2git.py", line 103, in main
        if rev['userid']:
    KeyError: 'userid'
    fatal: stream ends early
    fast-import: dumping crash report to .git/fast_import_crash_11328
2019-06-03 21:31:14 +02:00
Dan Lenski b519d2d5d0 Merge pull request #2 from jwilk/spelling
Fix capitalization of "PyPI"
2017-01-30 22:30:48 -08:00
Dan Lenski 17460602b1 Merge pull request #3 from jwilk/nonexistent-page
Fix error handling for nonexistent pages
2017-01-30 22:30:40 -08:00
Jakub Wilk 70f0d687f6 fix error handling for nonexistent pages 2017-01-29 15:24:00 +01:00
Jakub Wilk 17c579a944 fix capitalization of "PyPI" 2017-01-29 15:12:50 +01:00
Daniel Lenski ed576e5e0e fix dumb mistake due to reuse of 'path' 2016-08-05 18:44:45 -07:00
Daniel Lenski 594cd52955 more http → https 2016-08-05 18:44:45 -07:00
Daniel Lenski 6e7a19ce60 make into a proper distutils package, with wp2git as CLI entry point, and call it version 1.0 2016-08-05 18:31:30 -07:00
Dan Lenski 33040a6c56 Merge pull request #1 from chhantyal/master
use https
2016-08-04 15:31:18 -07:00
Nar Chhantyal 2f417cb36b use https 2016-08-04 19:53:35 +02:00
Dan Lenski 7587971229 group options 2015-12-26 23:06:17 -08:00
Dan Lenski 9aa17397c0 include editor link and cleaned-up user info in commit summary 2015-12-26 23:06:17 -08:00
Dan Lenski efaf81fa7b make a non-bare repo by default 2015-12-26 22:45:33 -08:00
Daniel Lenski 71f4fef0d7 fix URLs in summaries 2015-07-23 11:45:26 -07:00
Dan Lenski eaf9f9706f comment is optional 2015-02-10 21:21:44 -08:00
Daniel Lenski b284e8fc74 use pipe to git fast-import rather than creating a temporary fast-import file 2014-10-14 17:42:05 -07:00
Daniel Lenski 839f2f86e9 simplify fast-import flow 2014-10-14 12:33:53 -07:00
Daniel Lenski 695d460665 ASCII-fy stderr status line for Windows, and fix field order 2014-10-14 12:33:53 -07:00
Daniel Lenski 73c7a7a052 more sophisticated site-parsing 2014-10-14 12:33:46 -07:00
Dan Lenski aa22ced399 replace D version with Python version, based on mwclient 2014-10-14 00:44:56 -07:00
Vladimir Panteleev 2fa911799e Add download link 2013-08-29 22:29:19 +00:00
Vladimir Panteleev e4e42a3f2d Add README 2013-08-29 22:16:19 +00:00
Vladimir Panteleev 121bbaec42 Change extension of article content file from .txt to .mw 2013-08-29 22:06:12 +00:00
Vladimir Panteleev f56f4dd789 Create a directory for the page 2013-08-29 22:03:33 +00:00
Vladimir Panteleev da45348751 Sanitize file name 2013-08-29 22:03:32 +00:00
Vladimir Panteleev 3536d47f5d Add --keep-history option 2013-08-29 22:03:29 +00:00
Vladimir Panteleev 2426da08de Progress output aesthetics 2013-08-29 22:02:59 +00:00
Vladimir Panteleev 687bfafc53 Whitespace 2013-08-29 22:02:55 +00:00
Vladimir Panteleev 62071473a3 Remove redundant quote-stripping 2013-08-29 22:01:14 +00:00
Vladimir Panteleev 3bbdc75efd Use std.exception.enforce 2013-08-29 22:00:28 +00:00
Vladimir Panteleev 92cbf5c6eb Use std.getopt 2013-08-29 21:30:28 +00:00
Vladimir Panteleev 6f29dd4a2b Update to D2 2013-08-29 21:25:15 +00:00
Vladimir Panteleev 15decb678f Add LICENSE and AUTHORS 2010-09-18 11:05:44 +03:00
Vladimir Panteleev 1d7587161f Removed inadequate copyright 2010-09-13 01:46:57 +03:00
Vladimir Panteleev 3da27c86ba Aesthetics 2010-09-13 01:44:38 +03:00
Vladimir Panteleev e4205cef14 Add --language option to allow specifying language subdomain 2010-09-13 01:42:11 +03:00
Vladimir Panteleev 32c06824fb Add --no-import option 2010-09-13 01:27:35 +03:00
Vladimir Panteleev adb035bbc3 Handle bad page names gracefully 2010-09-13 01:25:01 +03:00
Vladimir Panteleev dad49db729 Parse argument list and add detailed usage 2010-09-12 23:44:53 +03:00
Vladimir Panteleev 4559fc8dc8 Specify language version 2010-09-12 23:44:26 +03:00
greenrd 6a7f712560 Add README explaining how to compile it 2010-09-12 15:47:30 +01:00
Robin Green 4cbc5ba891 Don't delete the git-fast-import file afterwards
This lets the user import it into another VCS which supports git-fast-import
2010-09-12 15:40:05 +01:00
greenrd 3c31925bc7 Fix bug with page titles containing spaces
by URL encoding page names
2010-09-12 15:40:05 +01:00