Uploaded image for project: 'Infrastructure'
  1. Infrastructure
  2. INFRA-6053

addwiki - allow customisation of initial Wiki pages

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: Initial Clearing
    • Component/s: MoinMoin
    • Labels:
      None

      Description

      The initial set of Wiki pages currently has some references to the Wiki name and project name in the ContributorsGroup and FrontPage pages.

      These references are not currently changed to suit the new Wiki.

      The patches add variable processing to the addwiki script, and update the pages to use the new facility.

        Activity

        Hide
        sebb@apache.org Sebb added a comment - Reporter
        Turns out AdminGroup does have to be explicitly listed.
        Show
        sebb@apache.org Sebb added a comment - Reporter Turns out AdminGroup does have to be explicitly listed.
        Hide
        infrabot #asfinfra Bot added a comment -
        <danielsh> KISS. Just do s/{{WIKINAME}}/$wikiname/g please - making script local varaible names a templating API isn't a good idea. With that change (and assuming it won't break anything else) +1 to commit
        Show
        infrabot #asfinfra Bot added a comment - <danielsh> KISS. Just do s/{{WIKINAME}}/$wikiname/g please - making script local varaible names a templating API isn't a good idea. With that change (and assuming it won't break anything else) +1 to commit
        Hide
        sebb@apache.org Sebb added a comment - Reporter
        I was originally going to just process specific variables, but then I saw how createConfig worked and decided to follow that example.
        It seemed safe enough, given that it needs {{! and }} around the variable names - unlikely to occur in those two pages by accident.

        There is more than just the WIKINAME that needs to be changed - the projectName is also needed for the mailing list.

        But if you still want me to rework it I can.

        It would even be possible to avoid changing the source pages in that case, though of course the substitution would then be much more dependent on the content (especially of the ContributorsGroup page). Then again, the script could detect the failed substitution and warn or die.
        Show
        sebb@apache.org Sebb added a comment - Reporter I was originally going to just process specific variables, but then I saw how createConfig worked and decided to follow that example. It seemed safe enough, given that it needs {{! and }} around the variable names - unlikely to occur in those two pages by accident. There is more than just the WIKINAME that needs to be changed - the projectName is also needed for the mailing list. But if you still want me to rework it I can. It would even be possible to avoid changing the source pages in that case, though of course the substitution would then be much more dependent on the content (especially of the ContributorsGroup page). Then again, the script could detect the failed substitution and warn or die.
        Hide
        infrabot #asfinfra Bot added a comment -
        <danielsh> -1 on making the local variable names a templating API
        Show
        infrabot #asfinfra Bot added a comment - <danielsh> -1 on making the local variable names a templating API
        Hide
        sebb@apache.org Sebb added a comment - Reporter
        New patch to follow
        Show
        sebb@apache.org Sebb added a comment - Reporter New patch to follow
        Hide
        sebb@apache.org Sebb added a comment - Reporter
        Replacement patch that only changes the required strings.
        No need to change the source pages anymore
        Show
        sebb@apache.org Sebb added a comment - Reporter Replacement patch that only changes the required strings. No need to change the source pages anymore
        Hide
        ipv6guru Gavin added a comment -
        Patch applied, thanks.
        Show
        ipv6guru Gavin added a comment - Patch applied, thanks.
        Hide
        ipv6guru Gavin added a comment -
        btw - you could have just opened the $DIRNAME/data/$wikiName/pages/$page/revisions/00000001 pages directly and avoided re-fetching the template versions (in share) that were already just put there. IMO
        Show
        ipv6guru Gavin added a comment - btw - you could have just opened the $DIRNAME/data/$wikiName/pages/$page/revisions/00000001 pages directly and avoided re-fetching the template versions (in share) that were already just put there. IMO
        Hide
        sebb@apache.org Sebb added a comment - Reporter
        AFAICT that would have meant:
        * reading & caching the whole file and then writing it OR
        * playing with temporary files and renaming.

        Starting afresh seemed simpler.
        Show
        sebb@apache.org Sebb added a comment - Reporter AFAICT that would have meant: * reading & caching the whole file and then writing it OR * playing with temporary files and renaming. Starting afresh seemed simpler.

          People

          • Assignee:
            Unassigned
            Reporter:
            sebb@apache.org Sebb
            Request participants:
            None
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: