Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
123 lines (111 sloc) 2.86 KB
__NAME__ purpose
process page and save output to file and/or scratch variable
__END__
__NAME__ missing
Explain what is expiry= parameter and how touch= affects it.
__END__
__NAME__ synopsis
<row>
<entry>
<arg choice='plain'>page</arg>
</entry>
<entry>Yes</entry><entry>Yes</entry>
<entry></entry>
<entry>Name of the &IC; page to process (as if the user visited
it with the browser).</entry>
</row>
<row>
<entry>
<arg choice='plain'>file</arg>
</entry>
<entry>Yes</entry><entry>Yes</entry>
<entry></entry>
<entry>
File to dump contents to.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>scratch</arg>
</entry>
<entry></entry><entry></entry>
<entry></entry>
<entry>
Store contents in this &glos-scratch; variable.
</entry>
</row>
<row>
<entry>
<arg choice='plain'>scan</arg>
</entry>
<entry></entry><entry></entry>
<entry></entry>
<entry>Specifies the search string and reproduces a search
results page.</entry>
</row>
<row>
<entry>
<arg choice='plain'>auto_create_dir</arg>
</entry>
<entry></entry><entry></entry>
<entry>0</entry>
<entry>Create directory path to the dump file?</entry>
</row>
<row>
<entry>
<arg choice='plain'>expiry</arg>
</entry>
<entry></entry><entry></entry>
<entry></entry>
<entry>See if file Modification time is newer than expiry deadline.</entry>
</row>
<row>
<entry>
<arg choice='plain'>touch</arg>
</entry>
<entry></entry><entry></entry>
<entry>0</entry>
<entry>If the file is expired, touch it?</entry>
</row>
&ROW_UMASK_none;
&TAG_NON_CONTAINER;
__END__
__NAME__ description
This tag processes the page (as if the user visited it with the browser),
and writes contents to disk. This is usually called from &glos-jobs; but of
course, nothing enforces this.
</para><para>
The tag is able to reproduce both standard and search results pages.
<!-- XXX link 'search results' -->
</para><para>
This is similar to the output you could get from
<userinput>lynx -source</userinput> or <userinput>w3m -dump_source</userinput>
commands.
__END__
__NAME__ notes
See the &glos-umask; glossary entry.
__END__
__NAME__ example: Basic static page example
Create page named <filename>make-static.html</filename> with the following
content:
<programlisting>
[capture-page page=index file=static/index.html umask=022 auto_create_dir=1]
</programlisting>
This would create the <filename class='directory'>static/</filename>
directory in your catalog root, and a snapshot of
<filename>index.html</filename> in it.
__END__
__NAME__ example2: Static page example using scan=
Create page named <filename>make-static2.html</filename> with the following
content:
<programlisting>
[loop list="Levels,Rulers,Squares"]
[capture-page page="[loop-code]" file="static/cats/[loop-code].html"
scan="fi=products/st=db/co=yes/sf=category/se=[loop-code]"
auto_create_dir=1]
[/loop]
</programlisting>
__END__
__NAME__ author
&racke;, &ICDEVGROUP;
__END__
Something went wrong with that request. Please try again.