锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲另类视频在线观看,亚洲丰满熟女一区二区v,亚洲午夜无码久久http://m.tkk7.com/pyguru/category/470.htmlA blog of technology and life.zh-cnFri, 02 Mar 2007 01:59:37 GMTFri, 02 Mar 2007 01:59:37 GMT60Add RSS feeds to your Web site with Perl XML::RSShttp://m.tkk7.com/pyguru/archive/2005/02/17/1268.htmlpygurupyguruWed, 16 Feb 2005 19:04:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/17/1268.htmlhttp://m.tkk7.com/pyguru/comments/1268.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/17/1268.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1268.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1268.html Guest Contributor, TechRepublic
December 22, 2004
URL: http://www.builderau.com.au/architect/webservices/0,39024590,39171461,00.htm


TechRepublic

Take advantage of the XML::RSS CPAN package, which is specifically designed to read and parse RSS feeds.

You've probably already heard of RSS, the XML-based format which allows Web sites to publish and syndicate the latest content on their site to all interested parties. RSS is a boon to the lazy Webmaster, because (s)he no longer has to manually update his or her Web site with new content.

Instead, all a Webmaster has to do is plug in an RSS client, point it to the appropriate Web sites, and sit back and let the site "update itself" with news, weather forecasts, stock market data, and software alerts. You've already seen, in previous articles, how you can use the ASP.NET platform to manually parse an RSS feed and extract information from it by searching for the appropriate elements. But I'm a UNIX guy, and I have something that's even better than ASP.NET. It's called Perl.

Installing XML::RSS
RSS parsing in Perl is usually handled by the XML::RSS CPAN package. Unlike ASP.NET, which comes with a generic XML parser and expects you to manually write RSS-parsing code, the XML::RSS package is specifically designed to read and parse RSS feeds. When you give XML::RSS an RSS feed, it converts the various <item>s in the feed into array elements, and exposes numerous methods and properties to access the data in the feed. XML::RSS currently supports versions 0.9, 0.91, and 1.0 of RSS.

Written entirely in Perl, XML::RSS isn't included with Perl by default, and you must install it from CPAN. Detailed installation instructions are provided in the download archive, but by far the simplest way to install it is to use the CPAN shell, as follows:

shell> perl -MCPAN -e shell
cpan> install XML::RSS

If you use the CPAN shell, dependencies will be automatically downloaded for you (unless you told the shell not to download dependent modules). If you manually download and install the module, you may need to download and install the XML::Parser module before XML::RSS can be installed. The examples in this tutorial also need the LWP::Simple package, so you should download and install that one too if you don't already have it.

Basic usage
For our example, we'll assume that you're interested in displaying the latest geek news from Slashdot on your site. The URL for Slashdot's RSS feed is located here. The script in Listing A retrieves this feed, parses it, and turns it into a human-readable HTML page using XML::RSS:

Listing A

#!/usr/bin/perl

# import packages
use XML::RSS;
use LWP::Simple;

# initialize object
$rss = new XML::RSS();

# get RSS data
$raw = get('http://www.slashdot.org/index.rss');

# parse RSS feed
$rss->parse($raw);

# print HTML header and page
print "Content-Type: text/html\n\n";
print ""; print ""; print "";
print "";
print "
" . $rss->channel('title') . "
"; # print titles and URLs of news items foreach my $item (@{$rss->{'items'}}) { $title = $item->{'title'}; $url = $item->{'link'}; print "$title

"; } # print footers print "

";
print "";

Place the script in your Web server's cgi-bin/ directory/. Remember to make it executable, and then browse to it using your Web browser. After a short wait for the RSS file to download, you should see something like Figure A.

Figure A


Slashdot RSS feed

How does the script in Listing A work? Well, the first task is to get the RSS feed from the remote system to the local one. This is accomplished with the LWP::Simple package, which simulates an HTTP client and opens up a network connection to the remote site to retrieve the RSS data. An XML::RSS object is created, and this raw data is then passed to it for processing.

The various elements of the RSS feed are converted into Perl structures, and a foreach() loop is used to iterate over the array of items. Each item contains properties representing the item name, URL and description; these properties are used to dynamically build a readable list of news items. Each time Slashdot updates its RSS feed, the list of items displayed by the script above will change automatically, with no manual intervention required.

The script in Listing A will work with other RSS feeds as well鈥攕imply alter the URL passed to the LWP's get() method, and watch as the list of items displayed by the script changes.


Here are some RSS feeds to get you started

Tip: Notice that the RSS channel name (and description) can be obtained with the object's channel() method, which accepts any one of three arguments (title, description or link) and returns the corresponding channel value.


Adding multiple sources and optimising performance
So that takes care of adding a feed to your Web site. But hey, why limit yourself to one when you can have many? Listing B, a revision of the Listing A, sets up an array containing the names of many different RSS feeds, and iterates over the array to produce a page containing multiple channels of information.

Listing B

#!/usr/bin/perl

# import packages
use XML::RSS;
use LWP::Simple;

# initialize object
$rss = new XML::RSS();

# get RSS data
$raw = get('http://www.slashdot.org/index.rss');

# parse RSS feed
$rss->parse($raw);

# print HTML header and page
print "Content-Type: text/html\n\n";
print ""; print ""; print "";
print "";
print "
" . $rss->channel('title') . "
"; # print titles and URLs of news items foreach my $item (@{$rss->{'items'}}) { $title = $item->{'title'}; $url = $item->{'link'}; print "$title

"; } # print footers print "

";
print "";

Figure B shows you what it looks like.

Figure B


Several RSS feeds

You'll notice, if you're sharp-eyed, that Listing B uses the parsefile() method to read a local version of the RSS file, instead of using LWP to retrieve it from the remote site. This revision results in improved performance, because it does away with the need to generate an internal request for the RSS data source every time the script is executed. Fetching the RSS file on each script run not only causes things to go slow (because of the time taken to fetch the RSS file), but it's also inefficient; it's unlikely that the source RSS file will change on a minute-by-minute basis, and by fetching the same data over and over again, you're simply wasting bandwidth. A better solution is to retrieve the RSS data source once, save it to a local file, and use that local file to generate your page.

Depending on how often the source file gets updated, you can write a simple shell script to download a fresh copy of the file on a regular basis.

Here's an example of such a script:

#!/bin/bash
/bin/wget http://www.freshmeat.net/backend/fm.rdf -O freshmeat.rdf

This script uses the wget utility (included with most Linux distributions) to download and save the RSS file to disk. Add this to your system crontab, and set it to run on an hourly or daily basis.

If you find performance unacceptably low even after using local copies of RSS files, you can take things a step further, by generating a static HTML snapshot from the script above, and sending that to clients instead. To do this, comment out the line printing the "Content-Type" header in the script above and then run the script from the console, redirecting the output to an HTML file. Here's how:

$ ./rss.cgi > static.html

Now, simply serve this HTML file to your users. Since the file is a static file and not a script, no server-side processing takes place before the server transmits it to the client. You can run the command-line above from your crontab to regenerate the HTML file on a regular basis. Performance with a static file should be noticeably better than with a Perl script.

Looks easy? What are you waiting for鈥攇et out there and start hooking your site up to your favorite RSS news feeds.



pyguru 2005-02-17 03:04 鍙戣〃璇勮
]]>
Lilina錛歊SS鑱氬悎鍣ㄦ瀯寤轟釜浜洪棬鎴?Write once, publish anywhere)http://m.tkk7.com/pyguru/archive/2005/02/17/1267.htmlpygurupyguruWed, 16 Feb 2005 19:00:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/17/1267.htmlhttp://m.tkk7.com/pyguru/comments/1267.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/17/1267.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1267.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1267.htmlLilina錛?b style="color: black; background-color: rgb(160, 255, 255);">RSS鑱氬悎鍣ㄦ瀯寤轟釜浜洪棬鎴?Write once, publish anywhere)

鏈榪戞悳闆?b style="color: black; background-color: rgb(160, 255, 255);">RSS瑙f瀽宸ュ叿涓壘鍒頒簡MagPieRSS 鍜屽熀浜庡叾璁捐鐨?a >Lilina錛汱ilina鐨勪富瑕佸姛鑳斤細

1 鍩轟簬WEB鐣岄潰鐨?b style="color: black; background-color: rgb(160, 255, 255);">RSS綆$悊錛氭坊鍔狅紝鍒犻櫎錛孫PML瀵煎嚭錛?b style="color: black; background-color: rgb(160, 255, 255);">RSS鍚庡彴緙撳瓨鏈哄埗錛堥伩鍏嶅鏁版嵁婧愭湇鍔″櫒浜х敓榪囧ぇ鍘嬪姏錛夛紝ScriptLet: 綾諱技浜嶥el.icio.us it鐨勬敹钘忓す鍗蟲椂璁㈤槄JS鑴氭湰錛?/p>

2 鍓嶅彴鍙戝竷錛氬皢鑷繁鐨勯欏墊敼鎴愪簡鐢↙ilina鍙戝竷鎴戝父鐪嬬殑鍑犱釜鏈嬪弸鐨勭綉蹇楋紝涔熺渷鍘諱簡寰堝鏇存柊鑷繁緗戦〉鐨勫伐浣滐紝闇瑕?strong>php 4.3 + mbstring iconv
lilina.png
寮婧愯蔣浠跺i18n鐨勬敮鎸佽秺鏉ヨ秺濂戒簡錛宲hp 4.3.x錛?--enable-mbstring' '--with-iconv'鍚庢瘮杈冨ソ鐨勫悓鏃跺鐞嗕簡UTF-8鍜屽叾浠栦腑鏂囧瓧絎﹂泦鍙戝竷鐨?b style="color: black; background-color: rgb(160, 255, 255);">RSS銆?br> 闇瑕佹劅璋teve鍦≒HP榪涜杞爜鏂歸潰瀵?a >MagPieRSS榪涜鍜孹ML Hacking宸ヤ綔銆傝嚦灝戠洰鍓嶄負姝細Add to my yahoo榪樹笉鑳藉緢濂界殑澶勭悊utf-8瀛楃闆嗙殑RSS鏀惰棌銆?/p>

璁板緱騫村垵Wen Xin鍦–NBlog鐨勭爺璁ㄤ細涓婁粙緇嶄簡涓漢闂ㄦ埛鐨勬蹇碉紝闅忕潃RSS鍦–MS鎶鏈腑鐨勬垚鐔燂紝瓚婃潵瓚婂鐨勬湇鍔″彲浠ヨ涓漢鐢ㄦ埛鏍規嵁鑷繁闇姹傛瀯寤洪棬鎴鳳紝涔熺畻鏄鍚堜簡浜掕仈緗戠殑闈炰腑蹇冨寲瓚嬪娍鍚э紝姣斿鍒╃敤Add to My Yahoo!鍔熻兘錛岀敤鎴峰彲浠ヨ交鏉劇殑瀹炵幇鑷繁浠庢洿澶氭暟鎹簮榪涜鏂伴椈璁㈤槄銆傛兂璞′竴涓嬫妸浣犺嚜宸辯殑del.icio.us涔︾鏀惰棌 / flickr鍥劇墖鏀惰棌 / Yahoo!鏂伴椈閮介氳繃榪欐牱涓涓?b style="color: black; background-color: rgb(160, 255, 255);">RSS鑱氬悎鍣ㄨ仛鍚?鍙戝竷璧鋒潵銆傚叾浼犳挱鏁堢巼灝嗘湁澶氬揩銆?/p>

濂芥瘮杞歡寮鍙戦氳繃涓棿騫沖彴/铏氭嫙鏈哄疄鐜幫細涓嬈″啓鎴愶紝闅忓榪愯錛圵rite once, run anywhere錛夛紝閫氳繃RSS/XML榪欎釜涓棿灞傦紝淇℃伅鍙戝竷涔熷疄鐜頒簡錛氫竴嬈″啓鎴愶紝闅忓鍙戝竷錛圵rite once, publish anywhere...錛?/p>

瀹夎Lilina闇瑕丳HP 4.3 浠ヤ笂錛屽茍甯︽湁iconv mbstring絳夊嚱鏁扮殑鏀寔錛岃紜涓涓?a --with-iconv'

鍙﹀灝辨槸涓涓渶瑕佽兘閫氳繃鏈嶅姟鍣ㄧ鍚戝閮ㄦ湇鍔″櫒鍙戦丷PC璇鋒眰錛岃繖鐐?1.NET涓嶆敮鎸併傛劅瑙?a >PowWeb鐨勬湇鍔?/a>寰堜笉閿欙紝寰堝緙虹渷鐨勫寘閮藉畨瑁呭ソ浜嗭細

iconv
iconv support enabled
iconv implementation unknown
iconv library version unknown

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

mbstring
Multibyte Support enabled
Japanese support enabled
Simplified chinese support enabled
Traditional chinese support enabled
Korean support enabled
Russian support enabled
Multibyte (japanese) regex support enabled

灝嗗畨瑁呭寘瑙e寘錛堜笅杞芥枃浠舵墿灞曞悕鏄?gz 鍏跺疄鏄?tgz錛岄渶瑕侀噸鍛藉悕涓涓嬶級錛氫笂浼犲埌鏈嶅姟鍣ㄧ浉搴旂洰褰曚笅錛屾敞鎰忥細鐩稿簲cache鐩綍鍜屽綋鍓嶇洰褰曠殑鍙啓鍏ュ睘鎬ц緗紝鐒跺悗閰嶇疆涓涓媍onf.php涓殑鍙傛暟鍗沖彲寮濮嬩嬌鐢ㄣ?/p>

