AminetAminet
Search:
84479 packages online
About
Recent
Browse
Search
Upload
Setup
Services

comm/www/rss2html-mos.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:RSS to HTML converter.
Author:mercadal at khons.diablonet.net, Morphos port by Fabrizio "Lanch" Bartoloni
Uploader:lanch tiscali it (Fabrizio Bartoloni)
Type:comm/www
Version:0.2.3
Architecture:ppc-morphos
Date:2005-08-31
Download:http://aminet.net/comm/www/rss2html-mos.lha - View contents
Readme:http://aminet.net/comm/www/rss2html-mos.readme
Downloads:1153

Welcome to rss2html version 0.2.3  (Stand and Deliver)



If you're unfamiliar with what's going on, here's the explanation:

Many weblogs and websites auto-generate RDF files, in a format called RSS,
which are a meta file which explain HTML documents.  It's a really nifty 
way for sites to transfer links and such to each other.  However, 
if you want to use the RSS style RDF files and don't want to install 
all kinds of libraries, modules, or the like, it's impossible to 
easily parse these things.

rss2html comes in here by replacing the tags in the file with 
HTML, so you can go ahead and paste it into your website or use 
some script or whatnot to do that all for you.  As it comes, it understands 
the most basic RSS tags, such as <description>, <title>, <link> and the like, 
and also their corresponding closing tags.  It works well for rss versions 
pre-1.0 (like the common 0.91).

Still confused?  There's an example at 
http://www.diablonet.net/~mercadal/common/derpsite.php, the output of 
which you can most definitely put on your website.



How Do I Start:

On most every unix:  make all

That will leave an executable named rss2html in the distribution's 
directory.  Copy that to /usr/local/bin or wherever you want it to 
be.  If you get errors, you may need to change the name of your 
compiler in the makefile (probably either gcc or cc)

Now that you've got it installed and you want to parse that darned 
RSS file that you're friend's got on his site, all you need to do 
is download the file and type (for example)

wget http://www.diablonet.net/~mercadal/common/derpsite.php -O - | rss2html >
output.html

which would leave you with a snippet of HTML in the output file there.
Maybe I can incorporate part of libcurl or the like in an upcoming 
distribution so rss2html would yank the RDF file off the web for you, 
process, and output it.

If all you wanted was a basic HTML snippet from an RDF file, you can 
stop reading here.



Are there any other options?

