Loading ...
Sorry, an error occurred while loading the content.

[Cheetahtemplate-discuss] #indent premiminary implementation

Expand Messages
  • Mike Orr
    I ve checked in a version of the #indent directive. This one uses Robert s code with minor modifications. I plan to refactor it more in the next few days and
    Message 1 of 8 , Jun 23, 2002
    • 0 Attachment
      I've checked in a version of the #indent directive. This one uses
      Robert's code with minor modifications. I plan to refactor it more in
      the next few days and modify the directive syntax. So I don't recommend
      using it yet unless your name is Robert Kuzelj, but you can look at
      the code if you like.

      Currently, only Robert's example (generating indented Java source) has
      been tested. Still to test are having indented input but no indentation
      on output. I also have a plan for tying $placeholders into the
      indentation via a filter, but this is not implemented yet.

      Modified Compiler.py:
      If the template definition contains the substring '#indent', filter
      it through a function in Cheetah.Utils.Indenter.

      Modified Template.py:
      ._indenter is an instance of the Indenter class in
      Cheetah.Utils.Indenter. (Robert called this .indent__).
      It's always called as $self._indenter.METHOD() to prevent finding
      another '_indenter' object in the searchList.

      New module Utils/Indenter.py:
      Indenter class is used by Template and may be used standalone.
      indentize() function preprocesses the #indent directives.

      I think we should eventually make #indent a bona fide directive rather
      than being preprocessed, but I don't have the expertise to do that at
      present.

      Uploaded new versions of the Users' Guide and Developers' Guide to the
      www.cheetahtemplate.org. The UG has a new section (6.8) for #indent and
      shows the syntax I plan to implement, along with sections showing how
      to do diagnostic output (as discussed recently) (11.2) and when to use
      a Python method instead of a #def method (11.3). The DG has a new
      section (17.2) on building regression tests (unittests).

      Once I finish up #indent, I'll be working on the 'cheetah' command.

      --
      -Mike (Iron) Orr, iron@... (if mail problems: mso@...)
      http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol


      -------------------------------------------------------
      Sponsored by:
      ThinkGeek at http://www.ThinkGeek.com/
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • robert_kuzelj@yahoo.com
      hi mike, thanks for the realy great how-to . i am still a newbie at those things. ciao robertj ... Robert Kuzelj Gaissacherstrasse 7 email:
      Message 2 of 8 , Jul 1, 2002
      • 0 Attachment
        hi mike,

        thanks for the realy great "how-to". i am still
        a newbie at those things.

        ciao robertj
        ------------------------------------------------------------
        Robert Kuzelj
        Gaissacherstrasse 7 email: robert_kuzelj@...
        81371 Muenchen tel: 0177/5302230

        the trinity of desirables of (software) architecture:
        Firmitas, Utilitas, Venustas (marcus vitruvius 20 BC)
        strength, utility, beauty

        ----- Original Message -----
        From: "Mike Orr" <iron@...>
        To: <robert_kuzelj@...>; "Tavis Rudd" <tavis@...>
        Sent: Saturday, June 29, 2002 9:32 PM
        Subject: Re: [Cheetahtemplate-discuss] #indent premiminary implementation


        > On Sat, Jun 29, 2002 at 01:14:11PM +0200, robert_kuzelj@... wrote:
        > > did when will there be a new build?
        > > i am just to lazy and unwilling to
        > > get all this stuff out of the cvs ;-)
        >
        > Tavis does the builds, so whenever he feels like it. I think we're
        > getting close to 1.0, once the 'cheetah' command is revised. Everything
        > else is backward-compatible enhancements. However, I'll be out of town
        > July 4-24 so I won't be working on Cheetah. Maybe we can have one more
        > interim release and then release 1.0 at the end of August.
        >
        > Downloading the CVS version is easy. You just have to have cvs installed.
        > http://sourceforge.net/cvs/?group_id=28961
        >
        >
        cvs -d:pserver:anonymous@...:/cvsroot/cheeta
        htemplate login
        >
        > [Press "Enter" at the password prompt.]
        >
        >
        cvs -z3 -d:pserver:anonymous@...:/cvsroot/ch
        eetahtemplate co Cheetah
        >
        > [Checks out the Cheetah module into subdir Cheetah/.]
        >
        >
        cvs -z3 -d:pserver:anonymous@...:/cvsroot/ch
        eetahtemplate co CheetahDocs
        >
        > [Checks out the CheetahDocs module into subdir CheetahDocs/. (Optional)]
        >
        > [Move your old Cheetah out of the way since there may be significant
        > differences.]
        >
        > cd PYTHON_LIBRARY/site-packages
        > mv Webware Webware_
        > mv Webware.pth Webware.pth_
        >
        > [Now install the new version.]
        >
        > cd Cheetah
        > python setup.py install
        >
        > [Later, when you want to get the latest updates. No need to log in.]
        >
        > cd Cheetah
        > cvs update -dP
        > python setup.py install
        >
        >
        > --
        > -Mike (Iron) Orr, iron@... (if mail problems: mso@...)
        > http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol



        -------------------------------------------------------
        This sf.net email is sponsored by:ThinkGeek
        Welcome to geek heaven.
        http://thinkgeek.com/sf
        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Jeff Johnson
        I remember a few months back, SkeletonPage.tmpl was not being compiled and installed. Has that been fixed? ... This sf.net email is sponsored by:ThinkGeek
        Message 3 of 8 , Jul 2, 2002
        • 0 Attachment
          I remember a few months back, SkeletonPage.tmpl was not being compiled
          and installed. Has that been fixed?




          -------------------------------------------------------
          This sf.net email is sponsored by:ThinkGeek
          Welcome to geek heaven.
          http://thinkgeek.com/sf
          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        • Tavis Rudd
          ... Actually it was SkeletonPage.py that I d forgotten about when cutting a release. That has been fixed in the newer releases, but you still have to build
          Message 4 of 8 , Jul 2, 2002
          • 0 Attachment
            On July 2, 2002 07:33 am, Jeff Johnson wrote:
            > I remember a few months back, SkeletonPage.tmpl was not being compiled
            > and installed. Has that been fixed?

            Actually it was SkeletonPage.py that I'd forgotten about when cutting a
            release. That has been fixed in the newer releases, but you still have to
            build compile it yourself when checking Cheetah out of the cvs. Why do you
            ask?

            Tavis


            -------------------------------------------------------
            This sf.net email is sponsored by:ThinkGeek
            Welcome to geek heaven.
            http://thinkgeek.com/sf
            _______________________________________________
            Cheetahtemplate-discuss mailing list
            Cheetahtemplate-discuss@...
            https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
          • Mike Orr
            ... Shouldn t the setup program do the compiling? An alternative we ve talked about is putting a precompiled version in the CVS, but that seems wrong (and it
            Message 5 of 8 , Jul 2, 2002
            • 0 Attachment
              On Tue, Jul 02, 2002 at 10:00:39AM -0700, Tavis Rudd wrote:
              > On July 2, 2002 07:33 am, Jeff Johnson wrote:
              > > I remember a few months back, SkeletonPage.tmpl was not being compiled
              > > and installed. Has that been fixed?
              >
              > Actually it was SkeletonPage.py that I'd forgotten about when cutting a
              > release. That has been fixed in the newer releases, but you still have to
              > build compile it yourself when checking Cheetah out of the cvs. Why do you
              > ask?

              Shouldn't the setup program do the compiling?

              An alternative we've talked about is putting a precompiled version in
              the CVS, but that seems wrong (and it won't work if the user has a
              different version of Python than the developer).

              CVS users should not have to magically know to compile SkeletonPage.tmpl
              before running the tests.

              --
              -Mike (Iron) Orr, iron@... (if mail problems: mso@...)
              http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol


              -------------------------------------------------------
              This sf.net email is sponsored by:ThinkGeek
              Welcome to geek heaven.
              http://thinkgeek.com/sf
              _______________________________________________
              Cheetahtemplate-discuss mailing list
              Cheetahtemplate-discuss@...
              https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
            • Tavis Rudd
              ... Why wouldn t it? We d put a .py file in there not a .pyc. I d prefer to do this as there is a chance of breaking something in the install routine. ...
              Message 6 of 8 , Jul 2, 2002
              • 0 Attachment
                On July 2, 2002 11:04 am, Mike Orr wrote:
                > On Tue, Jul 02, 2002 at 10:00:39AM -0700, Tavis Rudd wrote:
                > > On July 2, 2002 07:33 am, Jeff Johnson wrote:
                > > > I remember a few months back, SkeletonPage.tmpl was not being compiled
                > > > and installed. Has that been fixed?
                > >
                > > Actually it was SkeletonPage.py that I'd forgotten about when cutting a
                > > release. That has been fixed in the newer releases, but you still have
                > > to build compile it yourself when checking Cheetah out of the cvs. Why do
                > > you ask?
                >
                > Shouldn't the setup program do the compiling?


                > An alternative we've talked about is putting a precompiled version in
                > the CVS, but that seems wrong (and it won't work if the user has a
                > different version of Python than the developer).

                Why wouldn't it? We'd put a .py file in there not a .pyc.
                I'd prefer to do this as there is a chance of breaking something in the
                install routine.

                > CVS users should not have to magically know to compile SkeletonPage.tmpl
                > before running the tests.

                Agreed.


                -------------------------------------------------------
                This sf.net email is sponsored by:ThinkGeek
                Welcome to geek heaven.
                http://thinkgeek.com/sf
                _______________________________________________
                Cheetahtemplate-discuss mailing list
                Cheetahtemplate-discuss@...
                https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
              • Mike Orr
                ... Yeah, I confused the two different kinds of compiling. ... OK, done. -- -Mike (Iron) Orr, iron@mso.oz.net (if mail problems: mso@oz.net) http://iron.cx/
                Message 7 of 8 , Jul 2, 2002
                • 0 Attachment
                  On Tue, Jul 02, 2002 at 11:59:22AM -0700, Tavis Rudd wrote:
                  > On July 2, 2002 11:04 am, Mike Orr wrote:
                  > > On Tue, Jul 02, 2002 at 10:00:39AM -0700, Tavis Rudd wrote:
                  > > > On July 2, 2002 07:33 am, Jeff Johnson wrote:
                  > > > > I remember a few months back, SkeletonPage.tmpl was not being compiled
                  > > > > and installed. Has that been fixed?
                  > > >
                  > > Shouldn't the setup program do the compiling?
                  >
                  >
                  > > An alternative we've talked about is putting a precompiled version in
                  > > the CVS, but that seems wrong (and it won't work if the user has a
                  > > different version of Python than the developer).
                  >
                  > Why wouldn't it? We'd put a .py file in there not a .pyc.

                  Yeah, I confused the two different kinds of compiling.

                  > I'd prefer to do this as there is a chance of breaking something in the
                  > install routine.

                  OK, done.

                  --
                  -Mike (Iron) Orr, iron@... (if mail problems: mso@...)
                  http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol


                  -------------------------------------------------------
                  This sf.net email is sponsored by:ThinkGeek
                  Welcome to geek heaven.
                  http://thinkgeek.com/sf
                  _______________________________________________
                  Cheetahtemplate-discuss mailing list
                  Cheetahtemplate-discuss@...
                  https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
                • Tavis Rudd
                  excellent. ... This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________
                  Message 8 of 8 , Jul 2, 2002
                  • 0 Attachment
                    excellent.

                    On July 2, 2002 12:42 pm, Mike Orr wrote:
                    > On Tue, Jul 02, 2002 at 11:59:22AM -0700, Tavis Rudd wrote:
                    > > On July 2, 2002 11:04 am, Mike Orr wrote:
                    > > > On Tue, Jul 02, 2002 at 10:00:39AM -0700, Tavis Rudd wrote:
                    > > > > On July 2, 2002 07:33 am, Jeff Johnson wrote:
                    > > > > > I remember a few months back, SkeletonPage.tmpl was not being
                    > > > > > compiled and installed. Has that been fixed?
                    > > >
                    > > > Shouldn't the setup program do the compiling?
                    > > >
                    > > >
                    > > > An alternative we've talked about is putting a precompiled version in
                    > > > the CVS, but that seems wrong (and it won't work if the user has a
                    > > > different version of Python than the developer).
                    > >
                    > > Why wouldn't it? We'd put a .py file in there not a .pyc.
                    >
                    > Yeah, I confused the two different kinds of compiling.
                    >
                    > > I'd prefer to do this as there is a chance of breaking something in the
                    > > install routine.
                    >
                    > OK, done.



                    -------------------------------------------------------
                    This sf.net email is sponsored by:ThinkGeek
                    Welcome to geek heaven.
                    http://thinkgeek.com/sf
                    _______________________________________________
                    Cheetahtemplate-discuss mailing list
                    Cheetahtemplate-discuss@...
                    https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
                  Your message has been successfully submitted and would be delivered to recipients shortly.