浣曚笢緇欐垜鐨勫緩璁細
1錛夊彸杈圭殑涓鏍忥紝絎竴欏圭殑sources鏈濂借窡hobby銆佸弸鎯呴摼鎺ヤ竴鏍鳳紝鍔犱釜鍥劇墖銆?br> 2錛変竴鍫嗘绱㈡鍦ㄩ偅鍎匡紝鏈変簺涔憋紝寤鴻鍙湁涓涓紝鍏跺畠鐨勬斁鍒頒竴涓簩綰ч〉闈笂銆?br> 3錛夋妸鑱旂郴鏂瑰紡鍙奵c,鍒嗗埆鍋氭垚涓鏉℃垨涓涓浘鐗囷紝鏀懼湪鍙寵竟涓鏍忎腑錛屽叿浣撶殑鍐呭鍙互鏀懼埌浜岀駭欏甸潰涓婏紝鍥犱負鎴戣寰楀ソ璞℃病鏈夊灝戜漢浼氱粏璇昏繖浜涙枃瀛椼?br> 4錛夊鏋滃彲鑳斤紝鎶妉ilina鐨勫ご閮ㄩ摼鎺ユ眽鍖栦竴涓嬪惂錛?/p>

涓浜涙敼榪涜鍒掞細
1 鍒犻櫎榪囬暱鐨勬憳瑕侊紝鍙互閫氳繃瀵繪壘絎?涓?

" 瀹炵幇錛?br> 2 鍒嗙粍鍔熻兘錛氬皢RSS榪涜緇勮緭鍑猴紱

淇敼榛樿鏄劇ず瀹炵幇錛歀ilina緙虹渷鏄劇ず鏈榪?澶╁彂琛ㄧ殑鏂囩珷錛屽鏋滈渶瑕佹敼鎴愬叾浠栨椂闂村懆鏈熷彲浠ユ壘鍒幫細
$TIMERANGE = ( $_REQUEST['hours'] ? $_REQUEST['hours']*3600 : 3600*24 ) ;

榪涜鏀瑰姩銆?/p>

RSS鏄竴涓兘灝嗚嚜宸辯殑鎵鏈夎祫婧愶細WIKI / BLOG / 閭歡鑱氬悎璧鋒潵鐨勮交閲忕駭鍗忚錛屼互鍚庢棤璁轟綘鍦ㄤ綍澶勪功鍐欙紝鍙鏈?b style="color: black; background-color: rgb(160, 255, 255);">RSS鎺ュ彛灝遍兘鍙互閫氳繃涓瀹氭柟寮忚繘琛屽啀嬈$殑姹囪仛鍜屽彂甯冭搗鏉ワ紝浠庤屽ぇ澶ф彁楂樹簡涓漢鐭ヨ瘑綆$悊鍜屽彂甯?浼犳挱鏁堢巼銆?/p>

浠ュ墠瀵?b style="color: black; background-color: rgb(160, 255, 255);">RSS鐞嗚В闈炲父嫻咃細涓嶅氨鏄竴涓狣TD鍢涳紝鐪熶簡瑙h搗瑙f瀽鍣ㄦ潵錛屾墠鐭ラ亾namespace鐨勯噸瑕佹э紝涓涓ソ鐨勫崗璁篃搴旇鏄繖鏍風殑錛氬茍闈炴病鏈変粈涔堝彲鍔犵殑錛屼絾鑲畾鏄病鏈変粈涔堝彲鈥滃噺鈥濈殑浜嗭紝鑰岀湡鐨勮鍋氬埌榪欎釜鍏跺疄寰堥毦寰堥毦鈥︹︺?/p>

鎴戜細鍐嶅皾璇曚竴涓婮AVA鐨勭浉鍏寵В鏋愬櫒錛屽皢鍏舵墿灞曞埌WebLucene欏圭洰涓紝鏇村Java鐩稿叧Open Source RSS瑙f瀽鍣ㄨ祫婧?/a>銆?/p>

鍙﹀鎵懼埌鐨?涓嬌鐢?b style="color: black; background-color: rgb(255, 255, 102);">Perl榪涜RSS瑙f瀽鐨勫寘錛?br> 浣跨敤XML::RSS::Parser::Lite鍜?a >XML::RSS::Parser 瑙f瀽RSS

XML::RSS::Parser::Lite鐨勪唬鐮佹牱渚嬪涓嬶細

#!/usr/bin/perl -w
# $Id$
# XML::RSS::Parser::Lite sample

use strict;
use XML::RSS::Parser::Lite;
use LWP::Simple;


my $xml = get("http://www.klogs.org/index.xml");
my $rp = new XML::RSS::Parser::Lite;
$rp->parse($xml);

# print blog header
print "<a href=\"".$rp->get('url')."\">" . $rp->get('title') . " - " . $rp->get('description') . "</a>\n";

# convert item to <li>
print "<ul>";
for (my $i = 0; $i < $rp->count(); $i++) {
my $it = $rp->get($i);
print "<li><a href=\"" . $it->get('url') . "\">" . $it->get('title') . "</a></li>\n";
}
print "</ul>";

瀹夎錛?br> 闇瑕丼OAP-Lite

浼樼偣錛?br> 鏂規硶綆鍗曪紝鏀寔榪滅▼鎶撳彇錛?/p>

緙虹偣錛?br> 鍙敮鎸乼itle, url, description榪?涓瓧孌碉紝涓嶆敮鎸佹椂闂村瓧孌碉紝

璁″垝鐢ㄤ簬綆鍗曠殑鎶撳彇RSS鍚屾鏈嶅姟璁捐錛氭瘡涓漢閮藉彲浠ュ嚭鐗堣嚜宸辮闃呯殑RSS銆?/p>


XML::RSS::Parser浠g爜鏍蜂緥濡備笅錛?br> #!/usr/bin/perl -w
# $Id$
# XML::RSS::Parser sample with Iconv charset convert

use strict;
use XML::RSS::Parser;
use Text::Iconv;
my $converter = Text::Iconv->new("utf-8", "gbk");


my $p = new XML::RSS::Parser;
my $feed = $p->parsefile('index.xml');

# output some values
my $title = XML::RSS::Parser->ns_qualify('title',$feed->rss_namespace_uri);
# may cause error this line: print $feed->channel->children($title)->value."\n";
print "item count: ".$feed->item_count()."\n\n";
foreach my $i ( $feed->items ) {
map { print $_->name.": ".$converter->convert($_->value)."\n" } $i->children;
print "\n";
}

浼樼偣錛?br> 鑳藉鐩存帴灝嗘暟鎹寜瀛楁杈撳嚭錛屾彁渚涙洿搴曞眰鐨勭晫闈紱

緙虹偣錛?br> 涓嶈兘鐩存帴瑙f瀽榪滅▼RSS錛岄渶瑕佷笅杞藉悗鍐嶈В鏋愶紱

2004-12-14:
浠巆nblog鐨凾rackback涓簡瑙e埌浜?a >Planet RSS鑱氬悎鍣?/a>

Planet鐨勫畨瑁咃細瑙e寘鍚庯紝鐩存帴鍦ㄧ洰褰曚笅榪愯錛歱ython planet.py examples/config.ini 灝卞彲浠ュ湪output鐩綍涓湅鍒扮己鐪佹牱渚婩EED涓殑杈撳嚭浜唅ndex.html錛屽彟澶栬繕鏈塷pml.xml鍜?b style="color: black; background-color: rgb(160, 255, 255);">rss.xml絳夎緭鍑猴紙榪欑偣姣旇緝濂斤級

鎴戠敤鍑犱釜RSS璇曚簡涓涓嬶紝UTF-8鐨勬病鏈夐棶棰橈紝浣嗘槸GBK鐨勫叏閮ㄩ兘涔辯爜浜嗭紝planetlib.py涓拰XML瀛楃闆嗗鐞嗙殑鍙湁浠ヤ笅浠g爜錛氱湅鏉ユ墍鏈夌殑闈濽TF-8閮借褰撲綔iso8859_1澶勭悊浜嗭細
try:
data = unicode(data, "utf8").encode("utf8")
logging.debug("Encoding: UTF-8")
except UnicodeError:
try:
data = unicode(data, "iso8859_1").encode("utf8")
logging.debug("Encoding: ISO-8859-1")
except UnicodeError:
data = unicode(data, "ascii", "replace").encode("utf8")
logging.warn("Feed wasn't in UTF-8 or ISO-8859-1, replaced " +
"all non-ASCII characters.")

榪戞湡瀛︿範涓涓婸ython鐨剈nicode澶勭悊錛屾劅瑙夋槸涓涓緢綆媧佺殑璇█錛屾湁姣旇緝濂界殑try ... catch 鏈哄埗鍜宭ogging

鍏充簬MagPieRSS鎬ц兘闂鐨勭枒铏戯細
瀵逛簬Planet鍜孧agPieRSS鎬ц兘鐨勪富瑕佸樊寮傚湪鏄紦瀛樻満鍒朵笂錛屽叧浜庝嬌鐢ㄧ紦瀛樻満鍒跺姞閫焀EB鏈嶅姟鍙互鍙傝冿細鍙紦瀛樼殑cms璁捐銆?/p>

鍙互鐪嬪埌錛歀ilina鐨勭紦瀛樻満鍒舵槸姣忔璇鋒眰鐨勬椂鍊欓亶鍘嗙紦瀛樼洰褰曚笅鐨?b style="color: black; background-color: rgb(160, 255, 255);">RSS鏂囦歡錛屽鏋滅紦瀛樻枃浠惰繃鏈燂紝榪樿鍔ㄦ佸悜RSS鏁版嵁婧愯繘琛岃姹傘傚洜姝や笉鑳芥敮鎸佸悗鍙板お澶氱殑RSS璁㈤槄鍜屽墠绔ぇ閲忕殑騫跺彂璁塊棶錛堜細閫犳垚寰堝鐨処/O鎿嶄綔錛夈?/p>

Planet鏄竴涓悗鍙拌剼鏈紝閫氳繃鑴氭湰灝嗚闃呯殑RSS瀹氭湡姹囪仛鎴愪竴涓枃浠惰緭鍑烘垚闈欐佹枃浠躲?/p>

鍏跺疄鍙鍦∕agPieRSS鍓嶇澧炲姞涓涓獁get鑴氭湰瀹氭湡灝唅ndex.php鐨勬暟鎹緭鍑烘垚index.html錛岀劧鍚庤姹傛瘡嬈¤闂厛璁塊棶index.html緙撳瓨錛岃繖鏍蜂笉灝卞拰Planet鐨勬瘡灝忔椂鐢熸垚index.html闈欐佺紦瀛樹竴鏍蜂簡鍚椼?/p>

鎵浠ュ湪涓嶅厑璁歌嚜宸遍厤緗湇鍔″櫒鑴氭湰鐨勮櫄鎷熶富鏈烘潵璇碢lanet鏍規湰鏄棤娉曡繍琛岀殑銆?/p>

鏇村鍏充簬PHP涓鐞咷BK鐨刋ML瑙f瀽闂璇峰弬鑰冿細
MagPieRSS涓璘TF-8鍜孏BK鐨?b style="color: black; background-color: rgb(160, 255, 255);">RSS瑙f瀽鍒嗘瀽

2004-12-19
姝e鍦⊿ocialBrain 2005騫寸殑璁ㄨ浼氫腑錛孖saac Mao鎵璇達細Blog is a 'Window', also could be a 'Bridge'錛孊log鏄釜浜?緇勭粐瀵瑰鐨勨滅獥鍙b濓紝鑰?b style="color: black; background-color: rgb(160, 255, 255);">RSS鏇存柟渚夸綘灝嗚繖浜涚獥鍙g粍鍚堣搗鏉ワ紝鎴愪負鍏墮棿鐨勨滄ˉ姊佲濓紝鏈変簡榪欐牱鐨勪腑闂村彂甯冨眰錛孊log涓嶄粎浠庡崟鐐瑰彂甯冿紝鏇村埌P2P鑷姪浼犳挱錛岃秺鏉ヨ秺鐪嬪埌浜?b style="color: black; background-color: rgb(160, 255, 255);">RSS鍦ㄧ綉緇滀紶鎾笂鐨勯噸瑕佹с?/p>

Posted by chedong at December 11, 2004 12:34 AM Edit
Last Modified at December 19, 2004 04:40 PM

Trackback Pings

TrackBack URL for this entry:
http://www.chedong.com/cgi-bin/mt3/mt-tb.cgi/27

Listed below are links to weblogs that reference Lilina錛?b style="color: black; background-color: rgb(160, 255, 255);">RSS鑱氬悎鍣ㄦ瀯寤轟釜浜洪棬鎴?Write once, publish anywhere):

祿 MagPieRSS涓璘TF-8鍜孏BK鐨?b style="color: black; background-color: rgb(160, 255, 255);">RSS瑙f瀽鍒嗘瀽錛堥檮錛歱hp涓殑闈㈠悜瀛楃緙栫▼璇﹁В錛?/a> from 杞︿笢BLOG
絎竴嬈″皾璇昅agpieRSS錛屽洜涓烘病鏈夊畨瑁卛conv鍜宮bstring錛屾墍浠ュけ璐ヤ簡錛屼粖澶╁湪鏈嶅姟鍣ㄤ笂瀹夎浜唅conv鍜宮tstring鐨勬敮鎸侊紝鎴戜粖澶╀粩緇嗙湅浜嗕竴涓媗ilina涓殑rss_fetch鐨勭敤娉曪細鏈閲嶈鐨勬槸鍒跺畾RSS鐨勮緭鍑烘牸寮忎負'MAGPIE_OU...
[Read More]

