On Aug 20, 2013, at 4:18 PM, "William H. Magill" <mag...@icloud.com> wrote:
> > On Aug 20, 2013, at 2:28 PM, Lewis Cawte <lewisca...@googlemail.com> wrote: > >> On 20/08/2013 19:19, William H. Magill wrote: >>> On Aug 20, 2013, at 11:49 AM, Lewis Cawte <lewisca...@googlemail.com> wrote: >>>>> One last point -- since you have these assorted "configure" scripts which >>>>> MUST be run before one >>>>> can begin using the product -- why not have an "install" script, which >>>>> automatically runs them as >>>>> needed. ... of course to do that, you will first need to fix >>>>> "generate_family_file.py". >>>> I wouldn't say that's really necessary, all you have to do is run >>>> generate_family_file.py and generate_user_files.py ... they are both >>>> pretty simple and quick. It's actually considerably easier than when I >>>> started using Pywikipedia, when you had to craft the family file by hand! >>> Yes. if you do them in that order.... they work. >>> >>> However, the Installation instructions tell you to run them in the reverse >>> order; consequently they do >>> not work -- because "generate_family_file.py" will fail if a >>> "user-config.py" file exists. >>> (Unless that has been changed in the past month.) >> This is not true at all unless you've just found a very very weird bug. >> Generate_family_file.py works even if a user-config.py exists, and it >> has been that way since the script was created. I've been using it since >> it was first released, in all different versions. > > There is no version information in the distribution i.e. nothing in the > README, or CONTENTS files. > It was downloaded from the SVN in late June. > > using the instructions found at: > http://www.mediawiki.org/wiki/Manual:Pywikipediabot > > > ======<cut here>====== >> python generate_family_file.py > Usage: generate_family_file.py <url> <short name> > Example: generate_family_file.py http://www.mywiki.bogus/wiki/Main_Page mywiki > This will create the file families/mywiki_family.py > Please insert URL to wiki: http//www.lotro-wiki.com > Please insert a short name (eg: freeciv): mywikitest > Generating family file from http//www.lotro-wiki.com > Traceback (most recent call last): > File "generate_family_file.py", line 335, in <module> > FamilyFileGenerator(*sys.argv[1:]).run() > File "generate_family_file.py", line 69, in run > w = Wiki(self.base_url) > File "generate_family_file.py", line 266, in __init__ > data = urlopen(fromurl).read() > File "generate_family_file.py", line 29, in urlopen > return urllib2.urlopen(req) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", > line 126, in urlopen > return _opener.open(url, data, timeout) > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", > line 386, in open > protocol = req.get_type() > File > "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", > line 248, in get_type > raise ValueError, "unknown url type: %s" % self.__original > ValueError: unknown url type: http//www.lotro-wiki.com > ======<cut here>====== > I should add: Also on page: http://www.mediawiki.org/wiki/Manual:Pywikipediabot/Quick_Start_Guide 8. Now you'll create a family file for your site. First see if it can be generated automatically. On the Shell prompt, type "python generate_family_file.py" and press enter. If you get an error and the file is not generated, then follow the example below. T.T.F.N. William H. Magill # iMac11,3 Core i7 [2.93GHz - 8 GB 1067MHz] OS X 10.8.4 # MacBook Pro4.1 Core 2 Duo [2.5GHz - 4GB 667] OS X 10.6.8 # Macmini6,1 Intel Core i5 [2.5 Ghz - 4GB 1600MHz] OS X 10.8.3 mag...@icloud.com mag...@mac.com whmag...@gmail.com _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l