Page MenuHomePhabricator

Enable Collection for KM WP
Closed, ResolvedPublic

Description

Author: vantharith.oum

Description:
Lately, our Khmer Wikipedia Team got an email from the community, asking for permission to use our articles and compile it into a book for printing.

But, due to the fact that our Khmer language project doesn't have this book tool feature enabled, so the process was a bit tiring and time-consuming.

So I am writing to request for this feature enable, so our community can benefit from our Khmer Wikipedia contents and enjoy compiling their own book with ease.

Thank you.

Vantharith


Version: unspecified
Severity: enhancement

Details

Reference
bz30680
TitleReferenceAuthorSource BranchDest Branch
Check for PHP notices during mwscript mergeMessageFileList.phprepos/releng/scap!93dancyreview/dancy/check-for-mergeMessageFileList.php-warningsmaster
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:52 PM
bzimport set Reference to bz30680.
bzimport added a subscriber: Unknown Object (MLST).

vantharith.oum wrote:

Thank you very much, Reedy!

Regards,

Vantharith

volker.haas wrote:

I just added a khmer font to the configuration of the render server. Currently I am using the KhmerOS.ttf font from the ubuntu package "ttf-khmeros-core". No italic or bold variant is present. If anybody knows an open source font which is better please let me know.

vantharith.oum wrote:

Per my understanding, many users prefer Hanuman font (with only 2 variants - normal and bold - I think, I will send an email to the font developer to add italic in the next edition/version) which is also available on Google Web fonts.

Link here - https://www.google.com/webfonts#QuickUsePlace:quickUse/Family:Hanuman:400,700

FYI, I just tested the book creator tool - there's some problem/error in the rending of Khmer unicode font - I mean the sequence or rendering is not correctly appeared.

I think, if you now try to replace the old font with this new one - Hanuman, first and see if we still encounter the same rending error.

Thanks,

vantharith.oum wrote:

Hi, I just tried any few attempts... but it lead to further error with below msg:

Render server error

An error occured on the render server: RuntimeError: RuntimeError: command failed with returncode 256: ['mw-zip', '-o', 'cache/ce/ceaea289539d052e/collection.zip', '-m', 'cache/ce/ceaea289539d052e/metabook.json', '--status', 'qserve://localhost:14311/ceaea289539d052e:makezip', '--config', 'http://km.wikipedia.org/wikipedia/km/w', '--template-blacklist', 'MediaWiki:PDF Template Blacklist', '--template-exclusion-category', 'Exclude in print', '--print-template-prefix', u'\u1794\u17c4\u17c7\u1796\u17bb\u1798\u17d2\u1796', '--print-template-pattern', u'$1/\u1794\u17c4\u17c7\u1796\u17bb\u1798\u17d2\u1796'] Last Output: 2011-09-04T13:26:59 mwlib.options.warn >> Both --print-template-pattern and --print-template-prefix (deprecated) specified. Using --print-template-pattern only. 1% creating nuwiki in u'cache/ce/ceaea289539d052e/tmpmWAmJy/nuwiki' /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/metabook.py:225: DeprecationWarning: deprecated call get('mw_license_url') if l.get('mw_license_url'): /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/metabook.py:240: DeprecationWarning: deprecated call get('mw_rights_text') if l.get('mw_rights_text'): /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/metabook.py:241: DeprecationWarning: deprecated getitem ['mw_rights_text'] wikitext = l['mw_rights_text'] /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/metabook.py:242: DeprecationWarning: deprecated call get('mw_rights_page') if l.get('mw_rights_page'): /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/metabook.py:244: DeprecationWarning: deprecated call get('mw_rights_url') if l.get('mw_rights_url'): /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/metabook.py:245: DeprecationWarning: deprecated getitem ['mw_rights_url'] wikitext += '\n\n' + l['mw_rights_url'] /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/metabook.py:250: DeprecationWarning: deprecated call get('name') retval.append(license(title=l.get('name', u'License'), retrying: could not fetch 'http://km.wikipedia.org/wikipedia/km/w/api.php?action=query&meta=siteinfo&siprop=general|namespaces|interwikimap|namespacealiases|magicwords|rightsinfo&format=json' Unhandled error in Deferred: Traceback (most recent call last): Failure: exceptions.RuntimeError: could not get collection params fatal: could not get collection params [[Failure instance: Traceback (failure with no frames): <class 'twisted.web.error.Error'>: 404 Not Found ]] Traceback (most recent call last): Failure: twisted.web.error.Error: 404 Not Found removing tmpdir u'cache/ce/ceaea289539d052e/tmpmWAmJy' 1% error Traceback (most recent call last): File "/home/pp/local/bin/mw-zip", line 9, in <module> load_entry_point('mwlib==0.12.16', 'console_scripts', 'mw-zip')() File "/home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/apps/buildzip.py", line 150, in main make_zip(output, options, env.metabook, podclient=podclient, status=status) File "/home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/apps/buildzip.py", line 52, in make_zip make_nuwiki(fsdir, metabook=metabook, options=options, podclient=podclient, status=status) File "/home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/mwlib/apps/make_nuwiki.py", line 223, in make_nuwiki raise RuntimeError(str(val)) RuntimeError: [Failure instance: Traceback (failure with no frames): <type 'exceptions.RuntimeError'>: could not get collection params ] in function system, file /home/pp/local/lib/python2.6/site-packages/mwlib-0.12.16-py2.6-linux-x86_64.egg/EGG-INFO/scripts/nslave.py, line 37 in function qaddw, file /home/pp/local/lib/python2.6/site-packages/qs/slave.py, line 66

Here's the url link - https://secure.wikimedia.org/wikipedia/km/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%80%E1%9E%B6%E1%9E%9A%E1%9E%85%E1%9E%84%E1%9E%80%E1%9F%92%E1%9E%9A%E1%9E%84&bookcmd=rendering&return_to=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F%3A%E1%9E%80%E1%9E%B6%E1%9E%9A%E1%9E%85%E1%9E%84%E1%9E%80%E1%9F%92%E1%9E%9A%E1%9E%84&collection_id=ceaea289539d052e&writer=odf

Thanks,

volker.haas wrote:

The problem is the false API URL [1] mwlib tries to use. Currently I do not understand why this URL is used at all.
If the correct URL (without the wikipedia/km/ in the URL [2]) everything works.

Could somebody please check if the configuration of the PDF export for km.wikipedia is wrong.

[1] http://km.wikipedia.org/wikipedia/km/w/api.php?action=query&meta=siteinfo&siprop=general|namespaces|interwikimap|namespacealiases|magicwords|rightsinfo&format=json

[2] http://km.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general|namespaces|interwikimap|namespacealiases|magicwords|rightsinfo&format=json

(In reply to comment #5)

'http://km.wikipedia.org/wikipedia/km/w', '--template-blacklist',

There's your problem. This is a bit of confusion between secure and non-secure URLs that I introduced by expanding $wgScriptPath as a canonical URL. Fixed in r96286.