Tracked on December 19, 2004 12:37 AM

祿 鐢?lilina 鍜?blogline 鏉ョ湅 blog from Philharmania's Weblog
鐪嬪埌涓綃?a rel="nofollow">浠嬬粛 lilina 鐨勬枃绔?/a>鍚庡氨鑷繁瀹夎浜嗕竴涓?/a>璇曚簡涓嬨?a rel="nofollow">lilina 鏄竴涓敤 PHP 璇?[Read More]

Tracked on December 26, 2004 01:57 PM

祿 CNBlog浣滆呯兢RSS寰侀泦涓?/a> from CNBlog: Blog on Blog
鍦–NBLOG涓婃惌寤轟簡
Lilina RSS鑱氬悎鍣?/a>錛岃鍚勪綅蹇楁効鑰呭皢鍚勮嚜緗戝織鎴栬呭拰涓巆nblog鐩稿叧涓撴爮鐨?b style="color: black; background-color: rgb(160, 255, 255);">RSS鎻愪氦緇欐垜 鈥?鐩存帴鍦ㄨ瘎璁轟腑鍥炲鍗沖彲銆? 鎺ㄥ箍浣跨敤RSS鑱氬悎宸ュ叿涓昏鐨勭洰鐨? . [Read More]

Tracked on December 26, 2004 07:42 PM

祿 鍏充簬鍔犲揩 lilina 鏄劇ず閫熷害鐨勪竴浜涜緗?/a> from Kreny's Blog
鎴戠殑 lilina 鍦ㄨ瀹氫簡鍑犱綅鏈嬪弸鐨?blog 鍜屼竴浜?news 浠ュ悗錛屽彂鐜版墦寮閫熷害寮傚父鐨勬參錛屼簬鏄鏁欎簡杞︿笢錛岃В鍐充簡闂銆? 瑙e喅鐨勫叧閿湪浜庯細

鐩存帴灝嗕互涓嬭鍙ュ姞鍏ュ埌 index.php 澶撮儴鍗沖彲錛孡ILINA涓綘 .
[Read More]

Tracked on January 14, 2005 06:14 PM

祿 MT鐨勬ā鏉夸慨鏀瑰拰鐣岄潰鐨偆璁劇疆 from 杞︿笢BLOG
鍒嗙被绱㈠紩錛?棣栭〉緙虹渷鏈夋寜鏈堝綊妗g殑绱㈠紩錛屾病鏈夊垎綾葷洰褰曠殑绱㈠紩錛岀湅浜嗘墜鍐岄噷闈篃娌℃湁鍏蜂綋鐨勫弬鏁板畾涔夛紝鍙ソ鐩存帴鐪婼OURCE錛氬皾璇曠潃鎶奙onthly鏀規垚Category錛屽眳鐒舵垚浜?:-) 榪樺埌浜哅ovable Style鐨凪T鏍峰紡绔欙紝... [Read More]

Tracked on January 17, 2005 01:25 PM

Comments

璇烽棶濡傛灉鏇存敼榛樿鏄劇ず7澶╃殑鏂伴椈錛岃阿璋€?/p>

Posted by: honren at December 12, 2004 10:20 PM

鎴戜嬌鐢╨ilina宸茬粡涓孌墊椂闂翠簡銆?br> http://news.yanfeng.org
紼嶅井鏀逛簡涓鐐筓I銆?br> 濡傛灉浣犺兘鏀硅繘瀹冿紝閭e氨濂戒簡銆?/p>

Posted by: mulberry at December 13, 2004 09:24 AM

鑰佽濺鍚屽織錛屾病瑙夊緱浣犱嬌鐢╨ilina浠ユ潵錛屼富欏電殑璁塊棶閫熷害鍏鋒參鍚楋紵鏀懼純鍚э紝鑷沖皯娌″繀瑕佸綋浣滈欏碉紝lilina榪樺湪鎶鏈繕涓嶆垚鐔焋~

Posted by: kalen at December 16, 2004 10:33 AM

鍙互鑰冭檻涓涓嬬敤drupal

Posted by: shunz at December 28, 2004 06:46 PM

鍙互璇曡瘯鎴戝仛鐨勶細http://blog.terac.com

姣?灝忔椂鎶撳彇blog,鐒跺悗姣忎釜閫?鏉℃渶鏂扮殑錛屾帓搴忥紝鑱氬悎錛岀敓鎴愰潤鎬亁ml錛岀敤xsl鏍煎紡鍖栨樉紺恒傘傘?/p>

Posted by: andy at January 6, 2005 12:53 PM

杞︿笢鍚屽織錛岃繖鏍峰仛涓嶅ソ錛歅
rss鏈潵灝卞湪緗戜笂錛屼綘鑱氬悎瀹冨湪浣犵殑緗戦〉涓婁笉浠呮崯瀹充簡浣犺嚜宸變富欏電殑璐ㄩ噺錛岃屼笖榪鋒儜浜嗘悳绱㈠紩鎿庯紝閫犳垚浣犵棝鏂ョ殑鈥滈棬鎴風綉绔欐崯瀹沖垱浣滅儹鎯呪濈殑鏁堟灉銆傝繕鏄笉瑕佽仛鍚堢殑濂斤紒



pyguru 2005-02-17 03:00 鍙戣〃璇勮
]]>
Using RSS News Feeds with Perlhttp://m.tkk7.com/pyguru/archive/2005/02/17/1266.htmlpygurupyguruWed, 16 Feb 2005 18:59:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/17/1266.htmlhttp://m.tkk7.com/pyguru/comments/1266.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/17/1266.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1266.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1266.htmlAbstract

The Rich Site Summary (RSS) format, previously known as the RDF Site Summary, has quietly become the dominant format for distributing news headlines on the Web.

In this Mother of Perl tutorial, we will write a short Perl script (less than 100 lines) that retrieves an XML RSS file from the Web or local file system and converts it to HTML. Using a Server Side Include (SSI) or similar method, you can easily add news headlines from any number of sources to your Web site.

History

