You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ines Robbers <ml...@comprehend.de> on 2003/02/17 17:23:18 UTC

CLI

Hello!

I'm trying to understand the command-line interface of Cocoon -
unfortunately without much success so far.
The Cocoon version I'm using is 2.0.4. Where do I find the java.class
that starts the CLI? Do I have to download anything?
Is it correct that once the class has started I type in:

java -jar cocoon.jar -c  (as an example)  

to start with whatever I intend to do?

Many thanks for help!

Ines 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Word Count

Posted by Alex Romayev <ro...@yahoo.com>.
I'm not sure if it would do exactly what you need, but
pagination transformer does something very similar. 
You can find it in scratchpad area.

-Alex

--- Darren Petrie <dp...@anteon.com> wrote:
> By chance has anyone written a transformer or
> generator that returns a 
> count of text words in an XML source?  I have a need
> to determine the 
> number of words in my documents for translation
> purposes.  I am 
> currently doing it via XSL but it's very
> inefficient.  Before I try to 
> write a transformer to do it I thought I'd see if
> someone had already 
> done so.
> 
> Thanks,
> Darren
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Word Count

Posted by Darren Petrie <dp...@anteon.com>.
By chance has anyone written a transformer or generator that returns a 
count of text words in an XML source?  I have a need to determine the 
number of words in my documents for translation purposes.  I am 
currently doing it via XSL but it's very inefficient.  Before I try to 
write a transformer to do it I thought I'd see if someone had already 
done so.

Thanks,
Darren


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: CLI

Posted by Upayavira <uv...@upaya.co.uk>.
Darren,

I have often wondered why the CLI isn't a standard part of the binary distribution.

I have posted a message to the dev list to ask if there is a reason why it isn't there, 
and if not to offer at least have a go at creating the necessary scripts.

Regards, Upayavira