Sure, the options you can set for rss2html include:
-i   Specify the name of an input file (instead of the standard input)
-o   Specify the name of an output file (instead of the standard output)
-q   Run quiet (don't print unknown tags to the standard error)
-u   Specify the name of a user-defined tags file (see next section)



User-defined Actions for RDF Tags:

If, for some reason, you don't like the HTML that rss2html puts out 
for a tag, you can set an alternate tag file for your own use (by using 
the -u option)  For example, say every time an RSS <item> tag shows up you 
want rss2html to display an asterisk in the output file rather than 
the default nothing.  Well, then, you could make a new file with the line

item*

in it, and feed that into rss2html.  Voila, instant asterisks!  Notice, 
the RSS tag has no little greater-than and less-than signs around it, 
whereas if you want to replace an RSS tag with an HTML element 
it must be exactly as you want it in the output file, such as:

item<strong>
/item</strong>

You can replace any input tag you like.

If you, like me, often times dislike the descriptions that people put 
along in an rss file (they're often times long and pointless), you 
could do something like this:

descritiption
/description

This will tell rss2html not to print out the information included between 
these two tags.  Some built-in rss tags, such as <language>, <docs>, 
and <guid> are automatically never put in the HTML output.  You can, 
of course, change this behavior by defining them in your own user-defined 
file.

You should probably see the included myuser-defined file, which is a 
pretty lousy example of all you can do with rss2html's user defined 
capabilities.

Other than all the tags whose actions you can define (or re-define), you 
can also define two things which you'd never find in any RSS file, these 
are *RDFSTART* and *RDFEND*, which will let you throw whatever HTML you 
want at the beginning and at the end.  So, say you wanted to make 
everything some ugly font within the output file, you could add this 
to your user-defined file:

*RDFSTART*<font face="Chicago,Chitown,Impact">
*RDFEND*</font>

As always, though, if you like the plain stuff that rss2html
usually puts out (and have no desire to learn anything about RDF or 
it's RSS subpart), you don't even have to worry about this feature.



Why Did You Choose  as a Separator?

Because I wanted something that most likely wouldn't show up in any 
HTML tags anyone wants to embed.  If, for some reason, this actually 
does exist within some HTML (or RSS) tag, well, get in touch with 
me and I'll find a more obscure separation symbol.



It's Doesn't Work.

Well, if it simply doesn't work on a given RSS file because the tags 
therein are not defined, feel free to re-define them yourself.  However...

If you get Segmentation Faults, Bus Errors, Illegal Instructions, 
gcc: unable to parse errors, kernel panics, an itching, burning sensation, 
or some other task at which rss2html is failing, feel free 
to e-mail me at mercadal at khons.diablonet.net  Please, if you can, 
paste the error into the mail program, and tell me what system you're running 
it on, as well as anything else you think might help me (a backtrace would
be appreciated).



What Can I Expect in the Next Major Revisions?

Probably a lot better RSS 1.0 specification support, now that I've found 
something approaching a white paper on this.  Hitherto, I was just testing 
it against whatever RDF output I could snag from friends, so make sure 
to keep you eye out for the latest version.

Perhaps further support for running rss2html as a cgi binary.  And, 
further, perhaps the ability to have rss2html run as a daemon which 
will snag a new rdf file from a given address, compare it against the older 
version, and update if necessary.



Changelog (since 0.1):
Revision 0.2.3 (14 March 2004)
	* Made output ordering correct in cases where description 
	  tag may have come before link tag (patches thanks to 
	  Lyle Hanson)
Revision 0.2.2 (19 February 2004)
	* Added ability for users to blank out information 
	  within a given tag (e.g. removing descriptions)
	* Internally, handling user-defined tags in a reasonable 
	  way now
Revision 0.2.1 (9 December 2003)
	* Second revision today [two in one day, wow]
	  Offers greater support for a wider variety of 
	  tags, and some minor internal cleanups
	* This release may make your output files look 
	  slightly different than previous versions.  
	  Create a user-defined preference to change the 
	  output should the new formatting be bothersome to you.
Revision 0.2.0 (9 December 2003)
	* Noticed how poor my spelling was in much of this 
	  README and actually bothered to edit mistakes
	* Fixed a possible inconsistency within parser
	* Fixed user-defined tags parsing support; 
	  previous versions could have improperly handled 
	  user-defined tags, or not have initialized the 
	  file at all
	* Added -q flag to make rss2html run without errors
	  (unless command line is improperly specified)
	* Attempted to more closely adhere to style(9) guidelines
Revision 0.1.4 (20 July 2003)
	* Fixed another segfault which only manifested 
	  itself in FreeBSD
Revision 0.1.3 (19 July 2003)
	* Removed segfaults/incorrect results on BSD 
	  when standard input read on a pipe
Revision 0.1.2 (1 July 2003)
	* Smarter malloc usage
	* Looking out for segfaults
	* Read/write to standard input or standard output
	  if no files are specified as options
Revision 0.1.1 (16 February 2002)
	* Optimized file reading in BSD
	* More tag support



TO-DO:

	* Add the ability to take URLs on command line and automatically 
	  retrieve and parse the associated rss file.
	* Check for memory leaks
	* Make parsing of user defined file more robust.



What License Is rss2html Under?

It's a BSD style license.  I'm no lawyer, if you need to know more, though, 
read LICENSE for the official explanation of all your rights, my rights, and 
gosh knows what else.


Contents of comm/www/rss2html-mos.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  785    1504  52.2% -lh5- 345d Mar 15  2004 rss2html023/LICENSE
[generic]                  432     727  59.4% -lh5- 5a46 Feb 20  2004 rss2html023/myuser-defined
[generic]                 3685    8025  45.9% -lh5- 07a2 Mar 15  2004 rss2html023/README
[generic]                16836   50652  33.2% -lh5- 4221 Aug 30 14:17 rss2html023/rss2html
[generic]                 3805    8272  46.0% -lh5- 0a62 Aug 30 14:23 rss2html023/rss2html-mos.readme
[generic]                 1452    3156  46.0% -lh5- 31a6 Feb 25  2004 rss2html023/source/cmfgetln.c
[generic]                  204     313  65.2% -lh5- d2c7 Jul  1  2003 rss2html023/source/cmfgetln.h
[generic]                  272     687  39.6% -lh5- 4a40 Feb 25  2004 rss2html023/source/common.c
[generic]                  188     309  60.8% -lh5- dcc7 Jul 20  2003 rss2html023/source/common.h
[generic]                    0       0 ****** -lh0- 0000 Aug 30 14:17 rss2html023/source/depends
[generic]                  510    1614  31.6% -lh5- b6bd Feb 25  2004 rss2html023/source/imagehandler.c
[generic]                  160     280  57.1% -lh5- cd3b Dec  9  2003 rss2html023/source/imagehandler.h
[generic]                 1654    4824  34.3% -lh5- c367 Mar 15  2004 rss2html023/source/linktitlehandler.c
[generic]                  151     238  63.4% -lh5- c960 Dec  9  2003 rss2html023/source/linktitlehandler.h
[generic]                  791    2174  36.4% -lh5- 0f1e Feb 25  2004 rss2html023/source/main.c
[generic]                  446     825  54.1% -lh5- 46f7 Aug 30 14:17 rss2html023/source/Makefile
[generic]                 2306    7788  29.6% -lh5- 692c Feb 25  2004 rss2html023/source/parse.c
[generic]                  165     265  62.3% -lh5- 7a16 Dec  4  2003 rss2html023/source/parsefunctions.h
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        18 files   33842   91653  36.9%            Aug 31 01:19

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>