Where did RSS come from you ask? Netscape invented the RSS format for "channels" on Netscape Netcenter (http://my.netscape.com). It was released to the public in March of 1999. The first non-Netscape Web site to incorporate the new format was Scripting News, a popular technology news site run by Dave Winer, president of Userland Software (think Frontier). Interestingly enough, Scripting News had been using its own XML format, scriptingNews, since December of 1997.

In May of 1999, Dave Winer released a new version of the scriptingNews XML format, which added new content-rich elements. Netscape followed suit by adopting most of the new scriptingNews elements into RSS 0.91, which was released in July of 1999.

Userland Software also rolled out their own flavor of my.netscape.com. If you haven't already guessed, it's available at http://my.userland.com.

As far as I know, RSS is the most widely used XML format on the Web today. RSS headlines are available for many popular news sites like Slashdot, Forbes, and CNET News.com, and the list is growing daily.

In a time when "stickiness" is a good, displaying news headlines on your Web site can really help give it the extra "umph" that will encourage users to return. After all, users can only read your president's bio but so many times.

Required Modules

For rss2html.pl to work on your system, you should have a recent version of Perl installed, 5.003 or better. 5.005 is recommended. You will also need the XML::Parser and XML::RSS modules installed.

To install the modules on a *nix system, type:
perl -MCPAN -e "install XML::Parser"
perl -MCPAN -e "install XML::RSS"

If you're using a win32 machine (Win95/98/NT), you have a recent installation of Activestate Perl. If you don't have a recent version, visit http://www.activestate.com.

To install XML::Parser on a win32 machine type:
ppm install XML-Parser

To install XML::RSS on a win32 machine (you must have a C compiler and nmake):

Next, we'll examine the RSS format in more detail.

rss2html.pl Get the source
This script converts an RSS file on the Web or local file system to HTML.

RSS 0.9

The first public version of RSS, 0.9, includes basic headline information. Below is an example RSS file for Freshmeat.net, a popular news site for Linux software:

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://my.netscape.com/rdf/simple/0.9/">

<channel>
<title>freshmeat.net</title>
<link>http://freshmeat.net</link>
<description>the one-stop-shop for all your Linux softwar needs</description>
</channel>

<image>
<title>freshmeat.net</title>
<url>http://freshmeat.net/images/fm.mini.jpg</url>
<link>http://freshmeat.net</link>
</image>

<item>
<title>Geheimnis 0.59</title>
<link>http://freshmeat.net/news/1999/06/21/930004162.html</link>
</item>

<item>
<title>Firewall Manager 1.3 PRO</title>
<link>http://freshmeat.net/news/1999/06/21/930004148.html</link>
</item>

<textinput>
<title>quick finder</title>
<description>Use the text input below to search the fresh
meat application database</description>
<name>query</name>
<link>http://core.freshmeat.net/search.php3</link>
</textinput>

</rdf:RDF>

The first major element is channel which contains the following elements:

  • title - the title of the channel
  • link - the link to the channel Web site
  • description - short description of the channel

An RSS channel may also contain an image element as in the example above which contains the following elements:

  • title - the text describing the image
  • url - the URL of the image
  • link - the URL that the image is linked to

The item element contains the real channel content which is comprised of a title and a link element. An RSS file may contain up to 15 items.

An RSS 0.9 file may alternatively contain a textinput element which allows users to type a string into a HTML text input field and submit it via the HTTP GET method to the URL specified in the link element.

Next, we will examine RSS 0.91 which was released by Netscape in July of 1999.

RSS 0.91

The latest version of RSS added a few new elements. Below is a sample RSS file from XML.com, an excellent XML resource site:

<?xml version="1.0"?>

<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">

<channel>
<title>XML News and Features from XML.com</title>
<description>XML.com features a rich mix of information and services for the XML community.</description>
<language>en-us</language>
<link>http://xml.com/pub</link>
<copyright>Copyright 1999, O'Reilly and Associates and Seybold Publications</copyright>
<managingEditor>dale@xml.com (Dale Dougherty)</managingEditor>
<webMaster>peter@xml.com (Peter Wiggin)</webMaster>

<image>
<title>XML News and Features from XML.com</title>
<url>http://xml.com/universal/images/xml_tiny.gif</url>
<link>http://xml.com/pub</link>
<width>88</width>
<height>31</height>
</image>

<item>
<title>Issue: XML Data Servers</title>
<link>http://xml.com/pub?wwwrrr_rss</link>
<description>Although not everyone agrees that XML should become a full-fledged data-management discipline, object-database vendors are busy repositioning their object-database products as XML data servers. Jon Udell looks at one of these, Object Design's eXcelon and finds it a solid product.</description>
</item>

<item>
<title>O'Reilly Labs Review: Object Design's eXcelon 1.1</title>
<link>http://xml.com/pub/1999/08/excelon/index.html?wwwrrr_rss</link>
<description>Jon Udell takes a look at eXcelon, Object Design's XML data servers, and explains its user interface and general approach to XML. </description>
</item>

<item>
<title>Report from Montreal</title>
<link>http://xml.com/pub/1999/08/excelon/montreal.html?wwwrrr_rss</link>
<description>Lisa Rein reports from MetaStructures 99 and XML Developers' Day.</description>
</item>

<item>
<title>Reviews: Bluestone Software's XML Suite: Promising App, Rough Around the Edges</title>
<link>http://xml.com/pub/1999/08/bluestone/index.html?wwwrrr_rss</link>
<description>Our reviewer tested Bluestone's XML Suite (XML Server and Visual XML) on the Windows NT platform, simulating a two-way exchange of business information between a book publisher and book stores. The results were encouraging (with a few caveats).</description>
</item>

<item>
<title>Interviews: CBL: Ecommerce Componentry</title>
<link>http://xml.com/pub/1999/08/glushko/glushko.html?wwwrrr_rss</link>
<description>In this audio interview, Bob Glushko of Commerce One talks about the Common Business Library (CBL) as a set of building blocks for XML document types and schemas used in ecommerce.</description>
</item>

<item>
<title>Backends Sharing Data</title>
<link>http://xml.com/pub/1999/08/rpc/index.html?wwwrrr_rss</link>
<description>What if you could script remote procedure calls between web sites as easily as you can between programs? Edd Dumbill shows how it can be done in PHP.</description>
</item>

<item>
<title>Back Issue: XML Suite</title>
<link>http://xml.com/pub/1999/08/18/index.html?wwwrrr_rss</link>
<description> Barry Nance runs Bluestone's XML Suite through the paces. The tools show promise for passing data between databases and XML. But there are still a few kinks to be worked out.</description>
</item>

<item>
<title>Back Issue: XML-RPC</title>
<link>http://xml.com/pub/1999/08/11/index.html?wwwrrr_rss</link>
<description>A major promise of XML is its ability to pass data simply from one place to another, regardless of platform. In this issue, Edd Dumbill shows how to use XML-RPC in PHP to pass data from a web site to a PDA.</description>
</item>

<item>
<title>News: InDelv XML/XSL Client Version 0.4.</title>
<link>http://xml.com/pub/coverpage/newspage.html#ni1999-08-27-a?wwwrrr_rss</link>
<description> A posting from Rob Brown reports on the public availability of the new InDelv XML Client version 0.4. This version represent an upgrade to InDelv's previously released XML Browser, but "it has been renamed as a 'Client' to reflect the fact that it now contains both an XML/XSL browser and an XML/XSL editor. The browser is available free for all uses. The editor comes packaged with the browser as a demo, which can later be upgraded to a full commercial version. This is a 100% Java appl...
</description>
</item>

<item>
<title>News: OpenJade Development Team Releases OpenJade 1.3pre1 (Beta).</title>
<link>http://xml.com/pub/coverpage/newspage.html#ni1999-08-27-g?wwwrrr_rss</link>
<description> A recent posting from Avi Kivity and the OpenJade Development Team announced the release of OpenJade 1.3pre1 (Beta). "OpenJade is the DSSSL user community's open source implementation of DSSSL, Document Style Semantics and Specification Language, an ISO standard for rendering SGML and XML documents. OpenJade is based on James Clark's widely used Jade. OpenJade 1.3pre1 is a more complete implementation of the DSSSL standard, and introduces many new features, including (1) Implementat...
</description>
</item>

<item>
<title>News: IBM XML Parser Update: XML4C2 Version 2.3.1 Released.</title>
<link>http://xml.com/pub/coverpage/newspage.html#ni1999-08-27-b?wwwrrr_rss</link>
<description> Dean Roddey posted an announcement for the update of XML4C. IBM's XML for C++ parser (XML4C) "is a validating XML parser written in a portable subset of C++. XML4C makes it easy to give an application the ability to read and write XML data. Its two shared libraries provide classes for parsing, generating, manipulating, and validating XML documents. XML4C is faithful to the XML 1.0 Recommendation and associated standards (DOM 1.0, SAX 1.0). Source code, samples and API documentation ...
</description>
</item>

<item>
<title>News: Platform for Privacy Preferences (P3P) Specification Working Draft.</title>
<link>http://xml.com/pub/coverpage/newspage.html#ni1999-08-27-h?wwwrrr_rss</link>
<description> As part of the W3C P3P Activity, a fifth public working draft of the Platform for Privacy Preferences (P3P) Specification has been published for review by W3C members. The working draft "describes the Platform for Privacy Preferences (P3P). P3P enables Web sites to express their privacy practices and enables users to exercise preferences over those practices. P3P compliant products will allow users to be informed of site practices (in both machine and human readable formats), to deleg...
</description>
</item>

<item>
<title>News: Extended XLink with XSLT.</title>
<link>http://xml.com/pub/coverpage/newspage.html#ni1999-08-27-c?wwwrrr_rss</link>
<description> Nikita Ogievetsky (President, Cogitech, Inc.) posted an announcement for the availability of slides from the Metastructures '99 presentation "HTML Form Templates with XML. All in One and One for All. XSLT template library for WEB applications." The paper describes building XSLT template library for web applications. The goal was to "demonstrate data processing on the web made easy with XSL transformations: Generate a data maintenance web with data-structure controlled by XML, scree...
</description>
</item>

<item>
<title>News: HyBrick Web Site Reopens.</title>
<link>http://xml.com/pub/coverpage/newspage.html#ni1999-08-27-d?wwwrrr_rss</link>
<description> A posting from Toshimitsu Suzuki (Fujitsu Laboratories Ltd.) to the XLXP-DEV mailing list recently announced the reopening of the HyBrick Web site. 'HyBrick' is "an advanced SGML/XML browser developed by Fujitsu Laboratories, the research arm of Fujitsu. HyBrick is based on an architecture that supports advanced linking and formatting capabilities. HyBrick includes a DSSSL renderer and XLink/XPointer engine running on top of James Clark's SP and Jade. HyBrick supports: (1) Both v...
</description>
</item>

<item>
<title>News: Extended DocBook Synopses Version 1.0.</title>
<link>http://xml.com/pub/coverpage/newspage.html#ni1999-08-27-e?wwwrrr_rss</link>
<description> Norman Walsh has posted an announcement for a preliminary release of 'Extended DocBook Synopses'. Extended DocBook Synopses is a customization layer that extends DocBook, "adding a function synopsis element, ClassSynopsis for modern, mostly object-oriented, programming languages such as Java, C++, Perl, and IDL." DocBook is an SGML [and XML] DTD maintained by the DocBook Technical Committee of OASIS that particularly well suited to books and papers about computer hardware and softwar...
</description>
</item>

</channel>
</rss>

Notice that there are more descriptive elements for the channel, image, amd items elements. These are referred to as "fat elements" because they contain a more detailed description of each channel item.

The XML::RSS Module

Now that you've had a change to glance at two RSS examples, it's time to introduct the XML::RSS module. XML::RSS is a subclass of XML::Parser, a Perl module maintained by Clark Cooper that utilizes James Clark's Expat C library. XML::RSS was developed to simplify the task of manipulating and parsing RSS files. A deep understanding of XML is not a prerequisite for using XML::RSS since the XML details are hidden inside the class interface.

While XML::RSS is capable of creating RSS files, we will be focusing on parsing existing RSS files in this column. You can read more about the capabilities of XML::Parser in the module's documentation or by typing:
perldoc XML::RSS

The Code

Well, let's look at the code shall we? Lines 16-17 load the XML::RSS and LWP::Simple modules. We've already talked about XML::RSS in brief, but what does LWP::Simple do? Good question! The answer is simple (puns intended). It's a procedural interface for interacting with a Web server. It's also the little cousin of LWP::UserAgent, a fuller object oriented interface. We'll be using one of the library's subroutines later in the code to fetch an RSS file from the Web.

In lines 20-21 we initialize two variables that we're going to use later.

Line 25 starts the main code body. The first thing we do is verify that the user typed exactly one command-line parameter. This parameter is then assigned to the $arg variable in line 28.

Next we create a new instance of the XML::RSS class and assign the reference to the $rss variable on line 31.

Now we must determine whether the command-line parameter the user entered is an HTTP URL or a file on the local file system (lines 34-46). On line 34, we us a regular expression to look for the characters http:.

If the command-line argument starts with these characters, we can safely assume that the user intends to retrieve an RSS file from a Web server. On line 35 we pass the argument to the get() function, which is a part of LWP::Simple, and assign the results to the $content variable. On line 36 we call die() if $content is empty. If this happens, it means there was an error retrieving the RSS file. If the RSS file was downloaded successfully, $rss->parse($content) is called which parses the RSS file and stores the results in the object's internal structure (line 38).

If the command-line argument does not contain the http: characters, we assume the argument is a file instead of a URL on lines 41-46. The first thing we do is assign the value of $arg to the $file variable and test for the existence of the file (lines 42-43).

Then we call $rss->parsefile($file) (line 45), which parses the RSS file and stores the results in the object's internal structure. The parsefile() method parses a file, whereas the parse() method parses the string that's passed to it.

Lastly, we call the print_html subroutine on line 49, which converts the RSS object in nicely formatted HTML.

print_html

As you examine this subroutine, you will begin to understand the internal structure of the XML::RSS object. The critical portion of the subroutine is contained on lines 76-79. In this foreach loop, we iterate over each of the RSS items.

Next, let's take a look at rss2html.pl in action.

rss2html.pl in Action

I've added the following cron jobs that run once per hour on the Webreference server (Scheduler is the NT counterpart):

rss2html.pl http://slashdot.org/slashdot.rdf > slashdot.html
rss2html.pl http://freshmeat.net/backend/fm.rdf > freshmeat.html
rss2html.pl http://www.linuxtoday.com/backend/my-netscape.rdf > linuxtoday.html
rss2html.pl http://www.xml.com/xml/news.rdf > xmlnews.html
rss2html.pl http://www.perlxml.com/rdf/moperl.rdf > mop.html

The commands above fetch the RSS files off the Web and convert them to HTML. Using Server-Side Includes (SSI), I've included the results below:

Slashdot:

Slashdot:

  • WiMax Technology Could Blanket the US?

  • Microsoft Anti-Spyware to Be Free of Charge
  • ACM to Honor TCP/IP Creators with Turing Award
  • New Rules Proposed on Electronic Evidence
  • Intel From Behind the Curtain
  • Kyoto Protocol Comes Into Force
  • Cory Doctorow's 'I, Robot' Posted
  • Straczynski Offers To Re-Boot Star Trek
  • Building The MareNostrum COTS Supercomputer
    Search Slashdot stories

  • freshmeat.net announcements (Global)
  • Zolera SOAP Infrastructure 1.7 (Default branch)
  • XBible 3.0 (Default branch)
  • PDFdirectory 0.2.04 (Default branch)
  • XC-AST 0.7.0 (Default branch)
  • Imagero Reader 1.73 (Default branch)
  • GNU ccAudio2 0.4.0 (Testing branch)
  • quisp 1.27 (Default branch)
  • shsql 1.27 (Default branch)
  • samhain 2.0.4 (Default branch)
  • CANDIDv2 2.40 (Default branch)
  • ADV: Dialing for Dollars
  • libferris 1.1.46 (Default branch)
  • FUDforum 2.6.10 (Stable branch)
  • HORRORss 1.0 (Default branch)
  • Roxen WebServer 4.0.325-release 4 (Default branch)
  • Configuration File Library 1.0 (Default branch)
  • Goggles 0.7.11 (Default branch)
  • Pluto DCE library 2.0.0.9 (Default branch)
  • Pluto Bi-Directional Comm library 2.0.0.9 (Default branch)
  • zen Platform 2.0.4 (Default branch)
  • ADV: Gimme Shelter
  • MIME Email message class 2005.02.15 (Default branch)
  • ELF statifier 1.6.3 (Default branch)
  • SekHost 1.2 (Default branch)
  • ulogd 1.21 (Default branch)
  • Journaled Files LIBrary 0.1.0-0.0.0 (Default branch)
  • FastTemplate.php3 1.2.0 (Default branch)
  • iptables 1.3.0 (Default branch)
  • Very Simple Control Protocol Daemon 0.1.4 (Default branch)
  • C Parameters 0.9.0 (Default branch)
  • ADV: Dialing for Dollars
  • eXtreme Project Management Tool 0.7beta1 (Development branch)
  • gccc 1.099 (Default branch)
  • Magellan Metasearch 1.00-RC3 (Default branch)
  • CAN Abstraction Layer 0.1.4 (Default branch)
  • TreeLine 0.11.1 (Default branch)
  • GNOME Sensors Applet 0.6.1 (Default branch)
  • iODBC Driver Manager and SDK 3.52.2 (Default branch)
  • DISLIN 8.3 (Default branch)
  • Pluto Home 2.0.0.9 (Default branch)
  • ADV: Dialing for Dollars
  • Expense Report Software 1.07 (Default branch)
  • Yzis M3 (Default branch)
  • Q Light Controller 2.4.1 (Default branch)
  • Menc 0.3 (Default branch)
  • Another File Integrity Checker 2.7-0 (Default branch)
  • BibShelf 1.4.0-1 (Default branch)
  • Eleven 1.0 (Default branch)
  • Linice 2.5 (Default branch)
  • JDirt 1.3 (Default branch)
  • ADV: Dialing for Dollars
  • Nazghul 0.4.0 (Default branch)
  • Rush 2005 0.4.10 (Default branch)
  • Monesa 0.24.1 (Stable branch)
  • Persist.NET 0.9.1 beta (Default branch)
  • Roundup 0.8 (Default branch)
  • Aquarium Web Application Framework 2.0 (Default branch)
  • sn9c102 Video Grabber 1.7.0 (Default branch)
  • GRAVEMAN 0.3.8 (Default branch)
  • viewurpmi 0.2 (Default branch)
  • ADV: Dialing for Dollars
  • NuFW 1.0-rc1 (Stable branch)
  • OpenSceneGraph Editor 0.6.0 (Default branch)
  • HPGS - HPGl Script 0.6.0 (Default branch)
  • lustre 1.4.1-rc1 (Default branch)
  • IBM HeapAnalyzer 1.3.3 (Default branch)
  • CANDIDv2 2.3.6 (Default branch)
  • NetSPoC 2.5 (Default branch)
  • Metal Mech 0.0.3 (Default branch)
  • radmind 1.5.0 (Default branch)
  • ADV: Dialing for Dollars
  • iPodBackup 1.4 (Default branch)
  • db4o 4.3 (Mono branch)
  • web2ldap 0.15.9 (Default branch)
  • Mantissa 5.6 (Default branch)
  • Drone IRC Bot 1.2 (Default branch)
  • NoFuss POS 0.06 (Default branch)
  • xlog 1.1 (Stable branch)
  • ActiveBPEL 1.0.7 (Default branch)
  • Java Embedded Python 1.1 (Default branch)
  • ADV: Dialing for Dollars
  • Neveredit 0.8 (Default branch)
  • The friendly interactive shell 1.1 (Default branch)
  • Webmatic 2.0.3 (Default branch)
  • JTMOS Operating System Build 7700 (Default branch)
  • BIRD 1.0.10 (Default branch)
  • Tune in 2 Me 050215 (Default branch)
  • HMSCalc 3.0 (Default branch)
  • Information Currency Web Services 0.0.4 (Default branch)
  • Nitro + Og 0.10.0 (Default branch)
  • ADV: Dialing for Dollars
  • Just For Fun Network Management System 0.8.0 (Stable branch)
  • rxvt-unicode 5.1 (Default branch)
  • PHPEmaillist 0.3 (Default branch)
  • ulogd-php 1.0 (Default branch)
  • mod_access_rbl2 1.0 (Default branch)
  • 5lack10.1 0.8 (Default branch)
  • profusemail 0.9.1 (Default branch)
  • Linux Today

    Linux Today

  • LWN.net: FSF Announces New Executive Director
  • LinuxPlanet: Novell Takes Enterprise Security Focus
  • CNET News: HP: Don't Like Software Patents? Learn to Deal
  • internetnews.com: CA Chief: Innovate, Cooperate
  • Boston Herald: Linux Show Plans BCEC Move
    Search Linux Today:

  • XML.com

    XML.com

  • Features: Very Dynamic Web Interfaces
  • Features: Comparing CSS and XSL: A Reply from Norm Walsh
  • Features: Top 10 XForms Engines
  • Features: An Introduction to TMAPI
  • XML Tourist: The Silent Soundtrack
  • Transforming XML: The XPath 2.0 Data Model
  • Features: SIMILE: Practical Metadata for the Semantic Web
  • Features: Hacking Open Office
  • Features: Formal Taxonomies for the U.S. Government
  • Features: Reviewing the Architecture of the World Wide Web
  • Features: Printing XML: Why CSS Is Better than XSL
  • Python and XML: Introducing the Amara XML Toolkit
  • Features: Introducing Comega
  • Features: SAML 2: The Building Blocks of Federated Identity
  • The Restful Web: Amazon's Simple Queue Service

    Copyright 2004, O'Reilly Media, Inc.

  • Conclusion

    Well, we've shown in this column that Perl can really pack a wallop in a short amount of code. With rss2html.pl, anyone can automatically add a news feed to their Web site.

    For more information on RSS, you might try visiting the following sites:

    rss2html.pl Get the source
    This script converts an RSS file on the Web or local file system to HTML.



    pyguru 2005-02-17 02:59 鍙戣〃璇勮
    ]]>
    The Python Web services developer: RSS for Pythonhttp://m.tkk7.com/pyguru/archive/2005/02/17/1265.htmlpygurupyguruWed, 16 Feb 2005 18:48:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/17/1265.htmlhttp://m.tkk7.com/pyguru/comments/1265.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/17/1265.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1265.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1265.htmlContent syndication for the Web

    Level: Introductory


    Mike Olson (mike.olson@fourthought.com), Principal Consultant, Fourthought, Inc.
    Uche Ogbuji (uche.ogbuji@fourthought.com), Principal Consultant, Fourthought, Inc.

    13 Nov 2002

    Column iconRSS is one of the most successful XML services ever. Despite its chaotic roots, it has become the community standard for exchanging content information across Web sites. Python is an excellent tool for RSS processing, and Mike Olson and Uche Ogbuji introduce a couple of modules available for this purpose.

    RSS is an abbreviation with several expansions: "RDF Site Summary," "Really Simple Syndication," "Rich Site Summary," and perhaps others. Behind this confusion of names is an astonishing amount of politics for such a mundane technological area. RSS is a simple XML format for distributing summaries of content on Web sites. It can be used to share all sorts of information including, but not limited to, news flashes, Web site updates, event calendars, software updates, featured content collections, and items on Web-based auctions.

    RSS was created by Netscape in 1999 to allow content to be gathered from many sources into the Netcenter portal (which is now defunct). The UserLand community of Web enthusiasts became early supporters of RSS, and it soon became a very popular format. The popularity led to strains over how to improve RSS to make it even more broadly useful. This strain led to a fork in RSS development. One group chose an approach based on RDF, in order to take advantage of the great number of RDF tools and modules, and another chose a more stripped-down approach. The former is called RSS 1.0, and the latter RSS 0.91. Just last month the battle flared up again with a new version of the non-RDF variant of RSS, which its creators are calling "RSS 2.0."

    RSS 0.91 and 1.0 are very popular, and used in numerous portals and Web logs. In fact, the blogging community is a great user of RSS, and RSS lies behind some of the most impressive networks of XML exchange in existence. These networks have grown organically, and are really the most successful networks of XML services in existence. RSS is a XML service by virtue of being an exchange of XML information over an Internet protocol (the vast majority of RSS exchange is simple HTTP GET of RSS documents). In this article, we introduce just a few of the many Python tools available for working with RSS. We don't provide a technical introduction to RSS, because you can find this in so many other articles (see Resources). We recommend first that you gain a basic familiarity with RSS, and that you understand XML. Understanding RDF is not required.

    [We consider RSS an 'XML service' rather than a 'Web service' due to the use of XML descriptions but the lack of use of WSDL. -- Editors]

    RSS.py
    Mark Nottingham's RSS.py is a Python library for RSS processing. It is very complete and well-written. It requires Python 2.2 and PyXML 0.7.1. Installation is easy; just download the Python file from Mark's home page and copy it to somewhere in your PYTHONPATH.

    Most users of RSS.py need only concern themselves with two classes it provides: CollectionChannel and TrackingChannel. The latter seems the more useful of the two. TrackingChannel is a data structure that contains all the RSS data indexed by the key of each item. CollectionChannel is a similar data structure, but organized more as RSS documents themselves are, with the top-level channel information pointing to the item details using hash values for the URLs. You will probably use the utility namespace declarations in the RSS.ns structure. Listing 1 is a simple script that downloads and parses an RSS feed for Python news, and prints out all the information from the various items in a simple listing.



    from RSS import ns, CollectionChannel, TrackingChannel

    #Create a tracking channel, which is a data structure that
    #Indexes RSS data by item URL
    tc = TrackingChannel()

    #Returns the RSSParser instance used, which can usually be ignored
    tc.parse("http://www.python.org/channews.rdf")

    RSS10_TITLE = (ns.rss10, 'title')
    RSS10_DESC = (ns.rss10, 'description')

    #You can also use tc.keys()
    items = tc.listItems()
    for item in items:
    #Each item is a (url, order_index) tuple
    url = item[0]
    print "RSS Item:", url
    #Get all the data for the item as a Python dictionary
    item_data = tc.getItem(item)
    print "Title:", item_data.get(RSS10_TITLE, "(none)")
    print "Description:", item_data.get(RSS10_DESC, "(none)")



    We start by creating a TrackingChannel instance, and then populate it with data parsed from the RSS feed at http://www.python.org/channews.rdf. RSS.py uses tuples as the property names for RSS data. This may seem an unusual approach to those not used to XML processing techniques, but it is actually a very useful way of being very precise about what was in the original RSS file. In effect, an RSS 0.91 title element is not considered to be equivalent to an RSS 1.0 one. There is enough data for the application to ignore this distinction, if it likes, by ignoring the namespace portion of each tuple; but the basic API is wedded to the syntax of the original RSS file, so that this information is not lost. In the code, we use this property data to gather all the items from the news feed for display. Notice that we are careful not to assume which properties any particular item might have. We retrieve properties using the safe form as seen in the code below.



    print "Title:", item_data.get(RSS10_TITLE, "(none)")

    Which provides a default value if the property is not found, rather than this example.



    print "Title:", item_data[RSS10_TITLE]

    This precaution is necessary because you never know what elements are used in an RSS feed. Listing 2shows the output from Listing 1.



    $ python listing1.py
    RSS Item: http://www.python.org/2.2.2/
    Title: Python 2.2.2b1
    Description: (none)
    RSS Item: http://sf.net/projects/spambayes/
    Title: spambayes project
    Description: (none)
    RSS Item: http://www.mems-exchange.org/software/scgi/
    Title: scgi 0.5
    Description: (none)
    RSS Item: http://roundup.sourceforge.net/
    Title: Roundup 0.4.4
    Description: (none)
    RSS Item: http://www.pygame.org/
    Title: Pygame 1.5.3
    Description: (none)
    RSS Item: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
    Title: Pyrex 0.4.4.1
    Description: (none)
    RSS Item: http://www.tundraware.com/Software/hb/
    Title: hb 1.88
    Description: (none)
    RSS Item: http://www.tundraware.com/Software/abck/
    Title: abck 2.2
    Description: (none)
    RSS Item: http://www.terra.es/personal7/inigoserna/lfm/
    Title: lfm 0.9
    Description: (none)
    RSS Item: http://www.tundraware.com/Software/waccess/
    Title: waccess 2.0
    Description: (none)
    RSS Item: http://www.krause-software.de/jinsitu/
    Title: JinSitu 0.3
    Description: (none)
    RSS Item: http://www.alobbs.com/pykyra/
    Title: PyKyra 0.1.0
    Description: (none)
    RSS Item: http://www.havenrock.com/developer/treewidgets/index.html
    Title: TreeWidgets 1.0a1
    Description: (none)
    RSS Item: http://civil.sf.net/
    Title: Civil 0.80
    Description: (none)
    RSS Item: http://www.stackless.com/
    Title: Stackless Python Beta
    Description: (none)

    Of course, you would expect somewhat different output because the news items will have changed by the time you try it. The RSS.py channel objects also provide methods for adding and modifying RSS information. You can write the result back to RSS 1.0 format using the output() method. Try this out by writing back out the information parsed in Listing 1. Kick off the script in interactive mode by running: python -i listing1.py . At the resuting Python prompt, run the following example.



    >>> result = tc.output(items)
    >>> print result

    The result is an RSS 1.0 document printed out. You must have RSS.py, version 0.42 or more recent for this to work. There is a bug in the output() method in earlier versions.

    rssparser.py
    Mark Pilgrim offers another module for RSS file parsing. It doesn't provide all the features and options that RSS.py does, but it does offer a very liberal parser, which deals well with all the confusing diversity in the world of RSS. To quote from the rssparser.py page:

    You see, most RSS feeds suck. Invalid characters, unescaped ampersands (Blogger feeds), invalid entities (Radio feeds), unescaped and invalid HTML (The Register's feed most days). Or just a bastardized mix of RSS 0.9x elements with RSS 1.0 elements (Movable Type feeds).
    Then there are feeds, like Aaron's feed, which are too bleeding edge. He puts an excerpt in the description element but puts the full text in the content:encoded element (as CDATA). This is valid RSS 1.0, but nobody actually uses it (except Aaron), few news aggregators support it, and many parsers choke on it. Other parsers are confused by the new elements (guid) in RSS 0.94 (see Dave Winer's feed for an example). And then there's Jon Udell's feed, with the fullitem element that he just sort of made up.

    It's funny to consider this in the light of the fact that XML and Web services are supposed to increase interoperability. Anyway, rssparser.py is designed to deal with all the madness.

    Installing rssparser.py is also very easy. You download the Python file (see Resources), rename it from "rssparser.py.txt" to "rssparser.py", and copy it to your PYTHONPATH. I also suggest getting the optional timeoutsocket module which improves the timeout behavior of socket operations in Python, and thus can help getting RSS feeds less likely to stall the application thread in case of error.

    Listing 3 is a script that is the equivalent of Listing 1, but using rssparser.py, rather than RSS.py.



    import rssparser
    #Parse the data, returns a tuple: (data for channels, data for items)
    channel, items = rssparser.parse("http://www.python.org/channews.rdf")

    for item in items:
    #Each item is a dictionary mapping properties to values
    print "RSS Item:", item.get('link', "(none)")
    print "Title:", item.get('title', "(none)")
    print "Description:", item.get('description', "(none)")



    As you can see, the code is much simpler. The trade-off between RSS.py and rssparser.py is largely that the former has more features, and maintains more syntactic information from the RSS feed. The latter is simpler, and a more forgiving parser (the RSS.py parser only accepts well-formed XML).

    The output should be the same as in Listing 2.

    Conclusion
    There are many Python tools for RSS, and we don't have space to cover them all. Aaron Swartz's page of RSS tools is a good place to start looking if you want to explore other modules out there. RSS is easy to work with in Python, because of all the great modules available for it. The modules hide all the chaos brought about by the history and popularity of RSS. If your XML services needs mostly involve the exchange of descriptive information for Web sites, we highly recommend using the most successful XML service technology in employment.

    Next month, we will explain how to use e-mail packages for Python for writing Web services over SMTP.

    Resources

    About the authors
    Photo of Mike Olson Mike Olson is a consultant and co-founder of Fourthought Inc., a software vendor and consultancy specializing in XML solutions for enterprise knowledge management applications. Fourthought develops 4Suite, an open source platform for XML middleware. You can contact Mr. Olson at mike.olson@fourthought.com.


    Photo of Uche Ogbuji Uche Ogbuji is a consultant and co-founder of Fourthought Inc., a software vendor and consultancy specializing in XML solutions for enterprise knowledge management applications. Fourthought develops 4Suite, an open source platform for XML middleware. Mr. Ogbuji is a Computer Engineer and writer born in Nigeria, living and working in Boulder, Colorado, USA. You can contact Mr. Ogbuji at uche.ogbuji@fourthought.com.



    pyguru 2005-02-17 02:48 鍙戣〃璇勮
    ]]>
    "universal" RSS feed parserhttp://m.tkk7.com/pyguru/archive/2005/02/17/1264.htmlpygurupyguruWed, 16 Feb 2005 18:40:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/17/1264.htmlhttp://m.tkk7.com/pyguru/comments/1264.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/17/1264.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1264.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1264.htmlFeed Parser

    This is a "universal" feed parser, suitable for reading syndicated feeds as produced by weblogs, news sites, wikis, and many other types of sites. It handles Atom feeds, CDF, and the nine different versions of RSS.

    This project is now hosted at SourceForge. Please check there for updates. This page contains old news and is no longer updated. (2004-06-21)



    pyguru 2005-02-17 02:40 鍙戣〃璇勮
    ]]>
    How to replace a string in multiple files?http://m.tkk7.com/pyguru/archive/2005/02/16/1243.htmlpygurupyguruTue, 15 Feb 2005 18:18:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/16/1243.htmlhttp://m.tkk7.com/pyguru/comments/1243.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/16/1243.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1243.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1243.html

    pyguru 2005-02-16 02:18 鍙戣〃璇勮
    ]]>
    CVS鐨勫父鐢ㄥ懡浠ら熸煡鎵嬪唽http://m.tkk7.com/pyguru/archive/2005/02/15/1236.htmlpygurupyguruTue, 15 Feb 2005 15:39:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/15/1236.htmlhttp://m.tkk7.com/pyguru/comments/1236.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/15/1236.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1236.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1236.htmlCVS鐨勫父鐢ㄥ懡浠ら熸煡鎵嬪唽
    钃濇.鏋?http://www.lslnet.com 2002騫?鏈?鏃?11:08

    浣?鑰咃細 杞︿笢

    chedong@bigfoot.com 

    鏈鍚庢洿鏂幫細2002-08-30 13:18:41

    鐗堟潈澹版槑錛氬彲浠ヤ換鎰忚漿杞斤紝杞澆鏃惰鍔″繀鏍囨槑鍘熷鍑哄鍜屼綔鑰呬俊鎭?br>

    姒傝堪錛?b style="color: black; background-color: rgb(255, 255, 102);">CVS鏄竴涓狢/S緋葷粺錛屽涓紑鍙戜漢鍛橀氳繃涓涓腑蹇冪増鏈帶鍒剁郴緇熸潵璁板綍鏂囦歡鐗堟湰錛屼粠鑰岃揪鍒頒繚璇佹枃浠跺悓姝ョ殑鐩殑銆?

           CVS鏈嶅姟鍣紙鏂囦歡鐗堟湰搴擄級
         /     |       \
    錛堢増 鏈?鍚?姝ワ級
       /       |         \  
    寮鍙戣?  寮鍙戣?   寮鍙戣?

    浠ヤ笅鏄湰鏂囦富瑕佸唴瀹癸細寮鍙戜漢鍛樺彲浠ヤ富瑕佹寫閫?, 6鐪嬪氨鍙互浜嗭紝CVS鐨勭鐞嗗憳鍒欐洿闇瑕佹噦鐨勬洿澶氫竴浜?

    1. CVS鐜鍒濆鍖?/a>錛?b style="color: black; background-color: rgb(255, 255, 102);">CVS鐜? 澧冪殑鎼緩                                           綆$悊鍛?/li>
    2. CVS鐨勬棩甯鎬嬌鐢?/a>錛氭棩甯稿紑鍙戜腑鏈甯哥敤鐨?b style="color: black; background-color: rgb(255, 255, 102);">CVS鍛戒護錛?nbsp;             寮鍙戜漢鍛?nbsp;     綆$悊鍛?/li>
    3. CVS鐨勫垎鏀紑鍙?/a>錛? 欏圭洰鎸夌収涓嶅悓榪涘害鍜岀洰鏍囧茍鍙戣繘琛?nbsp;                         綆$悊鍛?/li>
    4. CVS鐨勭敤鎴瘋璇?/a>錛? 閫氳繃SSH鐨勮繙紼嬬敤鎴瘋璇侊紝瀹夊叏錛岀畝鍗?nbsp;                      綆$悊鍛?/li>
    5. CVSWEB錛?b style="color: black; background-color: rgb(255, 255, 102);">CVS鐨刉EB 璁塊棶鐣岄潰澶уぇ鎻愰珮浠g爜鐗堟湰姣旇緝鐨勬晥鐜?nbsp;                    綆$悊鍛?/li>
    6. CVS TAG錛氬皢$Id$鍔犲叆浠g爜娉ㄩ噴涓紝鏂逛究寮鍙戣繃紼嬬殑璺熻釜       寮鍙戜漢鍛?/li>
    7. CVS vs VSS: CVS鍜孷irsual SourceSafe鐨勬瘮杈?/li>

    涓涓郴緇?0%鐨勫姛鑳藉線寰鑳藉婊¤凍80%鐨勯渶姹傦紝CVS涔熶笉渚嬪錛屼互涓嬫槸CVS鏈甯哥敤鐨勫姛鑳斤紝鍙兘鐢ㄥ埌鐨勮繕涓嶅埌瀹冨叏閮ㄥ懡浠ら夐」鐨?0%錛屾洿澶氱殑鍔熻兘璇峰湪瀹為檯搴旂敤榪囩▼涓綋浼氾紝瀛︿範榪囩▼涓簲璇ユ槸鐢ㄥ灝戯紝瀛﹀灝戯紝鐢ㄥ埌浜嗗啀瀛︿篃涓嶈繜銆?


    CVS鐜鍒濆鍖?br> ============

    鐜璁劇疆錛氭寚瀹?b style="color: black; background-color: rgb(255, 255, 102);">CVS搴撶殑璺緞CVSROOT
    tcsh
    setenv CVSROOT /path/to/cvsroot
    bash
    CVSROOT=/path/to/cvsroot ; export CVSROOT

    鍚庨潰榪樻彁鍒拌繙紼?b style="color: black; background-color: rgb(255, 255, 102);">CVS鏈嶅姟鍣ㄧ殑璁劇疆錛?br> CVSROOT=:ext:$USER@test.server.address#port:/path/to/cvsroot CVS_RSH=ssh; export CVSROOT CVS_RSH

    鍒濆鍖栵細CVS鐗堟湰搴撶殑鍒濆鍖栥?br> cvs init

    涓涓」鐩殑棣栨瀵煎叆
    cvs import -m "write some comments here" project_name vendor_tag release_tag
    鎵ц鍚庯細浼氬皢鎵鏈夋簮鏂囦歡鍙婄洰褰曞鍏ュ埌/path/to/cvsroot/project_name鐩綍涓?br> vender_tag: 寮鍙戝晢鏍囪
    release_tag: 鐗堟湰鍙戝竷鏍囪

    欏圭洰瀵煎嚭錛氬皢浠g爜浠?b style="color: black; background-color: rgb(255, 255, 102);">CVS搴撻噷瀵煎嚭
    cvs checkout project_name
    cvs 灝嗗垱寤簆roject_name鐩綍錛屽茍灝嗘渶鏂扮増鏈殑婧愪唬鐮佸鍑哄埌鐩稿簲鐩綍涓傝繖涓猚heckout鍜孷irvual SourceSafe涓殑check out涓嶆槸涓涓蹇碉紝鐩稿浜嶸irvual SourceSafe鐨刢heck out鏄?b style="color: black; background-color: rgb(255, 255, 102);">cvs update錛?check in鏄?b style="color: black; background-color: rgb(255, 255, 102);">cvs commit銆?/i>

    CVS鐨勬棩甯鎬嬌鐢?/b>  
    =============

    娉ㄦ剰錛氱涓嬈″鍑轟互鍚庯紝灝變笉鏄氳繃cvs checkout鏉ュ悓姝ユ枃浠朵簡錛岃屾槸瑕佽繘鍏ュ垰鎵?b style="color: black; background-color: rgb(255, 255, 102);">cvs checkout project_name瀵煎嚭鐨刾roject_name鐩綍涓嬭繘琛屽叿浣撴枃浠剁殑鐗堟湰鍚屾錛堟坊鍔狅紝淇敼錛屽垹闄わ級鎿嶄綔銆?/b>

    灝嗘枃浠跺悓姝ュ埌鏈鏂扮殑鐗堟湰錛?br> cvs update
    涓嶅埗瀹氭枃浠跺悕錛?b style="color: black; background-color: rgb(255, 255, 102);">cvs
    灝嗗悓姝ユ墍鏈夊瓙鐩綍涓嬬殑鏂囦歡錛屼篃鍙互鍒跺畾鏌愪釜鏂囦歡鍚?鐩綍榪涜鍚屾
    cvs update file_name
    鏈濂芥瘡澶╁紑濮嬪伐浣滃墠鎴栧皢鑷繁鐨勫伐浣滃鍏ュ埌CVS搴撻噷鍓嶉兘瑕佸仛涓嬈★紝騫跺吇鎴愨滃厛鍚屾 鍚庝慨鏀光濈殑涔犳儻錛屽拰Virvual SourceSafe涓嶅悓錛?b style="color: black; background-color: rgb(255, 255, 102);">CVS閲屾病鏈夋枃浠墮攣瀹氱殑姒傚康錛屾墍鏈夌殑鍐茬獊鏄湪commit涔嬪墠瑙e喅錛屽鏋滀綘淇敼榪囩▼涓紝鏈夊叾浠栦漢淇敼騫禼ommit鍒頒簡CVS搴撲腑錛?b style="color: black; background-color: rgb(255, 255, 102);">CVS浼氶氱煡浣犳枃浠跺啿紿侊紝騫惰嚜鍔ㄥ皢鍐茬獊閮ㄥ垎鐢?br> >>>>>>
    content on cvs server
    <<<<<<
    content in your file
    >>>>>>
    鏍囪鍑烘潵錛岀敱浣犵‘璁ゅ啿紿佸唴瀹圭殑鍙栬垗銆?br> 鐗堟湰鍐茬獊涓鑸槸鍦ㄥ涓漢淇敼涓涓枃浠墮犳垚鐨勶紝浣嗚繖縐嶉」鐩鐞嗕笂鐨勯棶棰樹笉搴旇鎸囨湜鐢?b style="color: black; background-color: rgb(255, 255, 102);">CVS鏉ヨВ鍐熾?/i>

    紜淇敼鍐欏叆鍒?b style="color: black; background-color: rgb(255, 255, 102);">CVS搴撻噷錛?br> cvs commit -m "write some comments here" file_name

    娉ㄦ剰錛?b style="color: black; background-color: rgb(255, 255, 102);">CVS鐨勫緢澶氬姩浣滈兘鏄氳繃cvs commit榪涜鏈鍚庣‘璁ゅ茍淇敼鐨勶紝鏈濂芥瘡嬈″彧淇敼涓涓枃浠躲傚湪紜鐨勫墠錛岃繕闇瑕佺敤鎴峰~鍐欎慨鏀規敞閲婏紝浠ュ府鍔╁叾浠栧紑鍙戜漢鍛樹簡瑙d慨鏀圭殑鍘熷洜銆傚鏋滀笉鐢ㄥ啓-m "comments"鑰岀洿鎺ョ‘璁cvs commit file_name` 鐨勮瘽錛?b style="color: black; background-color: rgb(255, 255, 102);">cvs浼氳嚜鍔ㄨ皟鐢ㄧ郴緇熺己鐪佺殑鏂囧瓧緙栬緫鍣?涓鑸槸vi)瑕佹眰浣犲啓鍏ユ敞閲娿?br> 娉ㄩ噴鐨勮川閲忓緢閲嶈錛氭墍浠ヤ笉浠呭繀欏昏鍐欙紝鑰屼笖蹇呴』鍐欎竴浜涙瘮杈冩湁鎰忎箟鐨勫唴瀹癸細浠ユ柟渚垮叾浠栧紑鍙戜漢鍛樿兘澶熷緢濂界殑鐞嗚В
    涓嶅ソ鐨勬敞閲婏紝寰堥毦璁╁叾浠栫殑寮鍙戜漢鍛樺揩閫熺殑鐞嗚В錛氭瘮濡傦細 -m "bug fixed" 鐢氳嚦 -m ""
    濂界殑娉ㄩ噴錛岀敋鑷沖彲浠ョ敤涓枃: -m "鍦ㄧ敤鎴鋒敞鍐岃繃紼嬩腑鍔犲叆浜咵mail鍦板潃鏍¢獙"


    淇敼鏌愪釜鐗堟湰娉ㄩ噴錛氭瘡嬈″彧紜涓涓枃浠跺埌CVS搴撻噷鏄竴涓緢濂界殑涔犳儻錛屼絾闅懼厤鏈夋椂鍊欏繕浜嗘寚瀹氭枃浠跺悕錛屾妸澶氫釜鏂囦歡浠ュ悓鏍鋒敞閲奵ommit鍒?b style="color: black; background-color: rgb(255, 255, 102);">CVS搴撻噷浜嗭紝浠ヤ笅鍛戒護鍙互鍏佽浣犱慨鏀規煇涓枃浠舵煇涓増鏈殑娉ㄩ噴錛?br> cvs admin -m 1.3:"write some comments here" file_name

    娣誨姞鏂囦歡
    鍒涘緩濂芥柊鏂囦歡鍚庯紝姣斿錛歵ouch new_file
    cvs add new_file
    娉ㄦ剰錛氬浜庡浘鐗囷紝Word鏂囨。絳夐潪綰枃鏈殑欏圭洰錛岄渶瑕佷嬌鐢?b style="color: black; background-color: rgb(255, 255, 102);">cvs add -b閫夐」錛屽惁鍒欐湁鍙兘鍑虹幇鏂囦歡琚牬鍧忕殑鎯呭喌
    姣斿錛?b style="color: black; background-color: rgb(255, 255, 102);">cvs add -kb new_file.gif
    鐒跺悗紜淇敼騫舵敞閲?
    cvs ci -m "write some comments here"

    鍒犻櫎鏂囦歡錛?br> 灝嗘煇涓簮鏂囦歡鐗╃悊鍒犻櫎鍚庯紝姣斿錛歳m file_name
    cvs rm file_name
    鐒跺悗紜淇敼騫舵敞閲?br> cvs ci -m "write some comments here"
    浠ヤ笂闈㈠墠2姝ュ悎騫剁殑鏂規硶涓猴細
    cvs rm -f file_name
    cvs ci -m "why delete file"

    娉ㄦ剰錛氬緢澶?b style="color: black; background-color: rgb(255, 255, 102);">cvs鍛戒護閮芥湁緙╁啓褰㈠紡錛歝ommit=>ci; update=>up; checkout=>co; remove=>rm;


    娣誨姞鐩綍錛?br> cvs add dir_name

    鏌ョ湅淇敼鍘嗗彶錛?b style="color: black; background-color: rgb(255, 255, 102);">cvs log file_name
    cvs history file_name

    鏌ョ湅褰撳墠鏂囦歡涓嶅悓鐗堟湰鐨勫尯鍒?br> cvs diff -r1.3 -r1.5 file_name
    鏌ョ湅褰撳墠鏂囦歡錛堝彲鑳藉凡緇忎慨鏀逛簡錛夊拰搴撲腑鐩稿簲鏂囦歡鐨勫尯鍒?br> cvs diff file_name
    cvs鐨剋eb鐣岄潰鎻愪緵浜嗘洿鏂逛究鐨勫畾浣嶆枃浠朵慨鏀瑰拰姣旇緝鐗堟湰鍖哄埆鐨勬柟娉曪紝鍏蜂綋瀹夎璁劇疆璇風湅鍚庨潰鐨刢vsweb浣跨敤

    姝g‘鐨勯氳繃CVS鎭㈠鏃х増鏈殑鏂規硶錛?br> 濡傛灉鐢?b style="color: black; background-color: rgb(255, 255, 102);">cvs update -r1.2 file.name
    榪欎釜鍛戒護鏄粰file.name鍔犱竴涓猄TICK TAG錛?"1.2" 錛岃櫧鐒朵綘鐨勬湰鎰忓彧鏄兂灝嗗畠鎭㈠鍒?.2鐗堟湰
    姝g‘鐨勬仮澶嶇増鏈殑鏂規硶鏄細cvs update -p -r1.2 file_name >file_name
    濡傛灉涓嶅皬蹇冨凡緇忓姞鎴怱TICK TAG鐨勮瘽錛氱敤cvs update -A 瑙e喅

    縐誨姩鏂囦歡錛氭枃浠墮噸鍛藉悕
    cvs閲屾病鏈?b style="color: black; background-color: rgb(255, 255, 102);">cvs move鎴?b style="color: black; background-color: rgb(255, 255, 102);">cvs rename錛屽洜涓鴻繖涓や釜鎿嶄綔鏄厛cvs remove old_file_name錛岀劧鍚?b style="color: black; background-color: rgb(255, 255, 102);">cvs add new_file_name瀹炵幇鐨勩?/p>

    鍒犻櫎錛岀Щ鍔ㄧ洰褰曪細
    鏈鏂逛究鐨勬柟娉曟槸璁╃鐞嗗憳鐩存帴縐誨姩錛屽垹闄VSROOT閲岀浉搴旂洰褰曪紙鍥犱負CVS涓涓」鐩笅鐨勫瓙鐩綍閮芥槸鐙珛鐨勶紝縐誨姩鍒?CVSROOT鐩綍涓嬮兘鍙互浣滀負鏂扮殑鐙珛欏圭洰錛氬ソ姣斾竴棰楁爲錛屽叾瀹炵爫涓嬩換鎰忎竴鏋濋兘鑳界嫭绔嬪瓨媧伙級錛屽鐩綍榪涜浜嗕慨鏀瑰悗錛岃姹傚叾寮鍙戜漢鍛橀噸鏂板鍑洪」鐩?b style="color: black; background-color: rgb(255, 255, 102);">cvs checkout project_name 鎴栬呯敤cvs update -dP鍚屾銆?/p>

    CVS Branch錛氶」鐩鍒嗘敮鍚屾寮鍙?br> =============================

    紜鐗堟湰閲岀▼紕戯細澶氫釜鏂囦歡鍚勮嚜鐗堟湰鍙蜂笉涓鏍鳳紝欏圭洰鍒頒竴瀹氶樁孌碉紝鍙互緇欐墍鏈夋枃浠剁粺涓鎸囧畾涓涓樁孌甸噷紼嬬鐗堟湰鍙鳳紝鏂逛究浠ュ悗鎸夌収榪欎釜闃舵閲岀▼紕戠増鏈彿瀵煎嚭欏圭洰錛屽悓鏃朵篃鏄」鐩殑澶氫釜鍒嗘敮寮鍙戠殑鍩虹銆?br> cvs tag release_1_0

    寮濮嬩竴涓柊鐨勯噷紼嬬錛?br> cvs commit -r 2 鏍囪鎵鏈夋枃浠跺紑濮嬭繘鍏?.x鐨勫紑鍙?/p>

    娉ㄦ剰錛?b style="color: black; background-color: rgb(255, 255, 102);">CVS閲岀殑revsion鍜岃蔣浠跺寘鐨勫彂甯冪増鏈彲浠ユ病鏈夌洿鎺ョ殑鍏崇郴銆備絾鎵鏈夋枃浠朵嬌鐢ㄥ拰鍙戝竷鐗堟湰涓鑷寸殑鐗堟湰鍙鋒瘮杈冩湁鍔╀簬緇存姢銆?/i>

    鍦ㄥ紑鍙戦」鐩殑2.x鐗堟湰鐨勬椂鍊欏彂鐜?.x鏈夐棶棰橈紝浣?.x鍙堜笉鏁㈢敤錛屽垯浠庡厛鍓嶆爣璁扮殑閲岀▼紕戯細release_1_0瀵煎嚭涓涓垎鏀痳elease_1_0_patch
    cvs rtag -b -r release_1_0 release_1_0_patch proj_dir

    涓浜涗漢鍏堝湪鍙﹀涓涓洰褰曚笅瀵煎嚭release_1_0_patch榪欎釜鍒嗘敮錛氳В鍐?.0涓殑绱фラ棶棰橈紝
    cvs checkout -r release_1_0_patch
    鑰屽叾浠栦漢鍛樹粛鏃у湪欏圭洰鐨勪富騫插垎鏀?.x涓婂紑鍙?/p>

    鍦╮elease_1_0_patch涓婁慨姝i敊璇悗錛屾爣璁頒竴涓?.0鐨勯敊璇慨姝g増鏈彿
    cvs tag release_1_0_patch_1

    濡傛灉2.0璁や負榪欎簺閿欒淇敼鍦?.0閲屼篃闇瑕侊紝涔熷彲浠ュ湪2.0鐨勫紑鍙戠洰褰曚笅鍚堝茍release_1_0_patch_1涓殑淇敼鍒板綋鍓嶄唬鐮佷腑錛?br> cvs update -j release_1_0_patch_1

    CVS鐨勮繙紼嬭璇侊細閫氳繃SSH榪滅▼璁塊棶CVS
    ================================

    浣跨敤cvs鏈韓鐨勮繙紼嬭璇佸緢楹葷儲,闇瑕佸畾涔夋湇鍔″櫒鍜岀敤鎴風粍錛岀敤鎴峰悕錛岃緗瘑鐮佺瓑錛岃屼笖涓嶅畨鍏紝鍥犳鍜岀郴緇熸湰鍦板笎鍙瘋璇佸茍閫氳繃SSH浼犺緭鏄瘮杈冨ソ鐨勫姙娉曪紝閫氳繃鍦ㄥ鎴鋒満鐨?etc/profile閲岃緗竴涓嬪唴瀹癸細
    CVSROOT=:ext:$USER@test.server.address#port:/path/to/cvsroot CVS_RSH=ssh; export CVSROOT CVS_RSH
    鎵鏈夊鎴鋒満鎵鏈夋湰鍦扮敤鎴烽兘鍙互鏄犲皠鍒?b style="color: black; background-color: rgb(255, 255, 102);">CVS鏈嶅姟鍣ㄧ浉搴斿悓鍚嶅笎鍙蜂簡銆?br>
    濡傛灉CVS鎵鍦ㄦ湇鍔″櫒鐨凷SH绔彛涓嶅湪緙虹渷鐨?2錛屾垨鑰呭拰瀹㈡埛绔笌CVS鏈嶅姟鍣ㄧSSH緙虹渷绔彛涓嶄竴鑷達紝鏈夋椂鍊欒緗簡錛?br> :ext:$USER@test.server.address#port:/path/to/cvsroot 

    浠嶇劧涓嶈錛屾瘮濡傛湁浠ヤ笅閿欒淇℃伅錛?br> ssh: test.server.address#port: Name or service not known
    cvs [checkout aborted]: end of file from server (consult above messages if any)

    瑙e喅鐨勬柟娉曟槸鍋氫竴涓剼鏈寚瀹氱鍙h漿鍚戯紙涓嶈兘浣跨敤alias錛屼細鍑烘壘涓嶅埌鏂囦歡閿欒錛夛細
    鍒涘緩涓涓?usr/bin/ssh_cvs鏂囦歡錛?br> #!/usr/bin/sh
    /path/to/ssh -p 34567 "$@"
    鐒跺悗錛歝hmod +x /usr/bin/ssh_cvs
    騫禖VS_RSH=ssh_cvs; export CVS_RSH

    娉ㄦ剰錛歱ort鏄寚鐩稿簲鏈嶅姟鍣⊿SH鐨勭鍙o紝涓嶆槸cvs pserver鐨勭鍙?br>
    CVSWEB錛氭彁楂樼▼搴忓憳姣旇緝鏂囦歡淇敼鏁堢巼
    ================================

    CVSWEB灝辨槸CVS鐨刉EB鐣岄潰錛屽彲浠ュぇ澶ф彁楂樼▼搴忓憳瀹氫綅淇敼鐨勬晥鐜?
    浣跨敤鐨勬牱渚嬪彲浠ョ湅錛?a >http://www.freebsd.org/cgi/cvsweb.cgi

    CVSWEB鐨勪笅杞斤細CVSWEB浠庢渶鍒濈殑鐗堟湰宸茬粡婕斿寲鍑哄緢澶氬姛鑳界晫闈㈡洿涓板瘜鐨勭増鏈紝榪欎釜鏄釜浜烘劅瑙夎寰楀畨瑁呰緗瘮杈冩柟渚跨殑錛?br> http://www.spaghetti-code.de/software/linux/cvsweb/

    涓嬭澆瑙e寘錛?br> tar zxf cvsweb.tgz
    鎶婇厤緗枃浠禼vsweb.conf鏀懼埌瀹夊叏鐨勫湴鏂癸紙姣斿鍜宎pache鐨勯厤緗斁鍦ㄥ悓涓涓洰褰曚笅錛夛紝
    淇敼錛歝vsweb.cgi璁〤GI鎵懼埌閰嶇疆鏂囦歡錛?br> $config = $ENV{'CVSWEB_CONFIG'} || '/path/to/apache/conf/cvsweb.conf';

    杞埌/path/to/apache/conf涓嬪茍淇敼cvsweb.conf錛?/p>

    1. 淇敼CVSROOT璺緞璁劇疆錛?br> %CVSROOT = (
      'Development' => '/path/to/cvsroot', #<==淇敼鎸囧悜鏈湴鐨凜VSROOT
      );
    2. 緙虹渷涓嶆樉紺哄凡緇忓垹闄ょ殑鏂囨。錛?br> "hideattic" => "1",#<==緙虹渷涓嶆樉紺哄凡緇忓垹闄ょ殑鏂囨。
    3. 鍦ㄩ厤緗枃浠禼vsweb.conf涓繕鍙互瀹氬埗欏靛ご鐨勬弿榪頒俊鎭紝浣犲彲浠ヤ慨鏀?long_intro鎴愪綘闇瑕佺殑鏂囧瓧

    CVSWEB鍙笉鑳介殢渚垮紑鏀劇粰鎵鏈夌敤鎴鳳紝鍥犳闇瑕佷嬌鐢╓EB鐢ㄦ埛璁よ瘉錛?br> 鍏堢敓鎴?passwd:
    /path/to/apache/bin/htpasswd -c cvsweb.passwd user

    淇敼httpd.conf: 澧炲姞
    <Directory "/path/to/apache/cgi-bin/cvsweb/">
    AuthName "CVS Authorization"
    AuthType Basic
    AuthUserFile /path/to/cvsweb.passwd
    require valid-user
    </Directory>

    CVS TAGS: who? when?
    ====================

    灝?Id$ 鍔犲湪紼嬪簭鏂囦歡寮澶寸殑娉ㄩ噴閲屾槸涓涓緢濂界殑涔犳儻錛?b style="color: black; background-color: rgb(255, 255, 102);">cvs鑳藉鑷姩瑙i噴鏇存柊鍏朵腑鐨勫唴瀹規垚錛歠ile_name version time user_name 鐨勬牸寮忥紝姣斿錛歝vs_card.txt,v 1.1 2002/04/05 04:24:12 chedong Exp錛屽彲浠ヨ繖浜涗俊鎭簡瑙f枃浠剁殑鏈鍚庝慨鏀逛漢鍜屼慨鏀規椂闂?br>
    鍑犱釜甯哥敤鐨勭己鐪佹枃浠訛細
    default.php
    <?php
    /*
    * Copyright (c) 2002 Company Name.
    * $Header$
    */

    ?>

    ====================================
    Default.java: 娉ㄦ剰鏂囦歡澶翠竴鑸敞閲婄敤 /* 寮濮?JAVADOC娉ㄩ噴鐢?/** 寮濮嬬殑鍖哄埆
    /*
    * Copyright (c) 2002 Company Name.
    * $Header$
    */

    package com.netease;

    import java.io;

    /**
    * comments here
    */
    public class Default {
        /**
        *
        * @param
        * @return
        */
        public toString() {

        }
    }

    ====================================
    default.pl:
    #!/usr/bin/perl -w
    # Copyright (c) 2002 Company Name.
    # $Header$

    # file comments here

    use strict;

    CVS vs VSS
    ===========

    CVS娌℃湁鏂囦歡閿佸畾妯″紡錛孷SS鍦╟heck out鍚屾椂錛屽悓鏃惰褰曚簡鏂囦歡琚鍑鴻呴攣瀹氥?

    CVS鏄痷pdate commit錛?VSS鏄痗heck out check in

    鍦?b style="color: black; background-color: rgb(255, 255, 102);">CVS涓紝鏍囪鑷姩鏇存柊鍔熻兘緙虹渷鏄墦寮鐨勶紝榪欐牱涔熷甫鏉ヤ竴涓綔鍦ㄧ殑闂錛屽氨鏄笉鐢?kb鏂瑰紡娣誨姞binary鏂囦歡鐨勮瘽鍦?b style="color: black; background-color: rgb(255, 255, 102);">cvs鑷姩鏇存柊鏃跺彲鑳戒細瀵艱嚧鏂囦歡澶辨晥銆?

    Virsual SourceSafe涓繖涓姛鑳界О涔嬩負Keyword Explaination錛岀己鐪佹槸鍏抽棴鐨勶紝闇瑕侀氳繃OPITION鎵撳紑錛屽茍鎸囧畾闇瑕佽繘琛屾簮鏂囦歡鍏抽敭璇嶆壂鎻忕殑綾誨瀷錛?.txt,*.java,*.html...

    瀵逛簬Virsual SourceSafe鍜?b style="color: black; background-color: rgb(255, 255, 102);">CVS閮介氱敤鐨凾AG鏈夛細
    $Header$
    $Author$
    $Date$
    $Revision$

    灝介噺浣跨敤閫氱敤鐨勫叧閿瘝淇濊瘉浠g爜鍦?b style="color: black; background-color: rgb(255, 255, 102);">CVS鍜孷SS閮借兘鏂逛究鐨勮窡韙?

    鐩稿叧璧勬簮錛?/p>

    CVS HOME錛?br> http://www.cvshome.org

    CVS FAQ錛?br> http://www.loria.fr/~molli/cvs-index.html

    鐩稿叧緗戠珯:
    http://directory.google.com/Top/Computers/Software/Configuration_Management/Tools/Concurrent_Versions_System/

    CVS 鍏嶈垂涔?
    http://cvsbook.red-bean.com/

    CVS 鍛戒護鐨勯熸煡鍗$墖錛?br> http://www.refcards.com/about/cvs.html


    鎽樿嚜錛?a target="_blank">http://www.chedong.com/tech/cvs_card.html



    pyguru 2005-02-15 23:39 鍙戣〃璇勮
    ]]>
    WEB/APPLICATION/DATABASE鏈嶅姟鍣ㄧ‖浠禗B閰嶇疆http://m.tkk7.com/pyguru/archive/2005/02/15/1194.htmlpygurupyguruMon, 14 Feb 2005 18:09:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/15/1194.htmlhttp://m.tkk7.com/pyguru/comments/1194.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/15/1194.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1194.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1194.html:  鎯蟲悶涓涓猈EB/APPLICATION/DATABASE鏈嶅姟鍣ㄣ傚噯澶囩敤LINUX銆傞璁$敤鎴烽噺澶ф鏈?000涓?nbsp;
    鍚?nbsp;
    :  鏃跺湪綰垮惂(CONCURRENT TRANSACTION鑳藉埌200灝辮)銆傛垜鍙敤榪嘡EDHAT LINUX鍋氫竴鑸紑鍙?nbsp;
    鐢?nbsp;
    :  鐨勫鉤鍙幫紝娌℃湁鐢ㄥ畠褰撹繃澶х敤鎴烽噺鐨勬湇鍔″櫒銆傛満鍣ㄥ噯澶囪嚜宸辮錛? PROCESSOR 
    :  2.8GXEON錛?G-4G鐨凪EMORY錛?20G - 300G鐨勭‖鐩?SATA鎴栬匰CSI)錛岄棶棰樻槸錛?nbsp;
    :  1銆佽繖涓‖浠墮厤緗涓嶈錛?nbsp;
    :  2銆佺敤浠涔圠INUX濂斤紵REDHAT銆丗REEBSD銆丼USE銆佸叾瀹冪殑錛?nbsp;
    :  
    3銆佺敤浠涔圖B濂斤紝PREGRESQL榪樻槸MYSQL錛烳YSQL鐜板湪涔熸敮鎸乀RANSACTION浜嗭紝浣哖OSTGRESQL 
    :  濂借薄榪樻湁寰堝璺烵RACLE寰堟帴榪戠殑鍔熻兘錛屼絾浠庢潵娌$敤榪囪繖涓狣B銆?nbsp;
    :  4銆丄PPLICATION SERVER鍑嗗鐢═OMCAT5.0 + JDK1.5錛屼互鍓嶇煡閬揟OMCAT涓嶈兘鏀寔澶х敤鎴?nbsp;
    閲?nbsp;
    :  錛屼笉鐭ラ亾鐜板湪榪樻槸涓嶆槸銆?nbsp;
    :  5銆佽繕鏈変粈涔堝緩璁紵 
    :   
    :  澶氳阿銆?nbsp;
    :   
     
    涓昏鍙栧喅浜庤繖浜泃ransaction鐨勫鏉傜▼搴?涓鑸潵璇村簲璇ヨ繕鍙互.浣嗗鏋滄湁寰堝 
    varchar,blob涔嬬被鐨勬暟鎹紝灝辨瘮杈冪巹銆?nbsp;
     
    鑷充簬OS錛屾帹鑽愬晢涓歀inux錛屾垜浠敤RHAS姣旇緝澶氥係uSE涔熶笉閿欍傝冭檻鍒拌鐢?nbsp;
    Java絳夛紝涓嶈鐢‵reeBSD銆傚晢涓歀inux鐨勫ソ澶勬槸浣犱笉鐢ㄥお璐瑰績鍘誨叧蹇冭蔣浠跺崌綰у拰緇存姢銆?nbsp;
     
    DB涔嬬被錛岃兘鐢ㄥ晢涓歄racle鎴朌B2錛屾ц兘瑕佸ソ寰楀銆備絾濡傛灉鐪侀挶錛屽緩璁繕鏄?nbsp;
    MySQL錛屼絾瑕佸ソ濂絫une錛屽茍涓斿湪Business Logic璁捐鏄紝灝介噺鍑忓皯鍜孌B涔嬮棿 
    鐨勪氦浜掋侻ySQL鐨勭己鐐硅繕鏈夛紝涓嶆敮鎸丼tore Procedure銆備絾浣犲彲鎶婇偅浜汢usiness 
    Logic鏀懼埌鏁版嵁搴撳銆?nbsp;
     
    Application Server鍙兘鏄渶澶х殑闂銆俆omcat鍩烘湰涓婃槸涓交鍨嬬殑Web/Servlet 
    Server, 澶х敤鎴烽噺,鐢變簬緙轟箯涓浜涙敮鎸?浼氭瘮杈冨洶闅?鍙﹀,浣犳湁澶ч噺Transactions, 
    Tomcat鏈韓娌℃湁Persistent鐨勬敮鎸侊紝浣犲鏋滄兂鍦ㄨ繖涓灞備笂瀹炵幇transaction錛?nbsp;
    鎭愭曞緱瑁呭叾浠朿ontainer錛屽EJB錛屾垨鑰匟ibernate涔嬬被銆傚湪榪欎竴灞備笂cache鐨勬暟鎹?nbsp;
    瓚婂錛屽MySQL鐨勪互鏉ュ氨瓚婂皯銆傛湁浜涢噺涓嶅ぇ鐨勭郴緇熸暟鎹紝鍙互閫氳繃涓浜涙妧宸?nbsp;
    浜嬪厛load鍒拌繖涓灞傦紝閭d箞鍜屾暟鎹簱鐨勪氦浜掑氨灝忓緱澶氥?nbsp;
     
    J2SE 5.0鎹鎬ц兘鏈夋彁楂橈紝浣嗘垜浠ヤ負鐢ㄥ畠澶啋榪涖備笉澶烻table銆傚鏋滄病鏈塼ransaction錛?nbsp;
    鍊掍笉鏄棶棰樸傚彟澶栵紝鍙湁Tomcat 5.5浠ュ悗鐨勭増鏈墠鑳借繍琛屽湪J2SE 5.0涓娿?nbsp;
    鍋氭湇鍔″櫒錛孊EA鐨凧Rockit VM涓嶉敊銆?

    濡傛灉鏄櫘閫氱殑鏈嶅姟錛屽悓鏃跺湪綰夸漢鏁版渶澶氫篃灝變竴涓ょ櫨涓漢錛岄厤緗◢寰ソ涓鐐圭殑pc灝辮兘琛屻?nbsp;
    浜烘暟濡傛灉澶氾紝鏈鍏抽敭鏄唴瀛樹竴瀹氳澶э紝瓚婂ぇ瓚婂ソ銆?br>

    pyguru 2005-02-15 02:09 鍙戣〃璇勮
    ]]>
    Virtual hosts in Apachehttp://m.tkk7.com/pyguru/archive/2005/02/14/1157.htmlpygurupyguruSun, 13 Feb 2005 18:56:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/14/1157.htmlhttp://m.tkk7.com/pyguru/comments/1157.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/14/1157.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1157.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1157.html Virtual hosts in Apache in Vhosts.conf, the following is the real setting. The docroot may not allow index, so you need to put index.html to test the virtual host

    ===============================================

    # Listen for virtual host requests on all IP addresses
    NameVirtualHost *:80


    DocumentRoot /var/www/html/web
    ServerName web.mydomain.com

    # Other directives here

    DocumentRoot /var/www/html/news
    ServerName news.mydomain.com

    # Other directives here


    DocumentRoot /var/www/html/photo
    ServerName photo.mydomain.com

    # Other directives here


    pyguru 2005-02-14 02:56 鍙戣〃璇勮
    ]]>
    map linux network drive in Windowshttp://m.tkk7.com/pyguru/archive/2005/02/14/1156.htmlpygurupyguruSun, 13 Feb 2005 18:41:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/14/1156.htmlhttp://m.tkk7.com/pyguru/comments/1156.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/14/1156.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1156.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1156.html棣栧厛鍒涘緩涓涓湰鍦癠nix璐﹀彿錛?


    銆銆useradd -r myaccount

    銆銆榪欐潯鍛戒護鍒涘緩浜嗕竴涓悕涓簃yaccount鐨勬櫘閫歎nix鐢ㄦ埛銆?

    銆銆鐒跺悗鏍規嵁瀹冨垱寤轟竴涓猄amba鐢ㄦ埛錛?


    銆銆smbadduser myaccount:mysmbact

    銆銆鎴栬呮槸錛?


    銆銆smbpasswd -a myaccount

    The password in Samba is not related to the unix account password.

    娉ㄦ剰錛氫竴鏃︿綘鏇存柊浜?b style="color: black; background-color: rgb(255, 255, 102);">samba閰嶇疆鏂囦歡錛屼綘蹇呴』瑕侀氳繃浣跨敤/etc/init.d/samba restart (debian)鏉ラ噸璧蜂綘鐨?b style="color: black; background-color: rgb(255, 255, 102);">samba

    Then in windows, use the username and samba's password to map network drive.

    pyguru 2005-02-14 02:41 鍙戣〃璇勮
    ]]>
    The Apache Web Serverhttp://m.tkk7.com/pyguru/archive/2005/02/14/1155.htmlpygurupyguruSun, 13 Feb 2005 18:35:00 GMThttp://m.tkk7.com/pyguru/archive/2005/02/14/1155.htmlhttp://m.tkk7.com/pyguru/comments/1155.htmlhttp://m.tkk7.com/pyguru/archive/2005/02/14/1155.html#Feedback0http://m.tkk7.com/pyguru/comments/commentRss/1155.htmlhttp://m.tkk7.com/pyguru/services/trackbacks/1155.html闃呰鍏ㄦ枃

    pyguru 2005-02-14 02:35 鍙戣〃璇勮
    ]]>
    主站蜘蛛池模板: 久久久久久久久久国产精品免费| 亚洲人成中文字幕在线观看| 99久久免费精品高清特色大片| 看免费毛片天天看| 亚洲人成日本在线观看| 亚洲VA中文字幕不卡无码| 亚洲第一福利网站在线观看| 最新中文字幕电影免费观看| 在线观看的免费网站无遮挡| 成av免费大片黄在线观看| 无人视频免费观看免费视频| 亚洲人成网站免费播放| 亚洲成电影在线观看青青| 亚洲天天在线日亚洲洲精| 亚洲国产精品无码久久久不卡| 亚洲精品无码AV中文字幕电影网站| 四虎永久在线免费观看| 色窝窝免费一区二区三区| 国产1000部成人免费视频| 免费视频成人片在线观看| 久久黄色免费网站| 日本亚洲欧洲免费天堂午夜看片女人员 | 亚洲成a人片在线观看日本麻豆| 精品久久免费视频| 在线免费观看a级片| 成人午夜视频免费| 精品国产麻豆免费网站| 日本一区免费电影| 国产视频精品免费| 免费观看亚洲人成网站| 免费无码一区二区三区蜜桃大| 午夜老司机免费视频| 午夜毛片不卡高清免费| 永久免费无码网站在线观看| 国产高清免费观看| 亚洲av无码不卡私人影院| 亚洲人成国产精品无码| 亚洲国产另类久久久精品黑人 | 免费国产草莓视频在线观看黄| 国产亚洲福利一区二区免费看| 黄色网址免费在线|