Commit Graph

5854 Commits (a2c88e0690279b7daf6f6c69b54c37538fc18c64)

Author SHA1 Message Date
Joey Hess a2c88e0690 web commit by http://willu.myopenid.com/: Add note about rel="nofollow" as an anti-spam suggestion 2008-03-24 23:23:52 -04:00
Joey Hess c88ae3768e web commit by http://jblevins.org/: htmlscrubber patch to sanitize SVG and MathML 2008-03-24 15:47:13 -04:00
Joey Hess 6f5903b54d web commit by http://mjgoins.myopenid.com/ 2008-03-24 00:19:49 -04:00
Joey Hess 845e7fbd8e web commit by http://mjgoins.myopenid.com/ 2008-03-24 00:18:47 -04:00
Joey Hess afab05a505 web commit by http://jblevins.org/: Thoughts about notation for citations 2008-03-23 22:08:02 -04:00
Joey Hess cb8d1c8642 revert destpage part of f7bdc2385
destpage does not normally need to be worried about when creating other files
as part of the process of rendering a page. Using destpage results in
inlined pages creating two copies of such files. It works to not use destpage
in this case because the inlining page depends on the source page, so if the
source page is modified or deleted the inlining page will be updated.
2008-03-23 20:01:26 -04:00
Joey Hess d2911a20a6 inline: Allow the "feedshow" parameter to take values greater than the value for "show". 2008-03-23 17:39:03 -04:00
Joey Hess 3b49868eb9 Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2008-03-22 13:57:01 -04:00
Joey Hess 20271cf172 add loadindex/saveindex test suite 2008-03-22 13:56:44 -04:00
Joey Hess 5ed5babef4 web commit by http://madduck.net/: add note about whole site rebuilds for little changes 2008-03-22 12:02:39 -04:00
Joey Hess bee7d5d590 web commit by http://jblevins.org/: Notes about access keys from the main discussion page 2008-03-22 10:48:45 -04:00
Joey Hess 24599d2853 web commit by http://madduck.net/: put thoughts into the wishlist item 2008-03-21 19:45:38 -04:00
martin f. krafft 99bd29fc52 scan hook works, remove NotImplemented exception
Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 19:17:00 -04:00
martin f. krafft 616fcc8aef Do not output xml-rpc debugging
Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 19:17:00 -04:00
martin f. krafft 259d6e67a1 Flesh out pythondemo
This implements most hooks with stupid demo code, and also still has
some TODO items.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 19:17:00 -04:00
martin f. krafft 460d74fa78 Handle going down with an exception
We previously used None as a sentinel to exit, but None is now a proper
value, so now it's the job of an exception-like object (except it isn't
an exception).

Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 19:17:00 -04:00
martin f. krafft 9134145d82 put XMLStreamParser in public namespace
Since we might throw sub-class exceptions, the class should be in the
public namespace, meaning its name should not be prefixed with _.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 19:16:59 -04:00
Joey Hess fd2ddd9e87 Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2008-03-21 19:09:41 -04:00
Joey Hess 1c2f59239f typos 2008-03-21 19:09:29 -04:00
Joey Hess e8ff29fa33 web commit by http://jblevins.org/: Ideas about keyboard shortcuts 2008-03-21 18:14:06 -04:00
Joey Hess 060183df67 Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2008-03-21 16:34:17 -04:00
Joey Hess 479f75abf4 defer po and pot file updating until package build time
This allows make to be run without polluting the tree with lots of po file
changes.
2008-03-21 16:32:23 -04:00
Joey Hess 6d5bce3935 web commit by http://madduck.net/ 2008-03-21 16:21:18 -04:00
Joey Hess 9cc6d6e4b8 on css suckitude 2008-03-21 15:41:41 -04:00
Joey Hess ca8852b434 external: Work around XML RPC's lack of support for null by passing a special sentinal value. 2008-03-21 15:12:15 -04:00
martin f. krafft 17dc5df1f5 Allow individual hook registration to override ID
The preprocessor hooks need to specify IDs different from the ID used to
initialise the proxy. Thus, the hook function now takes an optional id
keyword argument and uses the ID used during initialisation if none is
provided.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 15:07:10 -04:00
martin f. krafft 86ec72c826 Refactor remote procedure calls in the proxy
Add an rpc() method to the proxy to allow users to call remote
procedures, and route the proxy's own import registration via this
function.

