Extension talk:Collection

Jump to: navigation, search

About this board

Archives 

/Archive 1

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
Wmat (talkcontribs)

I'm running the latest version of the extensions on MW1.25alpha and I'm seeing that when I click 'Download as PDF', the licensing information shows License: unknown. I have the following variables configured for the extension, as well as the default for the whole wiki:

$wgLicenseName = "Creative Commons Attribution-Share Alike 3.0 license"; $wgLicenseURL = "http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License";

Shouldn't the licensing info appear on the PDFs as configured?

Thanks

Wmat (talkcontribs)

I tried setting:

$wgLicenseName = null;
$wgLicenseURL = null;

As I have the following configured:

$wgRightsUrl = "http://creativecommons.org/licenses/by-sa/3.0/";
$wgRightsText = "Creative Commons Attribution-ShareAlike";

According to the ReadMe in the Collections source tree, the license should default to the Rights text in this case. It doesn't. Rendered PDFs and Books still have a License: unknown.

Kghbln (talkcontribs)

It's probably time to report an issue at phabricator.

Wmat (talkcontribs)

You're right.

https://phabricator.wikimedia.org/T91262

Kghbln (talkcontribs)

Thank you for doing this. This issue is actually a bit worrisome since licensing is an integral part of providing content. So the correct attribution is something that should not be missed.

Nemo bis (talkcontribs)

Indeed, I've already argued that the extension should not output at all any content which can't be attributed.

Wmat (talkcontribs)

I'm very curious how this is working on WP and not my wiki? Can anyone else reproduce this?

49.207.57.238 (talkcontribs)

Same here, I'm on MW 1.27 and Collection 1.7

License for all the images is Unknown even though it is clearly mentioned as CC-BY-SA 4.0 and this is also same for images of commons used with InstantCommons

Reply to "License: unknown in PDFs"

How to create collection_id from my article list

1
140.115.51.162 (talkcontribs)

Hello guys, I would like to generate the collection_id from set of article and use this collection_id to create the pdf file from Wikipedia

Now

Reply to "How to create collection_id from my article list"

How to get code review for this extension

1
Mutante (talkcontribs)

How to get https://gerrit.wikimedia.org/r/#/c/336342/ merged? Are there any active maintainers of this extension? Is there any deployment step besides the merge in Gerrit itself? ~~~~

Reply to "How to get code review for this extension"

Can this extension be deployed to [https://zh.wikipedia.org zh.wikipedia]?

2
星耀晨曦 (talkcontribs)

see community consensus.

Kghbln (talkcontribs)

Such requests are piped in via Phabricator. I suggest to create a task for this.

Reply to "Can this extension be deployed to [https://zh.wikipedia.org zh.wikipedia]?"
Wess (talkcontribs)

Is there's any way to change the design of the rendered pdf? i.e - add some css, fonts, etc.?

FerociouslyReligious (talkcontribs)

Hi! Yeah! I planned to do that and obviously, to start making some kind of structure. Unfortunately I have had a lot of work and it couldn't have done. Would you like to join me and make a contribution or building this together?

Wess (talkcontribs)

Hi. we have a project that is due in a month, so we're in to it. Lets talk and proceed somehow.

Reply to "Change book look & feel"
89.135.155.145 (talkcontribs)

Is mwlib working with collection 1.26? I just can't make it work, always get the "Book rendering failed: An error occurred while trying to render your book" error. I use the public render server ('http://tools.pediapress.com/mw-serve/').

217.12.24.135 (talkcontribs)

Hi, I'm using the same version... I can't make it work .. I've tried to build a rendered server on Ubuntu or use the public render server you said.. no matter what I do, I always get the same error

217.12.24.135 (talkcontribs)

Hi again, Better to use a own render service

217.12.24.135 (talkcontribs)

Follow the instructions on http://mwlib.readthedocs.org/en/latest/installation.html#mwlib-install and launch the listener services such as nserve, etc through console or better on startup as a script

217.12.24.135 (talkcontribs)

Now, all of this is working in Ubuntu 64 bits with the last release of Collection extension in mediawiki 1.26

Ashni rai (talkcontribs)

our organization is using windows only.So is there anway we can create our render server for windows.

Reply to "Mwlib with collection 1.26"
Edga~mediawikiwiki (talkcontribs)

Hi All,

Setting up this Extension seemed relatively simple. I've done everything I needed in terms of configuration:

require_once "$IP/extensions/Collection/Collection.php";

$wgCollectionPODPartners = false;

$wgEnableWriteAPI = true;

$wgCollectionMWServeURL = "http://tools.pediapress.com/mw-serve/";

$wgCollectionMWServeCredentials = "user:userpass";
$wgCollectionFormats = array(
'rl' => 'PDF', # enabled by default
    'odf' => 'ODT',
    'docbook' => 'DocBook XML',
    'xhtml' => 'XHTML 1.0 Transitional',
    'epub' => 'e-book (EPUB)',
    'zim' => 'Kiwix (OpenZIM)',

);
$wgGroupPermissions['sysop']['collectionsaveascommunitypage'] = true;
$wgGroupPermissions['sysop']['collectionsaveasuserpage']      = true;

However all I get after clicking Download as PDF is "There was an error while attempting to render your book.". No details to help me debug it. is there any way to enable some more detailed error reports or does anyone know if there's anything wrong with my config?

This post was posted by Edga~mediawikiwiki, but signed as Edga.

Fidicterms (talkcontribs)

I am having the same problem and it's driving me crazy , been sitting at my computer for more than 10 hours without any success !

the test (mw-zip and mw-render) works fine on the render server's console. but my wiki won't connect to the render server. it doesn't even show any activity on the render server's log. it's just the plain "There was an error while attempting to render your book." ...

I even installed a new virtual machine and set the render server up again from scratch, same results.

appreciate any help / idea

(wiki site : www.fidicterms.org)

(temporary render server : 107.170.1.247)

80.147.138.211 (talkcontribs)

do you solved the probelm?

PhotographerTom (talkcontribs)

Could this be related to "The Book Creator software has been broken since it was rebuilt in 2014, the management process is inactive, and no fixes are in sight." from https://en.wikipedia.org/wiki/Help:Books?

Raiemaille (talkcontribs)

Hi,

If you use your own renderer, take care to specify port number used by nserve (8899 by default) in LocalSettings.php :

$wgCollectionMWServeURL = 'http://mywebsite:8899'

And don't use 'localhost' or IP like 192.168... It's necessary to set a "real" name :

$wgServer = "http://mywebsite";

Tinss (talkcontribs)

I was getting the same error upon setting up this extension and then realized access to my wiki was restricted to logged in users only and the public http://tools.pediapress.com/mw-serve/ needed to access the page in order to render it.

So on a private wiki, you can use the following hack to give access to tools.pediapress.com (78.46.16.76). Keep in mind that an ip address is easily spoofed so use at your own risk.

if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == '78.46.16.76')
{
  $wgGroupPermissions['*']['read'] = true;
}
Kghbln (talkcontribs)

