[OLPC library] Overweight Wiki Page

Jameson "Chema" Quinn jquinn at cs.oberlin.edu
Thu Feb 21 11:05:26 EST 2008


SJ's answer is the best one. However, if you want a kludgey hack, you could
do something like

http://wiki.laptop.org/go/User:Homunq/toctest

This uses template substitution to manually create links to subpage#section
in the section headers. It means that someone editing the subpage later will
see:

== [[subpage#section|section]] ==

as the section headers, and will have to edit the section name twice; but at
least those two instances are right in the same place. Any new sections they
create would have to use the template or follow the format above, or they
would be unreachable directly from the main TOC.

Obviously, you could write a bot to fix your headers the first time, or even
write one which periodically checks and fixes any newly-created

== normal headers ==

.

Again, the better solution would be a mediawiki extension, if you do PHP.

Jameson


On Thu, Feb 21, 2008 at 2:34 AM, Samuel Klein <meta.sj at gmail.com> wrote:

> Derw,
>
> Having a way to generate an aggregate table of contents for a set of
> pages without transcluding the text of those pages could be useful.  I
> don't believe it has been written; as far as I know this would be the
> first magic word[1] in MediaWiki that parses the text of another
> wikipage and outputs some function of that in the current page.
>
> Note that a common workaround is to make such a table of contents by
> hand, not to make it too finely grained, and to update it by hand when
> subpages change.  See for instance the [[HIG]] header.
>
> SJ
>
> [1] http://meta.wikimedia.org/wiki/Help:Magic_words
>
>
> On Wed, Feb 20, 2008 at 5:46 PM, drew einhorn <drew.einhorn at gmail.com>
> wrote:
> > Hi,
> >
> >  I've got a couple variations on a way overweight wiki page.
> >
> >  It began as a MS Word file, and it's been through Open Office,
> >  shell, sed, perl, awk, python and the result is not too shabby.
> >
> >  Should publish it, but really ought to rewrite it all in python first.
> >
> >  Is there a way to use the command line to open a .doc file in
> >  Open Office and save it as html an can add to my polyglot
> >  assortment of scripts, in the meantime?
> >
> >  The first version at:
> >
> >     http://wiki.laptop.org/go/VistA_Monograph_Wiki
> >
> >  gets:
> >
> >  WARNING: This page is 246 kilobytes long; some browsers may have
> >  problems editing pages approaching or longer than 32kb. Please
> >  consider breaking the page into smaller sections.
> >
> >  I've been looking at breaking it up and reassembling it using
> >  templates and there is a partial version at:
> >
> >     http://wiki.laptop.org/go/WV_VM
> >
> >  Is there a easy way to transfer all 70 some pieces at once,
> >  instead of doing them one at a time using
> >
> >     http://wiki.laptop.org/go/Special:Upload
> >
> >  But wait that's only for Images not for Pages.
> >
> >  And when the templates all get reassembled it's going to
> >  be just as big, if not a little bigger.
> >
> >  What I really need is a syntactic variant, that builds a
> >  combined Table of Contents, but does not put all the
> >  pieces together into a combined wiki page, the links
> >  in the Table of Contents take you the right spot in
> >  one of the component pages.
> >
> >  Does that capability exist, or am I just dreaming?
> >
> >  --
> >  Drew Einhorn
> >  _______________________________________________
> >  Devel mailing list
> >  Devel at lists.laptop.org
> >  http://lists.laptop.org/listinfo/devel
> >
> _______________________________________________
> Library mailing list
> Library at lists.laptop.org
> http://lists.laptop.org/listinfo/library
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20080221/c6353b5f/attachment.html>


More information about the Devel mailing list