Infrastructure
  1. Infrastructure
  2. INFRA-6053

addwiki - allow customisation of initial Wiki pages

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major 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 added a comment -
        Turns out AdminGroup does have to be explicitly listed.
        Show
        Sebb added a comment - Turns out AdminGroup does have to be explicitly listed.
        Hide
        #asfinfra IRC 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
        #asfinfra IRC 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 added a comment -
        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 added a comment - 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
        #asfinfra IRC Bot added a comment -
        <danielsh> -1 on making the local variable names a templating API
        Show
        #asfinfra IRC Bot added a comment - <danielsh> -1 on making the local variable names a templating API
        Hide
        Sebb added a comment -
        New patch to follow
        Show
        Sebb added a comment - New patch to follow
        Hide
        Sebb added a comment -
        Replacement patch that only changes the required strings.
        No need to change the source pages anymore
        Show
        Sebb added a comment - Replacement patch that only changes the required strings. No need to change the source pages anymore
        Hide
        Gavin added a comment -
        Patch applied, thanks.
        Show
        Gavin added a comment - Patch applied, thanks.
        Hide
        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
        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 added a comment -
        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 added a comment - 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
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development