Did not see this before but there is also the "$wgCollectionMWServeCredentials" configuration parameter used like $wgCollectionMWServeCredentials = 'user:pass';

Reply to "Book rendering failed"
85.28.158.38 (talkcontribs)

are books auto deleted after some time ? (cache)? can i save a book to be always visible like a page with transluded titles?

164.126.187.75 (talkcontribs)

is it possible?

Reply to "Book Disappears"

Can not get my rendering server to work apart from wikipedia.

5
Solanki (talkcontribs)

Hi, I've been trying to set up the Collection extension on my own rendering server, so I can generate pdf files from my wiki. So far no luck.


Here's where I am:

I followed this guide:

http://edutechwiki.unige.ch/en/Mediawiki_collection_extension_installation

And I can create pdf files from wikipedia using:

mw-zip -c :en -o test.zip Acdc Number

mw-render -c test.zip -o test.pdf -w pdf

mw-zip works just as one would expect.


mw-zip -c :en -o test.zip Acdc Number

creating nuwiki in u'tmpuIdHyY/nuwiki' 2013-09-07T10:10:58 mwlib.utils.info >> fetching 'http://en.wikipedia.org/w/index.php?title=Help:Books/License&action=raw&templates=expand' removing tmpdir u'tmpuIdHyY' memory used: res=25.0 virt=816.4


I can read those pdf files, so I know my basic render farm setup is working.

The problem is that I cannot get it to work with anything other than wikipedia.

If I try the URL in the guide:


mw-zip -c http://edutechwiki.unige.ch/mediawiki/ -o test2.zip Mediawiki_collection_extension_installation

creating nuwiki in u'tmpRnDvRH/nuwiki' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 328, in run result = self._run(*self.args, **self.kwargs)

File "/usr/local/lib/python2.7/dist-packages/mwlib/net/fetch.py", line 747, in refcall_fun fun(*args, **kw)

File "/usr/local/lib/python2.7/dist-packages/mwlib/net/fetch.py", line 632, in handle_new_basepath api = self._get_mwapi_for_path(path)

File "/usr/local/lib/python2.7/dist-packages/mwlib/net/fetch.py", line 684, in _get_mwapi_for_path raise RuntimeError("cannot guess api url for %r" % (path,))

RuntimeError: cannot guess api url for 'http://edutechwiki.unige.ch/en' <Greenlet at 0x24d2cd0: refcall_fun> failed with RuntimeError

WARNING: (u'Mediawiki_collection_extension_installation', None) could not be fetched removing tmpdir u'tmpRnDvRH' memory used: res=19.3 virt=226.7



and if I try my own:



mw-zip -c http://IP:PortNo/wiki/index.php/ --username=uuu --password=ppp -o test2.zip Test