> CLI doesn't work "out of the box" with the binary distribution and that 
> is the source of most of the pleas on this list for help regarding the 
> CLI.  It can be made to work with the binary distribution by setting 
> your class path but it's not straightforward.   I found for me that the 
> "easiest" way to use the CLI was via the source distribution of Cocoon 
> and ./run.sh.
> 
> Ines,  I suggest the path of least resistance to successfully using the 
> CLI is via compiling the Cocoon source distribution.
> 
> Once done as Upayavira stated the CLI is documented on the Wiki page
> 
> http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine
> 
> Darren
> 
> 
> On Tuesday, February 18, 2003, at 11:34 AM, Konstantin Piroumian wrote:
> 
> > From: "Robert Sösemann" <ro...@gmx.de>
> >
> >> The CLI is part of the cocoon.jar, so is contained in your cocoon 
> >> version.
> >>
> >> You call it by:
> >>
> >> BUT, it doesn't work. Noone who ever asked this list for help on the 
> >> cli
> >> received a helpful answer. The reason to my opinion is not a lack of
> >> cooperation, but the lack of experience with the cli and the 
> >> frustrating
> >> experience when trying to test it on your own.
> >
> > Absolutely false statement.
> >
> > Cocoon CLI *works*! Otherwise you won't get any Cocoon docs/site and 
> > there
> > would be no Forrest project (http://xml.apache.org/forrest). Parts of 
> > Apache
> > XML site are also generated using Cocoon CLI/Forrest.
> >
> >>
> >> In short: I think CLI sucks and doens't work properly. BUT that's no
> >> problem. There are dozens of  much better web downloader/offline 
> >> browsers
> > to
> >> make a cocoon site static.
> >
> > You contradict yourself. If it doesn't work then how could it work
> > inproperly?
> >
> > Ines,
> >
> > Examples of running Cocoon from command line you'll find in Cocoon's
> > build.xml. Take a look at the 'docs' target:
> >
> >     <java classname="org.apache.cocoon.Main" fork="true"
> > dir="${build.context}"
> >           failonerror="true" maxmemory="128m">
> >       <arg value="-c."/>
> >       <arg value="-d../docs"/>
> >       <arg value="-w../work"/>
> >       <arg value="-b../brokenlinks.txt"/>
> >       <arg value="-k../documentation/logkit.xconf"/>
> >       <arg value="-u${build.docs.loglevel}"/>
> >       <arg value="-V"/>
> >       <arg value="index.html"/>
> >       <classpath>
> >         <path refid="classpath"/>
> >         <fileset dir="${build.dir}">
> >           <include name="*.jar"/>
> >         </fileset>
> >         <pathelement location="${tools.jar}"/>
> >         <pathelement location="${build.context}/WEB-INF/classes"/>
> >       </classpath>
> >     </java>
> >
> >
> > Basically you'll need to set several command line options, then invoke 
> > the
> > jar as you've done below. But Cocoon CLI is not an interactive tool 
> > and it
> > simply works in batch mode. It starts from the URL you've specified in 
> > the
> > command line (it's the index.html in the above snippet).
> >
> > As for the other tools, then yes, you can use something like wget 
> > instead of
> > Cocoon CLI to generate the static site.
> >
> > --
> >   Konstantin
> >
> >>
> >> In our project we are using HTTrack, a wonderful open source tool. It
> > comes
> >> with a Window gui and a fully blown command line - much better that 
> >> the
> >> cocoon cli. Download at www.httrack.com/
> >>
> >> I hope I could help.
> >>
> >> Robert
> >>
> >>
> >> ----- Original Message -----
> >> From: "Ines Robbers" <ml...@comprehend.de>
> >> To: "Cocoon Mailingliste" <co...@xml.apache.org>
> >> Sent: Monday, February 17, 2003 5:23 PM
> >> Subject: CLI
> >>
> >>
> >>> Hello!
> >>>
> >>> I'm trying to understand the command-line interface of Cocoon -
> >>> unfortunately without much success so far.
> >>> The Cocoon version I'm using is 2.0.4. Where do I find the java.class
> >>> that starts the CLI? Do I have to download anything?
> >>> Is it correct that once the class has started I type in:
> >>>
> >>> java -jar cocoon.jar -c  (as an example)
> >>>
> >>> to start with whatever I intend to do?
> >>>
> >>> Many thanks for help!
> >>>
> >>> Ines
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> Please check that your question  has not already been answered in the
> >>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >>>
> >>> To unsubscribe, e-mail:     <co...@xml.apache.org>
> >>> For additional commands, e-mail:   <co...@xml.apache.org>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> Please check that your question  has not already been answered in the
> >> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >>
> >> To unsubscribe, e-mail:     <co...@xml.apache.org>
> >> For additional commands, e-mail:   <co...@xml.apache.org>
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
> >
> >
> Darren Petrie
> dpetrie@anteon.com
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: CLI

Posted by Darren Petrie <dp...@anteon.com>.
CLI doesn't work "out of the box" with the binary distribution and that 
is the source of most of the pleas on this list for help regarding the 
CLI.  It can be made to work with the binary distribution by setting 
your class path but it's not straightforward.   I found for me that the 
"easiest" way to use the CLI was via the source distribution of Cocoon 
and ./run.sh.

Ines,  I suggest the path of least resistance to successfully using the 
CLI is via compiling the Cocoon source distribution.

Once done as Upayavira stated the CLI is documented on the Wiki page

http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine

Darren


On Tuesday, February 18, 2003, at 11:34 AM, Konstantin Piroumian wrote:

> From: "Robert Sösemann" <ro...@gmx.de>
>
>> The CLI is part of the cocoon.jar, so is contained in your cocoon 
>> version.
>>
>> You call it by:
>>
>> BUT, it doesn't work. Noone who ever asked this list for help on the 
>> cli
>> received a helpful answer. The reason to my opinion is not a lack of
>> cooperation, but the lack of experience with the cli and the 
>> frustrating
>> experience when trying to test it on your own.
>
> Absolutely false statement.
>
> Cocoon CLI *works*! Otherwise you won't get any Cocoon docs/site and 
> there
> would be no Forrest project (http://xml.apache.org/forrest). Parts of 
> Apache
> XML site are also generated using Cocoon CLI/Forrest.
>
>>
>> In short: I think CLI sucks and doens't work properly. BUT that's no
>> problem. There are dozens of  much better web downloader/offline 
>> browsers
> to
>> make a cocoon site static.
>
> You contradict yourself. If it doesn't work then how could it work
> inproperly?
>
> Ines,
>
> Examples of running Cocoon from command line you'll find in Cocoon's
> build.xml. Take a look at the 'docs' target:
>
>     <java classname="org.apache.cocoon.Main" fork="true"
> dir="${build.context}"
>           failonerror="true" maxmemory="128m">
>       <arg value="-c."/>
>       <arg value="-d../docs"/>
>       <arg value="-w../work"/>
>       <arg value="-b../brokenlinks.txt"/>
>       <arg value="-k../documentation/logkit.xconf"/>
>       <arg value="-u${build.docs.loglevel}"/>
>       <arg value="-V"/>
>       <arg value="index.html"/>
>       <classpath>
>         <path refid="classpath"/>
>         <fileset dir="${build.dir}">
>           <include name="*.jar"/>
>         </fileset>
>         <pathelement location="${tools.jar}"/>
>         <pathelement location="${build.context}/WEB-INF/classes"/>
>       </classpath>
>     </java>
>
>
> Basically you'll need to set several command line options, then invoke 
> the
> jar as you've done below. But Cocoon CLI is not an interactive tool 
> and it
> simply works in batch mode. It starts from the URL you've specified in 
> the
> command line (it's the index.html in the above snippet).
>
> As for the other tools, then yes, you can use something like wget 
> instead of
> Cocoon CLI to generate the static site.
>
> --
>   Konstantin
>
>>
>> In our project we are using HTTrack, a wonderful open source tool. It
> comes
>> with a Window gui and a fully blown command line - much better that 
>> the
>> cocoon cli. Download at www.httrack.com/
>>
>> I hope I could help.
>>
>> Robert
>>
>>
>> ----- Original Message -----
>> From: "Ines Robbers" <ml...@comprehend.de>
>> To: "Cocoon Mailingliste" <co...@xml.apache.org>
>> Sent: Monday, February 17, 2003 5:23 PM
>> Subject: CLI
>>
>>
>>> Hello!
>>>
>>> I'm trying to understand the command-line interface of Cocoon -
>>> unfortunately without much success so far.
>>> The Cocoon version I'm using is 2.0.4. Where do I find the java.class
>>> that starts the CLI? Do I have to download anything?
>>> Is it correct that once the class has started I type in:
>>>
>>> java -jar cocoon.jar -c  (as an example)
>>>
>>> to start with whatever I intend to do?
>>>
>>> Many thanks for help!
>>>
>>> Ines
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Please check that your question  has not already been answered in the
>>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>>>
>>> To unsubscribe, e-mail:     <co...@xml.apache.org>
>>> For additional commands, e-mail:   <co...@xml.apache.org>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in the
>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>>
>> To unsubscribe, e-mail:     <co...@xml.apache.org>
>> For additional commands, e-mail:   <co...@xml.apache.org>
>>
>>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>
Darren Petrie
dpetrie@anteon.com


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: CLI

Posted by Konstantin Piroumian <kp...@apache.org>.
From: "Robert Sösemann" <ro...@gmx.de>

> The CLI is part of the cocoon.jar, so is contained in your cocoon version.
>
> You call it by:
>
> BUT, it doesn't work. Noone who ever asked this list for help on the cli
> received a helpful answer. The reason to my opinion is not a lack of
> cooperation, but the lack of experience with the cli and the frustrating
> experience when trying to test it on your own.

Absolutely false statement.

Cocoon CLI *works*! Otherwise you won't get any Cocoon docs/site and there
would be no Forrest project (http://xml.apache.org/forrest). Parts of Apache
XML site are also generated using Cocoon CLI/Forrest.

>
> In short: I think CLI sucks and doens't work properly. BUT that's no
> problem. There are dozens of  much better web downloader/offline browsers
to
> make a cocoon site static.

You contradict yourself. If it doesn't work then how could it work
inproperly?

Ines,

Examples of running Cocoon from command line you'll find in Cocoon's
build.xml. Take a look at the 'docs' target:

    <java classname="org.apache.cocoon.Main" fork="true"
dir="${build.context}"
          failonerror="true" maxmemory="128m">
      <arg value="-c."/>
      <arg value="-d../docs"/>
      <arg value="-w../work"/>
      <arg value="-b../brokenlinks.txt"/>
      <arg value="-k../documentation/logkit.xconf"/>
      <arg value="-u${build.docs.loglevel}"/>
      <arg value="-V"/>
      <arg value="index.html"/>
      <classpath>
        <path refid="classpath"/>
        <fileset dir="${build.dir}">
          <include name="*.jar"/>
        </fileset>
        <pathelement location="${tools.jar}"/>
        <pathelement location="${build.context}/WEB-INF/classes"/>
      </classpath>
    </java>


Basically you'll need to set several command line options, then invoke the
jar as you've done below. But Cocoon CLI is not an interactive tool and it
simply works in batch mode. It starts from the URL you've specified in the
command line (it's the index.html in the above snippet).

As for the other tools, then yes, you can use something like wget instead of
Cocoon CLI to generate the static site.

--
  Konstantin

>
> In our project we are using HTTrack, a wonderful open source tool. It
comes
> with a Window gui and a fully blown command line - much better that the
> cocoon cli. Download at www.httrack.com/
>
> I hope I could help.
>
> Robert
>
>
> ----- Original Message -----
> From: "Ines Robbers" <ml...@comprehend.de>
> To: "Cocoon Mailingliste" <co...@xml.apache.org>
> Sent: Monday, February 17, 2003 5:23 PM
> Subject: CLI
>
>
> > Hello!
> >
> > I'm trying to understand the command-line interface of Cocoon -
> > unfortunately without much success so far.
> > The Cocoon version I'm using is 2.0.4. Where do I find the java.class
> > that starts the CLI? Do I have to download anything?
> > Is it correct that once the class has started I type in:
> >
> > java -jar cocoon.jar -c  (as an example)
> >
> > to start with whatever I intend to do?
> >
> > Many thanks for help!
> >
> > Ines
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: CLI

Posted by Robert Sösemann <ro...@gmx.de>.
The CLI is part of the cocoon.jar, so is contained in your cocoon version.

You call it by:

BUT, it doesn't work. Noone who ever asked this list for help on the cli
received a helpful answer. The reason to my opinion is not a lack of
cooperation, but the lack of experience with the cli and the frustrating
experience when trying to test it on your own.

In short: I think CLI sucks and doens't work properly. BUT that's no
problem. There are dozens of  much better web downloader/offline browsers to
make a cocoon site static.

In our project we are using HTTrack, a wonderful open source tool. It comes
with a Window gui and a fully blown command line - much better that the
cocoon cli. Download at www.httrack.com/

I hope I could help.

Robert


----- Original Message -----
From: "Ines Robbers" <ml...@comprehend.de>
To: "Cocoon Mailingliste" <co...@xml.apache.org>
Sent: Monday, February 17, 2003 5:23 PM
Subject: CLI


> Hello!
>
> I'm trying to understand the command-line interface of Cocoon -
> unfortunately without much success so far.
> The Cocoon version I'm using is 2.0.4. Where do I find the java.class
> that starts the CLI? Do I have to download anything?
> Is it correct that once the class has started I type in:
>
> java -jar cocoon.jar -c  (as an example)
>
> to start with whatever I intend to do?
>
> Many thanks for help!
>
> Ines
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: CLI

Posted by Upayavira <uv...@upaya.co.uk>.
If you want details on using the command line interface, check out the Wiki page:

http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine

It is mostly there and should get you going. If you have any problems with it, let me 
know and I'll see if I can help you through.

Regards, Upayavira

> Hello!
> 
> I'm trying to understand the command-line interface of Cocoon -
> unfortunately without much success so far.
> The Cocoon version I'm using is 2.0.4. Where do I find the java.class
> that starts the CLI? Do I have to download anything?
> Is it correct that once the class has started I type in:
> 
> java -jar cocoon.jar -c  (as an example)  
> 
> to start with whatever I intend to do?
> 
> Many thanks for help!
> 
> Ines 
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: CLI

Posted by Upayavira <uv...@upaya.co.uk>.
If you want details on using the command line interface, check out the Wiki page:

http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine

It is mostly there and should get you going. If you have any problems with it, let me 
know and I'll see if I can help you through.

Regards, Upayavira

> Hello!
> 
> I'm trying to understand the command-line interface of Cocoon -
> unfortunately without much success so far.
> The Cocoon version I'm using is 2.0.4. Where do I find the java.class
> that starts the CLI? Do I have to download anything?
> Is it correct that once the class has started I type in:
> 
> java -jar cocoon.jar -c  (as an example)  
> 
> to start with whatever I intend to do?
> 
> Many thanks for help!
> 
> Ines 
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: CLI

Posted by Upayavira <uv...@upaya.co.uk>.
If you want details on using the command line interface, check out the Wiki page:

http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine

It is mostly there and should get you going. If you have any problems with it, let me 
know and I'll see if I can help you through.

Regards, Upayavira

> Hello!
> 
> I'm trying to understand the command-line interface of Cocoon -
> unfortunately without much success so far.
> The Cocoon version I'm using is 2.0.4. Where do I find the java.class
> that starts the CLI? Do I have to download anything?
> Is it correct that once the class has started I type in:
> 
> java -jar cocoon.jar -c  (as an example)  
> 
> to start with whatever I intend to do?
> 
> Many thanks for help!
> 
> Ines 
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>