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.
Hi,
today we came over 10k HTTP requests per second (even with inter-squid
traffic eliminated). Especially thanks to Mark and Tim, who've been
improving our caching, as well as doing lots of other work, and
achieved incredible results (while I was slacking). Really, thanks!
Domas
On Thu, Jul 27, 2006 at 12:05:57AM -0600, Chad Perrin wrote:
> > Please don't construe this statement as a veiled snipe at PHP (or Java, or
> > any other language). It's just an observation of fact.
>
> I should help stab someone for choosing PHP, too, for that matter -- but
> we work with what we've got.
Unthreaded: in a clear field, Chad, what *would* you have implemented
MediaWiki in? And why?
(Thread-kill is your friendi, folks...)
Cheers,
-- jra
--
Jay R. Ashworth jra(a)baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274
Fanfic: read enough, and you'll loose your mind. --me
I found this rather interesting page on PHP optimization:
http://www.php.lt/benchmark/phpbench.php. It concludes that the
difference between single and double quotes is negligible altogether,
unless you're using an unescaped $ and *not* referring to a variable
(which understandably seems to confuse the interpreter a bit). I have
no idea what version of PHP that is, however.
An automated run of parserTests.php showed the following failures:
Running test Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test Magic Word: {{CURRENTMONTHNAMEGEN}}... FAILED!
Running test Template with thumb image (wiht link in description)... FAILED!
Running test message transform: <noinclude> in transcluded template (bug 4926)... FAILED!
Running test message transform: <onlyinclude> in transcluded template (bug 4926)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test Parsing optional HTML elements (Bug 6171)... FAILED!
Running test Inline HTML vs wiki block nesting... FAILED!
Running test Mixing markup for italics and bold... FAILED!
Running test 5 quotes, code coverage +1 line... FAILED!
Running test HTML Hex character encoding.... FAILED!
Running test dt/dd/dl test... FAILED!
Passed 412 of 429 tests (96.04%) FAILED!
Hashar noticed that for simple string literals, single quotes are faster
than double quotes, if you count both parse time and execution time.
This is reasonably easy to understand: single quotes have only two
special characters, \ and ', so the loop body to process them would be
simpler. Some people went on to assert that by extension $foo.' '.$bar
is faster than "$foo $bar", without doing any benchmarks. I was never
convinced of this.
I did a benchmark where I had one file which looked like this:
<?php
$foo = 'foo';
$bar = 'bar';
echo "
$foo $bar $foo $bar $foo $bar $foo $bar $foo $bar $foo $bar $foo $bar
...
?>
And one file that looked like this:
<?php
$foo = 'foo';
$bar = 'bar';
echo
$foo.' '.$bar.' '.$foo.' '.$bar.' '.$foo.' '.$bar.' '.$foo.' '.$bar.
...
?>
There were 10000 "foo bar" strings output by each one. On my laptop,
with no bytecode caching, string interpolation was 12 times faster than
concatenation.
Document Path: /test/concatenation.php
Document Length: 80001 bytes
Concurrency Level: 1
Time taken for tests: 7.420670 seconds
Complete requests: 10
Failed requests: 0
Write errors: 0
Total transferred: 801670 bytes
HTML transferred: 800010 bytes
Requests per second: 1.35 [#/sec] (mean)
Time per request: 742.067 [ms] (mean)
Time per request: 742.067 [ms] (mean, across all concurrent requests)
Transfer rate: 105.38 [Kbytes/sec] received
Document Path: /test/string_interpolation.php
Document Length: 82242 bytes
Concurrency Level: 1
Time taken for tests: 0.610879 seconds
Complete requests: 10
Failed requests: 0
Write errors: 0
Total transferred: 824080 bytes
HTML transferred: 822420 bytes
Requests per second: 16.37 [#/sec] (mean)
Time per request: 61.088 [ms] (mean)
Time per request: 61.088 [ms] (mean, across all concurrent requests)
Transfer rate: 1316.14 [Kbytes/sec] received
The slightly longer filesize in the string_interpolation.php case was
because I used line breaks embedded in the string to break up powers of
10, whereas in concatenation.php the line breaks were not in the strings.
The main reason I'm doing this is because I think $foo.' '.$bar looks
ugly compared to "$foo $bar", and it also takes up more screen space. I
doubt the performance gain would be significant either way,
concatenation takes only 19us. I just don't like seeing the MediaWiki
codebase uglied up for specious reasons.
-- Tim Starling
Hi,
I dont know if this is the right place to ask. So please point me in the
right direction if not.
Is it possible to update an article via an sql-statement? What I want to
do:
I have a script wich collects texts from other sources:
e.g. /proc/cpuinfo or texts from external websites.
And I have an article named: computername
Now I want to update the article "computername" with the text from a
local file via SQL in a bash script (or a php script...).
Is it possible? Or are there some solutions for this problem?
thanks for any hints.
greetings mario
An automated run of parserTests.php showed the following failures:
Running test Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test Magic Word: {{CURRENTMONTHNAMEGEN}}... FAILED!
Running test Template with thumb image (wiht link in description)... FAILED!
Running test message transform: <noinclude> in transcluded template (bug 4926)... FAILED!
Running test message transform: <onlyinclude> in transcluded template (bug 4926)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test Parsing optional HTML elements (Bug 6171)... FAILED!
Running test Inline HTML vs wiki block nesting... FAILED!
Running test Mixing markup for italics and bold... FAILED!
Running test 5 quotes, code coverage +1 line... FAILED!
Running test HTML Hex character encoding.... FAILED!
Running test dt/dd/dl test... FAILED!
Passed 412 of 429 tests (96.04%) FAILED!