creating nuwiki in u'tmpG82RPH/nuwiki' Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 328, in run result = self._run(*self.args, **self.kwargs)

File "/usr/local/lib/python2.7/dist-packages/mwlib/apps/make_nuwiki.py", line 114, in run api = self.get_api()

File "/usr/local/lib/python2.7/dist-packages/mwlib/apps/make_nuwiki.py", line 28, in get_api api.login(self.username, self.password, self.domain)

File "/usr/local/lib/python2.7/dist-packages/mwlib/net/sapi.py", line 186, in login res = self._post(**args)

File "/usr/local/lib/python2.7/dist-packages/mwlib/net/sapi.py", line 106, in _post res = loads(self._fetch(req))

File "/usr/local/lib/python2.7/dist-packages/mwlib/net/sapi.py", line 23, in loads return json.loads(s)

File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 413, in loads return _default_decoder.decode(s)

File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 402, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 420, in raw_decode raise JSONDecodeError("No JSON object could be decoded", s, idx)

JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0) <Greenlet at 0x1a7b870: <bound method start_fetcher.run of <mwlib.apps.make_nuwiki.start_fetcher object at 0x1acf790>>> failed with JSONDecodeError

removing tmpdir u'tmpG82RPH' memory used: res=16.8 virt=152.5 Traceback (most recent call last):

File "/usr/local/bin/mw-zip", line 9, in <module> load_entry_point('mwlib==0.15.11', 'console_scripts', 'mw-zip')()

File "/usr/local/lib/python2.7/dist-packages/mwlib/apps/buildzip.py", line 155, in main make_zip(output, options, env.metabook, podclient=podclient, status=status)

File "/usr/local/lib/python2.7/dist-packages/mwlib/apps/buildzip.py", line 50, in make_zip make_nuwiki(fsdir, metabook=metabook, options=options, podclient=podclient, status=status)

File "/usr/local/lib/python2.7/dist-packages/mwlib/apps/make_nuwiki.py", line 189, in make_nuwiki pool.join(raise_error=True)

File "/usr/local/lib/python2.7/dist-packages/gevent/pool.py", line 98, in join raise greenlet.exception

simplejson.decoder.JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)


I as using Mediawiki 1.23 and I am not behind any proxy and also I disabled SELinux.

Variables that I am using in LocalSettings file are as follows:

$wgServer = "http://IP:portno";

$wgScriptPath = "/wiki";

require_once "$IP/extensions/Collection/Collection.php";

$wgCollectionMWServeURL = 'http://IP:8899'; (default port of mw-serve)

$wgCollectionMWServeCredentials = "username:password";

$wgEnableAPI = true;


I can't even begin to work on the actual extension interface until I have this working..... Any suggestions? Where do I go next?

Any help would be appreciated!


Thanks!

Solanki (talkcontribs)

Guys! I would really appreciate any kind of help or just point me in the right direction, coz I am banging my head here.

Thanks!

Jongfeli (talkcontribs)

Hello Solanki. Is your server running on Ubuntu? If so did you read Setup a render server on Ubuntu 12.04 LTS? If you follow the guide you should be able to get your server up and running. It currently explains how to setup on Ubuntu 12.04 LTS but I am testing it on 14.04 LTS and this seems to work just fine also. When I am done I will update Setup a render server on Ubuntu 12.04 LTS. Regards.

Solanki (talkcontribs)

Hi Felipe. No, my server is running on RHEL 6.5. The strange thing am encountering is its different behavior to different sites, like I mentioned above, it works perfectly fine for Wikipedia, however gives a different error to http://edutechwiki.unige.ch/mediawiki/ and a different one for my site i.e. mw-zip -c http://IP:PortNo/wiki/api.php/ --username=uuu --password=ppp -o test2.zip Test.


Now, this is what's boggling my mind. I have almost gone through every document possible.

(Errors related to different sites are given above.)

MarkAHershberger (talkcontribs)

Yay! I'm getting this exact error ("cannot guess api url...")

And my server was working before....

Reply to "Can not get my rendering server to work apart from wikipedia."
Ibutakov.smartec (talkcontribs)

maybe it will be helpful for someone.

#!/bin/sh
#
#chkconfig: 345 20 80
#
#description: mw-serve

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin

case "$1" in
    start)
        setuid www-data mw-qserve &
        setuid www-data nserve &
        setuid www-data nslave --cachedir /tmp/mwcache/ &
        setuid www-data postman &
    ;;
  stop)
        killall nserve
        killall mw-qserve
        killall nslave
        killall postman
    ;;
  force-reload|restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: /etc/init.d/mw-serve {start|stop}"
    exit 1
    ;;
esac

exit 0

added command to crontab to start/restart it automatically:

crontab -e
@reboot /path/to/file start
@daily /path/to/file restart
Reply to "Script to start local render server"