Hi,
About a month ago I transferred from a Wikia wiki (health-and-medicine.wikia.com) to a local wiki and much of what I did was I went to Special:Export on Wikia, entered major categories and exported all pages belonging to these categories and then went to Special:Import on my local wiki to import the XML files the Wikia export had generated (XML dumps weren't a viable option as Special:Import couldn't handle the massive file generated from the dumps). This Wikia wiki has several hundred pictures that I still need to upload to my local wiki and I was wondering if there was a Pywiki script that could do this job for me, or at least do it for files that are linked in the pages I have so far imported (i.e., files mentioned in broken file links). I have user_config.py already setup for working with these two wikis (i.e., content:
|# -*- coding: utf-8 -*-||| |||family = 'local'||| |||mylang = 'en'||| |||usernames['hmwiki']['hmwiki'] = u'MyFirstBot'||| |||usernames['local']['en'] = u'MyFirstBot'|
where hmwiki has been defined via generate_family_file.py) if you're wondering.
I am a noob when it comes to python and Pywikibot so if you have an answer I'd appreciate it if you could boil it down into simple lines of code to run in the command prompt (I'm on 64 bit Windows 7 SP1).
Thanks for your time, Brenton
I said I would write you a tool, just give me a few days.
On Wed, Feb 25, 2015 at 12:52 PM, Brenton Horne brentonhorne77@gmail.com wrote:
Hi,
About a month ago I transferred from a Wikia wiki ( health-and-medicine.wikia.com) to a local wiki and much of what I did was I went to Special:Export on Wikia, entered major categories and exported all pages belonging to these categories and then went to Special:Import on my local wiki to import the XML files the Wikia export had generated (XML dumps weren't a viable option as Special:Import couldn't handle the massive file generated from the dumps). This Wikia wiki has several hundred pictures that I still need to upload to my local wiki and I was wondering if there was a Pywiki script that could do this job for me, or at least do it for files that are linked in the pages I have so far imported (i.e., files mentioned in broken file links). I have user_config.py already setup for working with these two wikis (i.e., content:
# -*- coding: utf-8 -*- family = 'local' mylang = 'en' usernames['hmwiki']['hmwiki'] = u'MyFirstBot' usernames['local']['en'] = u'MyFirstBot'
where hmwiki has been defined via generate_family_file.py) if you're wondering.
I am a noob when it comes to python and Pywikibot so if you have an answer I'd appreciate it if you could boil it down into simple lines of code to run in the command prompt (I'm on 64 bit Windows 7 SP1).
Thanks for your time, Brenton
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
The tool you were writing (which I am prepared to wait for, dw this isn't me trying to rush ya) was (or so I thought) for something a little different, namely uploading files from a /category/ not files that were missing and called in file links, that this question is about.
On 26/02/2015 3:56 AM, John wrote:
I said I would write you a tool, just give me a few days.
Hi! There appears to be a cooked script to do exactly that: imagetransfer.py https://www.mediawiki.org/wiki/Manual:Pywikibot/imagetransfer.py (I've never used it though)
Il 25/02/2015 18:52, Brenton Horne ha scritto:
Hi,
About a month ago I transferred from a Wikia wiki (health-and-medicine.wikia.com) to a local wiki and much of what I did was I went to Special:Export on Wikia, entered major categories and exported all pages belonging to these categories and then went to Special:Import on my local wiki to import the XML files the Wikia export had generated (XML dumps weren't a viable option as Special:Import couldn't handle the massive file generated from the dumps). This Wikia wiki has several hundred pictures that I still need to upload to my local wiki and I was wondering if there was a Pywiki script that could do this job for me, or at least do it for files that are linked in the pages I have so far imported (i.e., files mentioned in broken file links). I have user_config.py already setup for working with these two wikis (i.e., content:
|# -*- coding: utf-8 -*-||| |||family = 'local'||| |||mylang = 'en'||| |||usernames['hmwiki']['hmwiki'] = u'MyFirstBot'||| |||usernames['local']['en'] = u'MyFirstBot'|
where hmwiki has been defined via generate_family_file.py) if you're wondering.
I am a noob when it comes to python and Pywikibot so if you have an answer I'd appreciate it if you could boil it down into simple lines of code to run in the command prompt (I'm on 64 bit Windows 7 SP1).
Thanks for your time, Brenton
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
That only works if you have a specific list of such files. I don't, I just know pages where these broken files are linked (due to Category:Pages with broken file links) and to construct such a list manually would take forever.
On 26/02/2015 4:00 AM, Ricordisamoa wrote:
There appears to be a cooked script to do exactly that: imagetransfer.py https://www.mediawiki.org/wiki/Manual:Pywikibot/imagetransfer.py
Brenton it's fairly easy to whip up and bootstrap upload and pagegenerators together for what you need
On Wednesday, February 25, 2015, Brenton Horne brentonhorne77@gmail.com wrote:
That only works if you have a specific list of such files. I don't, I just know pages where these broken files are linked (due to Category:Pages with broken file links) and to construct such a list manually would take forever.
On 26/02/2015 4:00 AM, Ricordisamoa wrote:
There appears to be a cooked script to do exactly that: imagetransfer.py https://www.mediawiki.org/wiki/Manual:Pywikibot/imagetransfer.py
OK, thanks, didn't know that. Btw thanks for all the help you've given me!
On 26/02/2015 4:31 AM, John wrote:
Brenton it's fairly easy to whip up and bootstrap upload and pagegenerators together for what you need
On Wednesday, February 25, 2015, Brenton Horne <brentonhorne77@gmail.com mailto:brentonhorne77@gmail.com> wrote:
That only works if you have a specific list of such files. I don't, I just know pages where these broken files are linked (due to Category:Pages with broken file links) and to construct such a list manually would take forever. On 26/02/2015 4:00 AM, Ricordisamoa wrote:
There appears to be a cooked script to do exactly that: imagetransfer.py <https://www.mediawiki.org/wiki/Manual:Pywikibot/imagetransfer.py>
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org