- Mi lesz a Facebook fiókoddal, ha meghalsz?
- Minden fronton drágulást vár a DRAM-piacon a Trendforce
- Nem csak nagy, de gyors is az LG önerőből AI felskálázást biztosító monitora
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- TCL LCD és LED TV-k
- iPad topik
- Milyen egeret válasszak?
- Intel Core Ultra 3, Core Ultra 5, Ultra 7, Ultra 9 "Arrow Lake" LGA 1851
- 5.1, 7.1 és gamer fejhallgatók
- Milyen alaplapot vegyek?
Új hozzászólás Aktív témák
-
esteban
senior tag
nezd ezt meg ... valami olyasmi, csak hogy kell konfiguralni, feltelepiteni ?
--------------------------------------------------------------------------------------------
#!/usr/bin/perl -w
# rss2html - converts an RSS file to HTML
# It take one argument, either a file on the local system,
# or an HTTP URL like http://slashdot.org/slashdot.rdf
# by Jonathan Eisenzopf. v1.0 19990901
# Copyright (c) 1999 Jupitermedia Corp. All Rights Reserved.
# See http://www.webreference.com/perl for more information
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# INCLUDES
use strict;
use XML::RSS;
use LWP::Simple;
# Declare variables
my $content;
my $file;
# MAIN
# check for command-line argument
die ''Usage: rss2html.pl (<RSS file> | <URL>)\n'' unless @ARGV == 1;
# get the command-line argument
my $arg = shift;
# create new instance of XML::RSS
my $rss = new XML::RSS;
# argument is a URL
if ($arg=~ /http:/i) {
$content = get($arg);
die ''Could not retrieve $arg'' unless $content;
# parse the RSS content
$rss->parse($content);
# argument is a file
} else {
$file = $arg;
die ''File \''$file\'' does't exist.\n'' unless -e $file;
# parse the RSS file
$rss->parsefile($file);
}
# print the HTML channel
&print_html($rss);
# SUBROUTINES
sub print_html {
my $rss = shift;
print <<HTML;
<table bgcolor=''#000000'' border=''0'' width=''200''><tr><td>
<TABLE CELLSPACING=''1'' CELLPADDING=''4'' BGCOLOR=''#FFFFFF'' BORDER=0 width=''100%''>
<tr>
<td valign=''middle'' align=''center'' bgcolor=''#EEEEEE''><font color=''#000000'' face=''Arial,Helvetica''><B><a href=''$rss->{'channel'}->{'link'}''>$rss->{'channel'}->{'title'}</a></B></font></td></tr>
<tr><td>
HTML
# print channel image
if ($rss->{'image'}->{'link'}) {
print <<HTML;
<center>
<p><a href=''$rss->{'image'}->{'link'}''><img src=''$rss->{'image'}->{'url'}'' alt=''$rss->{'image'}->{'title'}'' border=''0''
HTML
print '' width=\''$rss->{'image'}->{'width'}\''''
if $rss->{'image'}->{'width'};
print '' height=\''$rss->{'image'}->{'height'}\''''
if $rss->{'image'}->{'height'};
print ''></a></center><p>\n'';
}
# print the channel items
foreach my $item (@{$rss->{'items'}}) {
next unless defined($item->{'title'}) && defined($item->{'link'});
print ''<li><a href=\''$item->{'link'}\''>$item->{'title'}</a><BR>\n'';
}
# if there's a textinput element
if ($rss->{'textinput'}->{'title'}) {
print <<HTML;
<form method=''get'' action=''$rss->{'textinput'}->{'link'}''>
$rss->{'textinput'}->{'description'}<BR>
<input type=''text'' name=''$rss->{'textinput'}->{'name'}''><BR>
<input type=''submit'' value=''$rss->{'textinput'}->{'title'}''>
</form>
HTML
}
# if there's a copyright element
if ($rss->{'channel'}->{'copyright'}) {
print <<HTML;
<p><sub>$rss->{'channel'}->{'copyright'}</sub></p>
HTML
}
print <<HTML;
</td>
</TR>
</TABLE>
</td></tr></table>
HTML
}
--------------------------------------------------------------------------------------------
http://www.webreference.com/perl/tutorial/8/index.html
Új hozzászólás Aktív témák
- Bemutatkozott a OnePlus Nord 6
- Mi lesz a Facebook fiókoddal, ha meghalsz?
- Minden fronton drágulást vár a DRAM-piacon a Trendforce
- Nem csak nagy, de gyors is az LG önerőből AI felskálázást biztosító monitora
- Építő/felújító topik
- Meggyi001: Áram nélkül....méltóság nélkül.....
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- Synology NAS
- Hobby rádiós topik
- Forza sorozat (Horizon/Motorsport)
- További aktív témák...
- Kaspersky, BitDefender, Avast és egyéb vírusírtó licencek a legolcsóbban, egyenesen a gyártóktól!
- Microsoft Office 2024 Home Business dobozos
- Windows, Office licencek kedvező áron, egyenesen a Microsoft-tól - Automata kézbesítés utalással is!
- Windows 10/11 Home/Pro , Office 2024 kulcsok
- Játékkulcsok ! : PC Steam, EA App, Ubisoft, Windows és egyéb játékok
- Számlás!Windows 10 Pro 11 Pro,Windows 10 Home 11 Home, Office 2016,2019,2021 ,Vírusirtok,Mac
- LG 34GS95UE - 34" Ívelt OLED / QHD 2K / 240Hz & 0.03ms / 1300 Nits / NVIDIA G-Sync / AMD FreeSync
- 0perces DDR5 5600 vadiúj 2x16GB memória 1 év garancia
- ASUS TUF A14 Gaming Notebook! Ryzen AI HX 370 / RTX 4050 / 16GB DDR5 / 1TB NVMe! BeszámítOK!
- Magyar, Aktiválatlan! Apple MacBook Pro 14! M3, 8GB, 500GB! BeszámítOK
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

