PLEASE READ THIS AND CONSIDER BEFORE USING gm-rss
Greymatter is now fairly old technology, it has been surpassed by many other blogging software packages. Before you install Greymatter and gm-rss it is worth considering either installing Wordpress, or converting to Wordpress if you already use Greymatter. A simple method of importing Greymatter blogs to Wordpress is provided with the Wordpress software. Wordpress automatically provides RSS and ATOM feeds. Is easy to use, is supported enthusiastically, and has lots of documentation.
After that if you still wish to use Greymatter and gm-rss please go ahead. Remember there is now no support provided for gm-rss by the writer.
Version (1.0.32) 4/6/04 (Change Your Image Version)
No change to the code, just changed the RDF image to an RSS one. The history behind my reason for shipping the RDF image is well.... lets just say I was wrong and you should change your image to the new RSS one.
Please read the gm-rss Version 1.0.3, 1.0.2 and 1.0.1 below.
Version (1.0.3) 22/10/04 (Labour Weekend Version)
Fixed bug.
- Would not run in Firefox 0.9. This may be true of some other browsers.
Please read the gm-rss Version 1.0.1 and 1.0.2 below.
Version 1.0.2 released 15 June 2004 (Happy Birthday David, Version)
Fixed two bugs.
- Multiple Posted by lines.
- Print of /body and /html on screen if run manually
Please read the gm-rss Version 1.0.1 below.
gm-rss Version 1.0.1 released 27 April 2004
gm-rss is a CGI program written in PERL that will allow you to create an RDF feed using RSS 1.0. It is issued under the GPL. This, in effect, allows you to syndicate your Greymatter site, so that people using tools such as Amphetadesk can read your site. It requires no modification to Greymatter, and is, thus, release independent. All that is needed is a change to your entry template. Full instructions are given in the README.
Version 1.0.0 of gm-rss was going to be the last release, but I have decided to release a version that does not produce as many messages. I decided to do this because, with help from Katie, you will now be able to run gm-rss automatically.
This means that, you will no longer have to remember to type in the command line to create your RSS feed. When you update your blog, the RSS feed will be updated as well.
There is a catch. You will need to modify Greymatter code. Instructions for this are available in the download for gm-rss, and on this page. You do not need to upgrade to this version, unless you want the reduced message output. You do not need to modify Greymatter to run gm-rss because, it will still produce the RSS feed in the old, tried, and tested manner.
I repeat that I will not be adding any function to this program, only fixing any bugs from now on.
This RSS feed generated by gm-rss has been put through the Feed Validator, and has been passed as valid.
Change Log.
Version (1.0.2) 15/6/04 (Happy Birthday David, Version)
- Fixed two bugs.
- Multiple Posted by lines.
- Print of /body and /html on screen if run manually
Version (1.0.1) 27/4/04 (The quiet one)
- Now only produces messages, except for the final built OK message, when requested.
Version (1.0.0) 30/1/04 (The first and last version)
- Changed the date to agree with ISO standards. Thus making the RSS feed valid.
Version (0.6.0) 22/6/03 (The why didn't I think of it first version)
- On a request from a user I have included the ability to include the name of the poster of an item, the date posted, and the time.
Version (0.5.1) 14/6/03 (The never release software on Friday 13th version)
- Fixed a bug that crept in with version 0.5.0. This was causing the links to
each entry to be built incorrectly eg:
http://www.example.com/archives/00000007.html
was being built as:
http://www.example.com/archives00000007.html
Version (0.5.0) 13/6/03
- Removed the XML directory. This was just not working out. You will need to check with your hosting service that the required modules are available. (See README)
- Fixed bug where the suffix for the entry files was fixed as .html The suffix is now obtained from the Greymatter configuration file.
Version (0.4.2) 8/6/03
- Ship all XML requirements in XML directory
- Include instructions on limiting the length of each item in the RSS feed.
- Amend instructions in the README
Version (0.4.1) 23/5/03
- Rebuild of the zip as several files were missing
- Expanded instructions in the README
Version (0.4.0) 19/5/03
- Fixed bug where multiple span tags not recognised.
- Code now removes extra span tags and div tags so they do not break the rss feed.
- Amended code to make more efficient
- Added more comments to ensure the code is understood
Notes on how it works.
gm-rss works by reading your gm-entrylist.cgi and finding the latest open entries. This is restricted to 15. It then reads the entries from the path you have specified in your Greymatter configuration for Local Entries/Archives Path, until all of the html files for the 15 entries are found. The RSS feed is then built from these entries, and stored in the same directory as your index.html/htm file.
Requirements.
gm-rss requires the following PERL modules
- XML::RSS
- XML::Parser
- CGI
- CGI::Carp
- POSIX
Here is an example of an email you can send to your hosting service to inquire if they are installed, and ask them to install them.
--------------------------------------------------------------------
Hello
I am installing a PERL script that requires the following modules:
XML::RSS
XML::Parser
CGI
CGI::Carp
POSIX
Please could you tell me if they are installed, and if they are not, please install them for me.
Thank you.
--------------------------------------------------------------------
Notes on upgrading from a previous release.
If you are upgrading from any previous release you need to:
- upload gm-rss.cgi and chmod gm-rss.cgi to 755.
Notes on installation.
- Change the line !/usr/bin/perl to where your version of Perl is kept.
- Note do not change anything below the line: ALTER NOTHING BELOW THIS LINE.
- Place gm-rss into the cgi library with your other Greymatter modules.
- chmod gm-rss to 755.
- This step left intentionally blank.
- Edit the gm-rssconfig.cfg file following the instructions provided in the file.
- Upload gm-rssconfig.cfg to the directory where your main index file is kept. This is the directory you have entered in the Greymatter configuration for "Local Log Path".
- Change the name of the example.rdf to the name you have used in the gm-rssconfig.cfg file for "dest_name".
- Upload the renamed example.rdf file to the directory where your main index file is kept. This is the directory you have entered in the Greymatter configuration for "Local Log Path", and the same one you uploaded to in step 6.
- Change your Entry Page-Related Templates so that the following:
<span class="rss:item">
is just before the first line of data you wish to appear in your RSS feed. This is usually the {{entrymainbody}} line. - Change your Entry Page-Related Templates so that the following:
</span>
is just after the last line of the data you wish to appear in your RSS feed. This is usually the {{entrymainbody}} line.
eg.
<h3>{{entrysubject}}</h3>
<span class="rss:item">
<p>
{{entrymainbody}}
</p>
</span> - Include the following code on your main page so that people know you have an
RSS feed.
<a href="http://www.example.com/example.rdf"><img src="http://www.example.com/images/rss.jpg" alt="RSS 1.0 FEED" title="RSS 1.0 FEED" border="0" vspace="3" hspace="3" width="36" height="14"></a><br>Powered by <a href="http://ebanana.orconhosting.net.nz/gm-rss.html" target="_blank">gm-rss</a>
example.com should be changed to your website address example.rdf should be changed to agree with the destination/outputfile (dest_name) file in gm-rssconfig.cfg. rss.jpg must be placed in your images folder/directory and the www.example.com/images/rss.jpg changed to reflect the location. - Rebuild your files and you are ready to run. Each time you wish to update your
feed just type the following into your web browser:
http://www.example.com/cgi-bin/gm-rss.cgi
changing example.com to your website and cgi-bin to the name of the library where gm-rss.cgi is kept.
You would normally do this after you have added an entry. [Note you need only type this command if you have not modified the Greymatter code. See below]
Limiting The Number Of Words In Each Item In The Feed
Note that if you wish to only include a specific number of words in the RDF feed that gm-rss produces it can be done.
Say that you only wanted the first 20 words of every item to be included in the gm-rss feed.
You would do this by changing the Entry Page-Related Templates template to read something like this:
<h3>{{entrysubject}}</h3><span class="rss:item" style="display:none;">
<p>
{{entrymainbodyfirstwords 20}}
</p>
</span>
<P ALIGN=JUSTIFY>
{{entrymainbody}}
</P>
This will display the whole entry on your item page, but only the first 20 words on the RDF feed. To change the number of words, change 20 to whatever you want.
(With thanks to DaSaintFan and linear)
Run gm-rss Automatically
To run gm-rss automatically you must make the following modifications to Greymatter.
Backup up gm-library.cgi
Put the statement "system './gm-rss.cgi';" at the end of each of the following subroutines in gm-library.cgi:
NOTE: the line numbers given are for Greymatter 1.3 only. Do not place the change at these line numbers in any other release of Greymatter.
- gm_rebuildupdate (line number 10687)
- gm_rebuildlastentrypageonly (line number 7800)
- gm_rebuildarchivemasterindex (line number 7880)
- gm_rebuildarchivelogindexes (line number 7946)
- gm_saveentrychanges (line number 9047)
- gm_generatemainindex (line number 2248)
Once this modifications are made, gm-rss will rebuild the RSS feed every time Greymatter rebuilds the files.
Run gm-rss Manually
Each time you wish to update your feed just type the following into your web browser:
http://www.example.com/cgi-bin/gm-rss.cgi
changing example.com to your website and cgi-bin to the name of the library where gm-rss.cgi is kept.
You would normally do this after you have added an entry.
gm-rss will run without the full informational messages. Should you wish to get the full informational messages (verbose mode) you must invoke it thus:
http://example.com/cgi-bin/gm-rss.cgi?-v
Download
Download gm-rss version 1.0.3a Labour Weekend, Version
Help, Report Bugs, Etc.
I suggest that you use the Greymatter forums