Also, implement convenience functions for the RPC calls exported in the
IkiWiki::XML::RPC namespace.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 15:07:10 -04:00
martin f. krafft 33e3528cd9 Make proxy object available to hook functions
Hook functions now get the proxy object as first argument to be able to
use RPC via the proxy.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 15:07:10 -04:00
martin f. krafft 5184b8abfc add last parameter to plugin registration
Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 15:07:10 -04:00
martin f. krafft e3624de63c Allow external plugins to return no value
Instead of using the XML-RPC v2 extension <nil/>, which Perl's
XML::RPC::Parser does not (yet) support (Joey's patch is pending), we
agreed on a sentinel: {'null':''}, that is, a hash with a single key
"null" pointing to the empty string.

The Python proxy automatically converts None appropriately and raises an
exception if a hook function should, by weird coincidence, attempt to
return {'null':''}.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2008-03-21 15:07:10 -04:00
Joey Hess 99fce0af0d Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2008-03-21 14:53:41 -04:00
Joey Hess 5d9ed614db fix page source storing
This saves space, and stores the data under the right keys.
2008-03-21 14:42:59 -04:00
Joey Hess 5e52e05fd2 web commit by http://jblevins.org/: Case-sensitivity of HTML::Scrubber 2008-03-21 13:58:25 -04:00
Joey Hess e3866fd94f fix transition call 2008-03-21 13:56:52 -04:00
Joey Hess f9aa09e2f6 moved to a tip 2008-03-21 13:56:31 -04:00
Joey Hess fbe5e9b144 add a tip about dealing with ikiwiki's binary state files 2008-03-21 13:52:50 -04:00
Joey Hess 82ecf0aa9d fix transitioning of page state 2008-03-21 13:22:47 -04:00
Joey Hess 6ba56392ce web commit by http://jblevins.org/: Fix links and sign 2008-03-21 11:40:33 -04:00
Joey Hess 7eebd3709b web commit by http://jblevins.org/: Request for comments about SVG and MathML whitelists 2008-03-21 11:19:00 -04:00
Joey Hess 3479809f96 add transition code for indexdb 2008-03-21 09:37:52 -04:00
Joey Hess 213eb2e408 Changed to a binary index file, written using Storable, for speed
During refresh of a wiki with 800 files, loadindex was using more total
time than any other function, and saveindex was also in the top ten.
Rewriting them to use Storable makes them three times as fast.

0.7 seconds is saved on my laptop in profiling mode.
2008-03-21 09:07:44 -04:00
Joey Hess bf7360347e Precompile pagespecs, about 10% overall speedup
About 12% of ikiwiki runtime was spent in pagespec_match. It was evaling
the same pagespec code over and over again. This changes pagespec_translate
to return memoized, precompiled functions that can be called to match against
a given pagespec.

This also allows getting rid of the weird variable scoping trick that had
to be in effect for pagespec_translate to be called -- the variables are
now just fed into the function it returns.

On my laptop, this drops build time for the docwiki from about 60 to 50
seconds.
2008-03-21 06:36:07 -04:00
Joey Hess f40fec811d improve comment 2008-03-21 05:59:33 -04:00
Joey Hess f030bce812 updates to support current version of Devel::Profile 2008-03-21 05:09:42 -04:00
Joey Hess 14b3e645a8 work around perl warning 2008-03-21 05:08:04 -04:00
Joey Hess 42b6a6178c delete inline data after it's used 2008-03-21 04:51:14 -04:00
Joey Hess f937c1fb80 crazy optimisation to work around slow markdown
Markdown is slow. Especially if it has to process an enormous page. The
most common enormous page is currently the recentchanges page, which gets
processed a lot, and contains very little actual markdown. Most of it is a
big <div>, which markdown skips ... slowly.

This is a rather sick optimisation to work around markdown's speed issues.
Now inline inserts a small, dummy div, allows markdown to quickly render
the actual page content, then replaces the dummy with the actual inlined
pages later.

Results: Rendering just a recentchanges page, with diffs included, dropped
from 4.5 seconds to 2.7 seconds on my laptop. Building the entire wiki
dropped from 46.6 seconds to 39.5 seconds.

(It would be better if inline were a *post*-processor directive.)
2008-03-21 04:48:26 -04:00
Joey Hess 0b9e849aba process smilies in a sanitize hook
I had to move it to sanitize so all the markup is htmlized, so it can scan
for <pre> and <code>.
2008-03-21 03:16:28 -04:00
Joey Hess cd6055a893 another fix
I'm suprised that the second m//g didn't seem to clobber @-, but I don't
want to rely on that, so preserve it beforehand.
2008-03-21 02:57:34 -04:00
Joey Hess 88b5a0ece5 various fixes and simplifications 2008-03-21 02:55:14 -04:00