347 lines
12 KiB
Plaintext
347 lines
12 KiB
Plaintext
|
head 1.9;
|
||
|
access;
|
||
|
symbols;
|
||
|
locks; strict;
|
||
|
comment @# @;
|
||
|
|
||
|
|
||
|
1.9
|
||
|
date 2006.04.01.05.55.07; author TWikiContributor; state Exp;
|
||
|
branches;
|
||
|
next 1.8;
|
||
|
|
||
|
1.8
|
||
|
date 2006.02.01.12.01.17; author TWikiContributor; state Exp;
|
||
|
branches;
|
||
|
next 1.7;
|
||
|
|
||
|
1.7
|
||
|
date 2004.08.15.07.36.37; author PeterThoeny; state Exp;
|
||
|
branches;
|
||
|
next 1.6;
|
||
|
|
||
|
1.6
|
||
|
date 2003.02.01.12.26.52; author PeterThoeny; state Exp;
|
||
|
branches;
|
||
|
next 1.5;
|
||
|
|
||
|
1.5
|
||
|
date 2003.01.16.07.35.00; author PeterThoeny; state Exp;
|
||
|
branches;
|
||
|
next 1.4;
|
||
|
|
||
|
1.4
|
||
|
date 2002.12.11.08.18.06; author PeterThoeny; state Exp;
|
||
|
branches;
|
||
|
next 1.3;
|
||
|
|
||
|
1.3
|
||
|
date 2002.11.14.03.12.00; author PeterThoeny; state Exp;
|
||
|
branches;
|
||
|
next 1.2;
|
||
|
|
||
|
1.2
|
||
|
date 2002.04.07.10.26.00; author PeterThoeny; state Exp;
|
||
|
branches;
|
||
|
next 1.1;
|
||
|
|
||
|
1.1
|
||
|
date 2001.06.26.00.44.57; author PeterThoeny; state Exp;
|
||
|
branches;
|
||
|
next ;
|
||
|
|
||
|
|
||
|
desc
|
||
|
@none
|
||
|
@
|
||
|
|
||
|
|
||
|
1.9
|
||
|
log
|
||
|
@buildrelease
|
||
|
@
|
||
|
text
|
||
|
@%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="9"}%
|
||
|
---+!! Include Topics and Web Pages Using =%<nop>INCLUDE{...}%= Variable
|
||
|
|
||
|
Use the =%<nop>INCLUDE{...}%= variable to embed the content of another topic or web page inside a TWiki topic. The whole content or only parts of a page can be included. If needed, set a proxy server in %WIKIPREFSTOPIC%.
|
||
|
|
||
|
%TOC%
|
||
|
|
||
|
---++ Syntax Example
|
||
|
|
||
|
=%<nop>INCLUDE{ "page" pattern="reg-exp" rev="2" warn="off" section="clients" }%=
|
||
|
|
||
|
The =pattern= parameter is optional and allows you to extract some parts of a web page. Specify a %TWIKIWEB%.RegularExpression that scans from start (='^'=) to end and contains the text you want to keep in parenthesis, e.g., =pattern="^.*?(from here.*?to here).*"=. You need to make sure that the integrity of a web page is not compromised; for example, if you include a table, make sure to include everything including the table end tag.
|
||
|
|
||
|
VarINCLUDE explains the other parameters.
|
||
|
|
||
|
__Note:__ All text of a topic is included unless it contains a =%<nop>STARTINCLUDE%= and =%<nop>STOPINCLUDE%=, or you specify a =section= parameter and/or a =pattern= parameter. A pattern will only search between =%<nop>STARTINCLUDE%= and =%<nop>STOPINCLUDE%=.
|
||
|
|
||
|
---++ Usage Examples
|
||
|
|
||
|
---+++ 1. Display regression test results in a TWiki page
|
||
|
<pre>
|
||
|
<pre>
|
||
|
%<nop>INCLUDE{"http://domain/~qa/v1.1/REDTest.log.txt"}%
|
||
|
</pre>
|
||
|
</pre>
|
||
|
|
||
|
---+++ 2. Display Google's robot.txt file
|
||
|
|
||
|
<pre>
|
||
|
%<nop>INCLUDE{"http://www.google.com/robots.txt"}%
|
||
|
</pre>
|
||
|
|
||
|
---+++ 3. Display the current time in Tokyo in a TWiki page
|
||
|
|
||
|
* You type:
|
||
|
* ==Tokyo: %<nop>INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo" pattern="^.*<\!--tzdate:date-->(.*?)<\!--/tzdate:date-->.*"}%==
|
||
|
* You get:
|
||
|
* Tokyo: %INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo" pattern="^.*<\!--tzdate:date-->(.*?)<\!--/tzdate:date-->.*"}%
|
||
|
|
||
|
__Related Topics:__ VarINCLUDE, UserDocumentationCategory
|
||
|
|
||
|
@
|
||
|
|
||
|
|
||
|
1.8
|
||
|
log
|
||
|
@buildrelease
|
||
|
@
|
||
|
text
|
||
|
@d1 1
|
||
|
a1 1
|
||
|
%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="8"}%
|
||
|
d14 1
|
||
|
a14 1
|
||
|
TWikiVariables#VarINCLUDE explains the other parameters.
|
||
|
d35 4
|
||
|
a38 4
|
||
|
* You type:
|
||
|
* ==Tokyo: %<nop>INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo" pattern="^.*<\!--tzdate:date-->(.*?)<\!--/tzdate:date-->.*"}%==
|
||
|
* You get:
|
||
|
* Tokyo: %INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo" pattern="^.*<\!--tzdate:date-->(.*?)<\!--/tzdate:date-->.*"}%
|
||
|
d40 1
|
||
|
a40 1
|
||
|
__Related Topics:__ TWikiVariables#VarINCLUDE, UserDocumentationCategory
|
||
|
@
|
||
|
|
||
|
|
||
|
1.7
|
||
|
log
|
||
|
@none
|
||
|
@
|
||
|
text
|
||
|
@d1 2
|
||
|
a2 2
|
||
|
%META:TOPICINFO{author="PeterThoeny" date="1092555397" format="1.0" version="1.7"}%
|
||
|
---+!! Include Topics and Web Pages Using ==%<nop>INCLUDE{...}%== Variable
|
||
|
d4 1
|
||
|
a4 1
|
||
|
Use the ==%<nop>INCLUDE{...}%== variable to embed the content of another topic or web page inside a %WIKITOOLNAME% topic. The whole content or only parts of a page can be included. If needed, set a proxy server in %WIKIPREFSTOPIC%.
|
||
|
d8 1
|
||
|
d10 1
|
||
|
a10 1
|
||
|
---++ Syntax
|
||
|
d12 1
|
||
|
a12 1
|
||
|
==%<nop>INCLUDE{ "page" pattern="reg-exp" rev="1.2" }%==
|
||
|
d14 1
|
||
|
a14 5
|
||
|
* =="page"==: %BR%
|
||
|
The nameless parameter specifies the page to include. It is
|
||
|
* The name of a topic located in the current web, e.g., ==%<nop>INCLUDE{"WebNotify"}%==
|
||
|
* A =Web.Topic= name specifying a topic in another web, e.g., ==%<nop>INCLUDE{"%TWIKIWEB%.SiteMap"}%==
|
||
|
* A full qualified URL with ==http== protocol, domain name and optional port number, e.g., ==%<nop>INCLUDE{"http://twiki.org:80/index.html"}%==. Supported content types are ==text/html== and ==text/plain==. The full page is included by default, but the HTML header and scripts are stripped in case it is a web page.
|
||
|
d16 1
|
||
|
a16 7
|
||
|
* ==pattern="reg-exp"==: %BR%
|
||
|
The *pattern* parameter is optional and allows you to extract some parts of a web page. Specify a %TWIKIWEB%.RegularExpression that scans from start (='^'=) to end and contains the text you want to keep in parenthesis, e.g., ==pattern="^.*?(from here.*?to here).*"==. You need to make sure that the integrity of a web page is not compromised; for example, if you include a table, make sure to include everything including the table end tag.
|
||
|
|
||
|
* ==rev="1.x"==: %BR%
|
||
|
The *rev* parameter is optional and allows you to include an earlier revision of a topic. This can be used to include an official version of a topic, e.g. one that has been signed of by management. This parameter does not apply to URLs.
|
||
|
|
||
|
__Note:__ All text of a topic is included unless you specify ==%<nop>STARTINCLUDE%==, ==%<nop>STOPINCLUDE%== and/or a *pattern* parameter. A pattern will only search between ==%<nop>STARTINCLUDE%== and ==%<nop>STOPINCLUDE%==.
|
||
|
d29 3
|
||
|
a31 2
|
||
|
* You type:
|
||
|
* ==%<nop>INCLUDE{"http://www.google.com/robots.txt"}%==
|
||
|
d36 1
|
||
|
a36 1
|
||
|
* ==Tokyo: %<nop>INCLUDE{"http://TWiki.org/cgi-bin/xtra/tzdate?tz=Asia/Tokyo" pattern="^.*<\!--tzdate:date-->(.*?)<\!--/tzdate:date-->.*"}%==
|
||
|
d40 1
|
||
|
a40 3
|
||
|
See also other TWikiVariables.
|
||
|
|
||
|
-- TWiki:Main.PeterThoeny - 15 Aug 2004
|
||
|
@
|
||
|
|
||
|
|
||
|
1.6
|
||
|
log
|
||
|
@none
|
||
|
@
|
||
|
text
|
||
|
@d1 51
|
||
|
a51 58
|
||
|
%META:TOPICINFO{author="PeterThoeny" date="1044102412" format="1.0" version="1.6"}%
|
||
|
---+!! Include Topics and Web Pages Using ==%<nop>INCLUDE{...}%== Variable
|
||
|
|
||
|
Use the ==%<nop>INCLUDE{...}%== variable to embed the content of another topic or web page inside a %WIKITOOLNAME% topic. The whole content or only parts of a page can be included. If needed, set a proxy server in %WIKIPREFSTOPIC%.
|
||
|
|
||
|
%TOC%
|
||
|
|
||
|
|
||
|
---++ Syntax
|
||
|
|
||
|
==%<nop>INCLUDE{ "page" pattern="reg-exp" rev="1.2" }%==
|
||
|
|
||
|
* =="page"==: %BR%
|
||
|
The nameless parameter specifies the page to include. It is
|
||
|
* The name of a topic located in the current web, e.g., ==%<nop>INCLUDE{"WebNotify"}%==
|
||
|
* A =Web.Topic= name specifying a topic in another web, e.g., ==%<nop>INCLUDE{"%TWIKIWEB%.SiteMap"}%==
|
||
|
* A full qualified URL with ==http== protocol, domain name and optional port number, e.g., ==%<nop>INCLUDE{"http://twiki.org:80/index.html"}%==. Supported content types are ==text/html== and ==text/plain==. The full page is included by default, but the HTML header and scripts are stripped in case it is a web page.
|
||
|
|
||
|
* ==pattern="reg-exp"==: %BR%
|
||
|
The *pattern* parameter is optional and allows you to extract some parts of a web page. Specify a %TWIKIWEB%.RegularExpression that scans from start (='^'=) to end and contains the text you want to keep in parenthesis, e.g., ==pattern="^.*?(from here.*?to here).*"==. You need to make sure that the integrity of a web page is not compromised; for example, if you include a table, make sure to include everything including the table end tag.
|
||
|
|
||
|
* ==rev="1.x"==: %BR%
|
||
|
The *rev* parameter is optional and allows you to include an earlier revision of a topic. This can be used to include an official version of a topic, e.g. one that has been signed of by management. This parameter does not apply to URLs.
|
||
|
|
||
|
__Note:__ All text of a topic is included unless you specify ==%<nop>STARTINCLUDE%==, ==%<nop>STOPINCLUDE%== and/or a *pattern* parameter.
|
||
|
|
||
|
|
||
|
---++ Usage Examples
|
||
|
|
||
|
---+++ 1. Display regression test results in a TWiki page
|
||
|
<pre>
|
||
|
<pre>
|
||
|
%<nop>INCLUDE{"http://domain/~qa/v1.1/REDTest.log.txt"}%
|
||
|
</pre>
|
||
|
</pre>
|
||
|
|
||
|
---+++ 2. Display Yahoo's robot.txt file
|
||
|
|
||
|
* You type:
|
||
|
* ==%<nop>INCLUDE{"http://www.yahoo.com/robots.txt"}%==
|
||
|
|
||
|
---+++ 3. Display the SUNW stock quote in a TWiki page
|
||
|
|
||
|
* You type:
|
||
|
* ==SUNW: %<nop>INCLUDE{"http://finance.yahoo.com/q?s=SUNW&d=v1&o=t" pattern="^.*?>SUNW</a>[^<]+(.*?)\s+\S+\s+<small.*"}%==
|
||
|
* You get:
|
||
|
* SUNW: %INCLUDE{"http://finance.yahoo.com/q?s=SUNW&d=v1&o=t" pattern="^.*?>SUNW</a>[^<]+(.*?)\s+\S+\s+<small.*"}%
|
||
|
|
||
|
---+++ 4. Display the temperature in San Francisco
|
||
|
|
||
|
* You type:
|
||
|
* ==San Francisco: %<nop>INCLUDE{"http://weather.yahoo.com/forecast/San_Francisco_CA_US_f.html" pattern="^.*?([0-9]+\&ordm\;F).*"}%==
|
||
|
* You get:
|
||
|
* San Francisco: %INCLUDE{"http://weather.yahoo.com/forecast/San_Francisco_CA_US_f.html" pattern="^.*?([0-9]+\º\;F).*"}%
|
||
|
|
||
|
See also other TWikiVariables.
|
||
|
|
||
|
-- Main.PeterThoeny - 15 Jan 2003
|
||
|
@
|
||
|
|
||
|
|
||
|
1.5
|
||
|
log
|
||
|
@none
|
||
|
@
|
||
|
text
|
||
|
@d1 1
|
||
|
a1 1
|
||
|
%META:TOPICINFO{author="PeterThoeny" date="1042702500" format="1.0" version="1.5"}%
|
||
|
d4 1
|
||
|
a4 1
|
||
|
Use the ==%<nop>INCLUDE{...}%== variable to embed the content of another topic or web page inside a %WIKITOOLNAME% topic. The whole content or only parts of a page can be included.
|
||
|
@
|
||
|
|
||
|
|
||
|
1.4
|
||
|
log
|
||
|
@none
|
||
|
@
|
||
|
text
|
||
|
@d1 2
|
||
|
a2 2
|
||
|
%META:TOPICINFO{author="PeterThoeny" date="1039594686" format="1.0" version="1.4"}%
|
||
|
*Include Topics and Web Pages Using ==%<nop>INCLUDE{...}%== Variable*
|
||
|
d33 1
|
||
|
a33 1
|
||
|
%<nop>INCLUDEURL{"http://domain/~qa/v1.1/REDTest.log.txt"}%
|
||
|
d40 1
|
||
|
a40 5
|
||
|
* ==%<nop>INCLUDE{"http://www.yahoo.com/robots.txt"}%== <br>
|
||
|
* You get:
|
||
|
<verbatim>
|
||
|
%INCLUDE{"http://www.yahoo.com/robots.txt"}%
|
||
|
</verbatim>
|
||
|
d45 1
|
||
|
a45 1
|
||
|
* ==SUNW: %<nop>INCLUDE{"http://finance.yahoo.com/q?s=SUNW&d=v1&o=t" pattern="^.*?>SUNW</a>[^<]+(.*?)\s+\S+\s+<small.*"}%== <br>
|
||
|
d52 1
|
||
|
a52 1
|
||
|
* ==San Francisco: %<nop>INCLUDE{"http://weather.yahoo.com/forecast/San_Francisco_CA_US_f.html" pattern="^.*?([0-9]+\&ordm\;F).*"}%== <br>
|
||
|
d58 1
|
||
|
a58 1
|
||
|
-- Main.PeterThoeny - 25 Jun 2001 <br>
|
||
|
@
|
||
|
|
||
|
|
||
|
1.3
|
||
|
log
|
||
|
@none
|
||
|
@
|
||
|
text
|
||
|
@d1 1
|
||
|
a1 1
|
||
|
%META:TOPICINFO{author="PeterThoeny" date="1037243520" format="1.0" version="1.3"}%
|
||
|
d15 3
|
||
|
a17 3
|
||
|
* The name of a topic located in the current web, i.e. ==%<nop>INCLUDE{"WebNotify"}%==
|
||
|
* A =Web.Topic= name specifying a topic in another web, i.e. ==%<nop>INCLUDE{"%TWIKIWEB%.SiteMap"}%==
|
||
|
* A full qualified URL with ==http== protocol, domain name and optional port number, i.e. ==%<nop>INCLUDE{"http://twiki.org:80/index.html"}%==. Supported content types are ==text/html== and ==text/plain==. The full page is included by default, but the HTML header and scripts are stripped in case it is a web page.
|
||
|
d20 1
|
||
|
a20 1
|
||
|
The *pattern* parameter is optional and allows you to extract some parts of a web page. Specify a %TWIKIWEB%.RegularExpression that scans from start (='^'=) to end and contains the text you want to keep in parenthesis, i.e. ==pattern="^.*?(from here.*?to here).*"==. You need to make sure that the integrity of a web page is not compromised, i.e. if you include a table make sure to include everything including the table end tag.
|
||
|
d23 1
|
||
|
a23 1
|
||
|
The *rev* parameter is optional and allows you to include an earlier revision of a topic. This can be used to include an official version of a topic, e.g. one that has been signed of by management.
|
||
|
@
|
||
|
|
||
|
|
||
|
1.2
|
||
|
log
|
||
|
@none
|
||
|
@
|
||
|
text
|
||
|
@d1 1
|
||
|
a1 1
|
||
|
%META:TOPICINFO{author="PeterThoeny" date="1018175160" format="1.0" version="1.2"}%
|
||
|
d11 1
|
||
|
a11 1
|
||
|
==%<nop>INCLUDE{"page" pattern="reg-exp"}%==
|
||
|
d13 1
|
||
|
a13 1
|
||
|
* =="page"==: <br>
|
||
|
d19 1
|
||
|
a19 1
|
||
|
* ==pattern="reg-exp"==: <br>
|
||
|
d21 3
|
||
|
@
|
||
|
|
||
|
|
||
|
1.1
|
||
|
log
|
||
|
@none
|
||
|
@
|
||
|
text
|
||
|
@d1 1
|
||
|
d16 1
|
||
|
a16 1
|
||
|
* A =Web.Topic= name specifying a topic in another web, i.e. ==%<nop>INCLUDE{"%TWIKIWEB%.TWikiWebsTable"}%==
|
||
|
@
|