Hi everyone,
I recently set up a MediaWiki (http://server.bluewatersys.com/w90n740/)
and I need to extra the content from it and convert it into LaTeX
syntax for printed documentation. I have googled for a suitable OSS
solution but nothing was apparent.
I would prefer a script written in Python, but any recommendations
would be very welcome.
Do you know of anything suitable?
Kind Regards,
Hugo Vincent,
Bluewater Systems.
Added Jan Gerber ('j'). Jan is the developer of Firefogg, and will be
helping out with some of the open video player & sequencer work with
Michael Dale that Kaltura's sponsoring.
-- brion
I've been putting placeholder images on a lot of articles on en:wp.
e.g. [[Image:Replace this image male.svg]], which goes to
[[Wikipedia:Fromowner]], which asks people to upload an image if they
own one.
I know it's inspired people to add free content images to articles in
several cases. What I'm interested in is numbers. So what I'd need is
a list of edits where one of the SVGs that redirects to
[[Wikipedia:Fromowner]] is replaced with an image. (Checking which of
those are actually free …
[View More]images can come next.)
Is there a tolerably easy way to get this info from a dump? Any
Wikipedia statistics fans who think this'd be easy?
(If the placeholders do work, then it'd also be useful convincing some
wikiprojects to encourage the things. Not that there's ownership of
articles on en:wp, of *course* ...)
- d.
[View Less]
I am trying to automate uploading images (or files). We are currently using mediaWiki version 1.13.2.
I am using the following code:
$data=array( 'wpIgnoreWarning'=>'1',
'wpDestFile'=>="$bulkImageDirectory/$fname",
'wpReUpload'=>'1',
'wpUpload'=>'1',
'wpUploadFile'=>$fname,
);
$webrequest=new FauxRequest( $data, true );
$uploader=new UploadForm( $webrequest );
…
[View More] $uploader->mUploadSize=$zipfile['size'];
$uploader->mUploadTempName="$bulkImageDirectory/$fname";
$uploader->mOname=$fname;
$uploader->mSessionKey='1';
$uploader->processUpload();
$fname is a relative file name, while ="$bulkImageDirectory/$fname" is the absolute file name. The file is located in wiki/images/tmp/bulkImages/.
I receive the error: "The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file." And the upload form displays on the screen with wpDestFile filled in.
Three questions:
Do you know what the problem is?
Is there another way to automatically upload a file within an extension?
Is there documentation on this?
Thanks,
Mary Beebe
[View Less]
As many folks have noted, our current templating system works ok for
simple things, but doesn't scale well -- even moderately complex
conditionals or text-munging will quickly turn your template source into
what appears to be line noise.
And we all thought Perl was bad! ;)
There's been talk of Lua as an embedded templating language for a while,
and there's even an extension implementation.
One advantage of Lua over other languages is that its implementation is
optimized for use as an …
[View More]embedded language, and it looks kind of pretty.
An _inherent_ disadvantage is that it's a fairly rarely-used language,
so still requires special learning on potential template programmers' part.
An _implementation_ disadvantage is that it currently is dependent on an
external Lua binary installation -- something that probably won't be
present on third-party installs, meaning Lua templates couldn't be
easily copied to non-Wikimedia wikis.
There are perhaps three primary alternative contenders that don't
involve making up our own scripting language (something I'd dearly like
to avoid):
* PHP
Advantage: Lots of webbish people have some experience with PHP or can
easily find references.
Advantage: we're pretty much guaranteed to have a PHP interpreter
available. :)
Disadvantage: PHP is difficult to lock down for secure execution.
* JavaScript
Advantage: Even more folks have been exposed to JavaScript programming,
including Wikipedia power-users.
Disadvantage: Server-side interpreter not guaranteed to be present. Like
Lua, would either restrict our portability or would require an
interpreter reimplementation. :P
* Python
Advantage: A Python interpreter will be present on most web servers,
though not necessarily all. (Windows-based servers especially.)
Wash: Python is probably better known than Lua, but not as well as PHP
or JS.
Disadvantage: Like PHP, Python is difficult to lock down securely.
Any thoughts? Does anybody happen to have a PHP implementation of a Lua
or JavaScript interpreter? ;)
-- brion
[View Less]
I logged in to zh.wikipedia.org and it says I am $1. en.wikipedia.org
didn't have that problem.
您現在以「$1」的身分登入維基百科。
如果您對維基百科有任何問題的話,請參看幫助頁。
您已登入其他的維基媒體計劃:
Just shooting out a quick thought before I forget again -- it would be
helpful in a number of places to be able to reference "internal"
software-provided images from wikitext.
A primary example is for help pages and inline explanatory text in parts
of the UI which we want to be able to customize. This is something
that's coming up a lot in things the Usability crew is working on --
folding the wiki markup cheat sheet into mini-help pages accessible from
the editor, having screen shots …
[View More]for skins and features so users can see
what things are about before enabling them, etc.
One "simple" implementation could be to slip in a custom FileRepo, so
they could be referred to just like other images:
[[Image:help-markup-example-thumbnail.jpg]]
To be slightly more complex, we could give them a unique sub-namespace
of some sort, or strip out hardcoded extensions so that types can be
more flexible.
Skins might want/need to be able to override certain names, too... and
we might consider about needs for localized images -- whether RTL/LTR
only or actually making translations available.
Any thoughts?
-- brion
[View Less]