2
0
mirror of https://github.com/WikiTeam/wikiteam synced 2024-11-12 07:12:41 +00:00
Commit Graph

743 Commits

Author SHA1 Message Date
PiRSquared17
109528384b Save and upload logos in uploader.py 2015-03-29 21:30:15 +00:00
nemobis
4e57430605 Merge pull request #238 from WikiTeam/PiRSquared17-patch-1
Set verbose=True for upload
2015-03-29 21:01:22 +02:00
PiRSquared17
cb005516b2 Set verbose=True for upload
This makes it show progress.
2015-03-29 18:50:50 +00:00
nemobis
4fce244d4a Merge pull request #237 from WikiTeam/uploader-ia-wrapper
Port uploader.py to use internetarchive package
2015-03-29 20:42:13 +02:00
PiRSquared17
29ee59c925 Add internetarchive requirement
Add internetarchive
2015-03-29 18:33:56 +00:00
PiRSquared17
905511f996 Port uploader.py to use internetarchive package
Remove curl stuff and replace with internetarchive pip package (or https://github.com/jjjake/ia-wrapper) API
2015-03-29 18:30:42 +00:00
nemobis
ff2cdfa1cd Merge pull request #236 from PiRSquared17/fix-server-check-api
Catch KeyError to fix server check
2015-03-29 13:53:26 +02:00
nemobis
0b25951ab1 Merge pull request #224 from nemobis/2015/issue26
Issue #26: Local "Special" namespace, actually limit replies
2015-03-29 13:53:20 +02:00
PiRSquared17
03db166718 Catch KeyError to fix server check 2015-03-29 04:14:43 +01:00
nemobis
213687011e Merge pull request #235 from PiRSquared17/truncate-file-utf8
Make filename truncation work with UTF-8
2015-03-28 21:55:56 +01:00
PiRSquared17
f80ad39df0 Make filename truncation work with UTF-8 2015-03-28 15:17:06 +00:00
PiRSquared17
90bfd1400e Merge pull request #229 from PiRSquared17/fix-zwnbsp-bom
Strip ZWNBSP (U+FEFF) Byte-Order Mark from JSON/XML
2015-03-24 21:46:33 +00:00
Marek Šuppa
5fbeda982f Merge pull request #233 from PiRSquared17/allow-single-test
Allow a single test to be run (see PR)
2015-03-24 22:39:23 +01:00
PiRSquared17
b80159e257 Allow a single test to be run (see PR) 2015-03-24 21:08:43 +00:00
PiRSquared17
7c80d37e04 Add test for BOM encoding 2015-03-24 21:04:29 +00:00
nemobis
d31709338d Merge pull request #231 from PiRSquared17/ignore-leading-spaces
Allow spaces before <mediawiki> tag.
2015-03-24 21:07:24 +01:00
PiRSquared17
ba48c43d34 Merge pull request #232 from PiRSquared17/remove-test-kwiki
Comment out broken test case wiki
2015-03-24 03:50:15 +00:00
PiRSquared17
d89b99bd7c Comment out broken test case wiki 2015-03-24 03:47:45 +00:00
PiRSquared17
fc276d525f Allow spaces before <mediawiki> tag. 2015-03-24 03:44:03 +00:00
PiRSquared17
1c820dafb7 Strip ZWNBSP (U+FEFF) Byte-Order Mark from JSON/XML 2015-03-24 01:58:01 +00:00
nemobis
711a88df59 Merge pull request #226 from nemobis/master
Make dumpgenerator.py 774: required by launcher.py
2015-03-14 10:44:41 +01:00
Federico Leva
2537e9852e Make dumpgenerator.py 774: required by launcher.py 2015-03-08 21:33:39 +01:00
nemobis
4b81fa00f1 Merge pull request #225 from nemobis/master
Fix API check if only index is passed
2015-03-08 20:53:51 +01:00
Federico Leva
79e2c5951f Fix API check if only index is passed
I forgot that the preceding point only extracts the api.php URL if
the "wiki" argument is passed to say it's a MediaWiki wiki (!).
2015-03-08 20:52:24 +01:00
Federico Leva
bdc7c9bf06 Issue 26: Local "Special" namespace, actually limit replies
* For some reason, in a previous commit I had noticed that maxretries
  was not respected in getXMLPageCore, but I didn't fix it. Done now.
* If the "Special" namespace alias doesn't work, fetch the local one.
2015-03-08 19:30:09 +01:00
Federico Leva
c1a5e3e0ca Merge branch 'PiRSquared17-follow-redirects-api' 2015-03-08 16:31:32 +01:00
Federico Leva
2f25e6b787 Make checkAPI() more readable and verbose
Also return the api URL we found.
2015-03-08 16:01:46 +01:00
Federico Leva
48ad3775fd Merge branch 'follow-redirects-api' of git://github.com/PiRSquared17/wikiteam into PiRSquared17-follow-redirects-api 2015-03-08 14:35:30 +01:00
nemobis
2284e3d55e Merge pull request #186 from PiRSquared17/update-headers
Preserve default headers, fixing openwrt test
2015-03-08 13:56:00 +01:00
PiRSquared17
5d23cb62f4 Merge pull request #219 from vadp/dir-fnames-unicode
convert images directory content to unicode when resuming download
2015-03-04 23:36:59 +00:00
PiRSquared17
d361477a46 Merge pull request #222 from vadp/img-desc-load-err
dumpgenerator: catch errors for missing image descriptions
2015-03-03 01:55:59 +00:00
Vadim Shlyakhov
4c1d104326 dumpgenerator: catch errors for missing image descriptions 2015-03-02 12:15:51 +03:00
nemobis
eae90b777b Merge pull request #221 from PiRSquared17/fix-index-php
Try using URL without index.php as index
2015-03-02 07:58:06 +01:00
PiRSquared17
b1ce45b170 Try using URL without index.php as index 2015-03-02 04:13:44 +00:00
PiRSquared17
9c3c992319 Follow API redirects 2015-03-02 03:13:03 +00:00
Vadim Shlyakhov
f7e83a767a convert images directory content to unicode when resuming download 2015-03-01 19:14:01 +03:00
PiRSquared17
dec0032971 Replace CitiWiki test URL 2015-02-26 12:32:51 +00:00
PiRSquared17
d248b3f3e8 Merge pull request #217 from makoshark/master
fix bug with exception handling
2015-02-11 03:50:54 +00:00
Benjamin Mako Hill
d2adf5ce7c Merge branch 'master' of github.com:WikiTeam/wikiteam 2015-02-10 17:05:22 -08:00
Benjamin Mako Hill
f85b4a3082 fixed bug with page missing exception code
My previous code broke the page missing detection code with two negative
outcomes:

- missing pages were not reported in the error log
- ever missing page generated an extraneous "</page>" line in output which
  rendered dumps invalid

This patch improves the exception code in general and fixes both of these
issues.
2015-02-10 16:56:14 -08:00
Benjamin Mako Hill
f4ec129bff updated wikiadownloader.py to work with new dumps
Bitrot seems to have gotten the best of this script and it sounds like it
hasn't been used. This at least gets it to work by:

- find both .gz and the .7z dumps
- parse the new date format on html
- find dumps in the correct place
- move all chatter to stderr instead of stdout
2015-02-10 14:20:21 -08:00
PiRSquared17
0ebe4e519d Merge pull request #204 from hashar/tox-flake8
Add tox env for flake8 linter
2015-02-10 03:55:57 +00:00
PiRSquared17
9480834a37 Fix infinite images loop
Closes #205 (hopefully)
2015-02-10 02:24:50 +00:00
PiRSquared17
ac72938d40 Merge pull request #216 from makoshark/master
Issue #8: avoid MemoryError fatal on big histories, remove sha1 for Wikia
2015-02-10 00:37:57 +00:00
PiRSquared17
28fc715b28 Make tests pass (fix/remove URLs)
Remove more Gentoo URLs (see 5069119b).
Fix WikiPapers API, and remove it from API test.
(It gives incorrect API URL in its HTML output.)
2015-02-09 23:59:36 +00:00
nemobis
5069119b42 Remove wiki.gentoo.org from tests
The test is failing. https://travis-ci.org/WikiTeam/wikiteam/builds/50102997#L546
Might be our fault, but they just updated code:
Tyrian	– (f313f23) 12:47, 23 January 2015	GPLv3+	Gentoo's new web theme ported to MediaWiki.	Alex Legler

I don't think testing screenscraping against a theme used only by Gentoo makes much sense for us.
2015-02-09 22:13:13 +01:00
Benjamin Mako Hill
eb8b44aef0 strip <sha1> tags returned under <page>
The Wikia API is exporting sha1 sums as part of the response for pages.
These are invalid XML and are causing dump parsing code (e.g.,
MediaWiki-Utilities) to fail.  Also, sha1 should be revisions, not pages so
it's not entirely clear to me what this is referring to.
2015-02-06 18:50:25 -08:00
Benjamin Mako Hill
145b2eaaf4 changed getXMLPage() into a generator
The program tended to run out of memory when processing very large pages (i.e.,
pages with extremely large numbers of revisions or pages with large numbers of
very large revisions). This mitigates the problem by changing getXMLPage() into
a generator which allows us to write pages after each request to the API.

This requied changes to the getXMLPage() function and also changes to other
parts of the code that called it.

Additionally, when the function was called, it's text was checked in several
ways. This required a few changes including a running tally of revisions
instead of post hoc check and it required error checking being moved into a
Exception rather than just an if statement that looked at the final result.
2015-02-06 17:19:24 -08:00
Federico Leva
a1921f0919 Update list of wikia.com unarchived wikis
The list of unarchived wikis was compared to the list of wikis that we
managed to download with dumpgenerator.py:
https://archive.org/details/wikia_dump_20141219
To allow the comparison, the naming format was aligned to the format
used by dumpgenerator.py for 7z files.
2015-02-06 09:17:53 +01:00
Emilio J. Rodríguez-Posada
9a6570ec5a Update README.md 2014-12-23 13:33:19 +01:00