<html> <head> <title>p4rss</title> </head> <body> <h3>Name</h3> p4rss.py - generate RSS feed from <code>p4 changes -m 10</code>. <h3>Synopsis</h3> <code>python p4rss.py > /path/to/rssfile</code><br/> <h3>Description</h3> p4rss.py converts usual output from p4 changes e.g. <pre> Change 10 on 2003/02/26 by hjh@p4rss 'Doc on RSS 0.91 vs 1.0, and cos' Change 9 on 2003/02/26 by hjh@p4rss 'Add a bit more doc. ' Change 8 on 2003/02/26 by hjh@p4rss 'Documentation and cosmetic chan' ... </pre> to RSS 0.91 format see <a href="http://radio.weblogs.com/0107481/sample.p4rss.xml">sample.p4rss.xml</a>. Run it inside a cron job to generate the RSS periodically. <p> Because p4rss.py uses vanilla p4, user can modify its behaviour with usual P4 environment variables. <h3>Bugs</h3> p4rss.py has many limitations: <ul> <li>because 'p4 changes' limits description of changelist to 31 characters, so does p4rss.py. One way to bypass this limit is to do a join with 'p4 changes' and 'p4 describe -s'. Maybe in the future.</li> <li>no way to limit the change list to specific depot/branch.</li> <li>supports only RSS 0.91 and not other versions of RSS.</li> <li>need to escape HTML entities in <description></li> <li>p4 changes returns following data fields <ul> <li>status: ignored</li> <li>client: ignored</li> <li>user: ignored </li> <li>code: ignored</li> <li>time: ignored</li> <li>change: displayed as <title> element</li> <li>desc: displayed as <description> element</li> </ul> User and time fields are useful information and need to be displayed. Maybe more extensible RSS 1.0+ should be used instead of really simple 0.91?</li> <li><link> element is set to http://127.0.0.1 for now i.e. it is not really meaningful. One solution would be make p4rss configurable and let users choose either p4db or p4web or some other web frontends. However p4web's URL is a pretty complicated (need to find some doc)</li> <li>currently number of items displayed is hardcoded to 10.</li> <li>no support for caching and other advanced features.</li> </ul> <h3>Todo</h3> <ol> <li>study web interfaces like p4db, p4web or <a href="http://pyds.muensterland.org/">PyDS</a></li> <li>trim this doc comment as it's even longer than the code!</li> </ol> <h3>Download</h3> python script: <a href="http://radio.weblogs.com/0107481/p4rss.zip">p4rss.zip</a> and sample RSS: <a href="http://radio.weblogs.com/0107481/sample.p4rss.xml">sample.p4rss.xml</a> <br/> Copyright 2003 <a href="mailto:jhan@acm.org">Jay Han</a><br/> You are free to use it as long as you do not blame me for anything. </body>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#9 | 2797 | Jay Han | rename index.html to p4rss.html | ||
#8 | 2795 | Jay Han |
restoring index.html because I mistakenly clobbered it. tssst. |
||
#7 | 2794 | Jay Han | deleting index.html (forgot to do it in 2793) | ||
#6 | 2793 | Jay Han | rename index.html to p4rss.html and modify release.bat to reflect this change. | ||
#5 | 2789 | Jay Han | update mail link | ||
#4 | 2788 | Jay Han | download from blog page, delete the often-regenerated sample.p4rss.xml | ||
#3 | 2782 | Jay Han | description comes from p4 describe, not the truncated p4 changes output. | ||
#2 | 2781 | Jay Han | pull out doc from p4rss.py, set url to public.perforce.com for now, also add a sample.p4rss.xml. | ||
#1 | 2780 | Jay Han | index.html for p4rss.py (copied docstring + email) |