Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

See comic subscriptions in NetNewsWire 2.0 Apps
One thing I like to do with NetNewsWire 2.0 is to get my daily comics. The person who runs Tapestry has provided some feeds, but this does not include all the comics I like. Fortunately, ucomics.com provides a standard format for the location comic images for each date (see note below). So it was simple enough to write a python script which I then used as a special subscription in NNW.

To make use of it, I make a script subscription (File -> New Special Subscription -> Script...) to my ucomics.py script (make sure you make the script executable with chmod +x ucomics.py) with the argument: Name of Comic|directory|imageprefix. For example, Boondocks|boondocks|bo or Doonesbury|doonesbury|db (the image prefix can be found by going to the ucomics website and viewing a specific comic. The image prefix will be the first two to three letters of the image filename.

Note: Each comic image can be found at this generic URL:
http://images.ucomics.com/comics/Prefix/YEAR/PREFIXyymmdd.gif
where COMICDIRECTORY is the directory of the comic (eg forbetterorforworse), and PREFIX is the two or three letter abbreviation for the comic (eg fb). So 'For better or for worse' for November 28, 2004 would be found at this URL:

http://images.ucomics.com/comics/fb/2004/fb041128.gif
    •    
  • Currently 1.75 / 5
  You rated: 1 / 5 (4 votes cast)
 
[15,353 views]  

See comic subscriptions in NetNewsWire 2.0 | 15 comments | Create New Account
Click here to return to the 'See comic subscriptions in NetNewsWire 2.0' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
MUCH easier way
Authored by: britrock on Nov 30, '04 11:26:40AM

There is a MUCH MUCH easier way. No need to go to all that trouble. Most comics have rss feeds avaliable, that will work with any rss agregator.

You can find them easily by going to bloglines.com and searching through their directory. Or, on less well known comics, and web comics you can often find an rss feed link on their site.



[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: strike3 on Nov 30, '04 12:35:34PM
This would be very cool... but I can't get it to work.

Using the given example (passing the "Boondocks|boondocks|bo" arguments to the script), I get:


<body id="traditionalViewBody" class="completeNewsItem">
<div class="newsItemContainer">
	<div class="newsItemTitle"><strong><a href="http://www.ucomics.com/boondocks/">
Boondocks for Tuesday, November 30, 2004</a></strong></div>
	<div class="newsItemDescription">img</div>
	<div class="newsItemDateLine"><span class="newsItemSource"><a href="http://localhost">
<img src="(snip)" align="top" height="16" width="16" /></a> <a href="http://localhost">Boondocks</a></span>
<span class="newsItemDate">11/30/04 9:26 AM</span> </div>

In other words, I just get the letters "img" as the body of the RSS item instead of a graphic. Am I doing something wrong?

[ Reply to This | # ]

See comic subscriptions in NetNewsWire 2.0
Authored by: smorr on Nov 30, '04 01:47:16PM

OK just to cover the basics, have you
. downloaded the script
. turned on the execute permission (chmod +x ucomics.py in the terminal )
. created a new script subscription (not new subscription) in the new special menu
. Set the script to be a python script rather an an apple script?
. Set your parameters



[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: strike3 on Nov 30, '04 02:23:22PM

Yes, I have done all of those things. When I run the script, it generates an RSS item with the comic's name and today's date in it -- but where the image is supposed to be, there's just the text "img."

If I change the parameters (say, from Boondocks to Calvin and Hobbes), the title of the RSS item updates, but the effect is the same.



[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: smorr on Dec 01, '04 02:30:30PM

My script got munged it seems and replaced my &lt; and &gt; with actual < and >. Set my Yoicks!! post below for the fix



[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: strike3 on Dec 01, '04 08:04:39PM

That fixed it, thanks.



[ Reply to This | # ]
entity encoding
Authored by: badger brigade on Nov 30, '04 03:21:26PM
You need to replace the left angle bracket that opens the image tag in the script with the appropriate HTML entity, otherwise the image won't display. ie
replace <img with &lt;img


[ Reply to This | # ]
entity encoding
Authored by: badger brigade on Nov 30, '04 03:30:18PM

Unless, of course, you put an ampersand in the title of your new feed, like 'Calvin & Hobbes', in which case the wonders of RSS mean that the feed gets parsed differently and the left angle bracket shouldn't be encoded at all.



[ Reply to This | # ]
entity encoding
Authored by: smorr on Dec 01, '04 02:25:39PM

Yoicks!

I did have the appropriate entity encoding in my original submission but some where along the way, it got converted to a < and a >

So the line in question is the 4th from last and it should read:
print '\t\t\t\t<description>&lt;img src=\"http://images.ucomics.com/comics/%s/%s/%s%s.gif\" border=\"0\" /&gt;</description>' %(comicImgStem,time.strftime("%Y"),comicImgStem,time.strftime("%y%m%d"))



[ Reply to This | # ]
another great comics tool
Authored by: rooter on Nov 30, '04 04:59:53PM
If you have apache with php installed you should take a look at phpGrabComics.

Using cron it will get daily comics from ucomics and more.



[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: iacas on Nov 30, '04 07:27:47PM
Uhhh, I have subscriptions to, for example, http://dwlt.net/tapestry/dilbert.rdf in PulpFiction and they display things perfectly nicely...

---
--
Erik J. Barzeski
Web Everywhere

[ Reply to This | # ]

See comic subscriptions in NetNewsWire 2.0
Authored by: smorr on Dec 01, '04 02:28:22PM

My dilbert subscription from Tapestry works fine too! -- I made this script up because there was a lot of comics I like that tapestry didn't provide. I didn't know about the comic feeds in feedburner, but in anycase, I like to have all my stuff in one place.



[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: SimonDorfman.com on Dec 05, '04 01:39:51PM

Thanks for this script. It's very cool. One question:
I'm trying to get it to work with Calvin and Hobbes:
http://www.ucomics.com/calvinandhobbes/
and it looks like they're running old ones (since the comic is no longer being made). They are currently running 1993. How would I hack the script (or maybe add a new argument) to make it go back to 1993 and work with this comic?
Thanks very much for any help.

http://images.ucomics.com/comics/ch/1993/ch931205.gif



[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: SimonDorfman.com on Dec 08, '05 05:16:50AM
Wouldn't cha know it. A year later, I find myself asking the same question. I took the time to hack up a version of the script just for 1994 Calvin & Hobbes:

#!/usr/bin/python
# Created by Scott Morrison
# For personal use only

import sys,time,string

arguments = string.splitfields(sys.argv[1],"|");
comicName=arguments[0];
comicDir = arguments[1];
comicImgStem= arguments[2];

print '<?xml version="1.0"?>'
print '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">'
print 't<channel>'
print 'tt<title>%s</title>'%comicName
print 'tt<generator>comic.pl</generator>'
print 'tt<link>http://localhost</link>'
print 'tt<language>en-us</language>';
print 'ttt<item>';
print 'tttt<title>%s for %s</title>'%(comicName,time.strftime("%A, %B %d, %Y"))
print 'tttt<link>http://www.ucomics.com/%s/</link>'%comicDir;
print 'tttt<guid isPermaLink="false">http://www.ucomics.com/%s/</guid>'%comicDir;
print 'tttt<pubDate>%s</pubDate>' % time.strftime("%B %d, %Y")
print 'tttt<description><img src="http://images.ucomics.com/comics/%s/1994/%s94%s.gif" border="0" /></description>' %(comicImgStem,comicImgStem,time.strftime("%m%d"))
print 'ttt</item>';
print 't</channel>';
print '</rss>';
P.S.- I only changed this line:
print 'tttt' %(comicImgStem,comicImgStem,time.strftime("%m%d")) By hard coding in the 1994 and 94.

[ Reply to This | # ]
See comic subscriptions in NetNewsWire 2.0
Authored by: SimonDorfman.com on Dec 05, '04 01:57:42PM

I'd also like to hack something together to work with the bizarre and hilarious Wulffmorgenthaler:
http://www.wulffmorgenthaler.com/

It looks like it could be tricky though. Here's what I've figured out so far:
http://wulffmorgenthaler.com/thestrip.asp?cday=02&cmonth=12&cyear=2004

The above link is simple to understand. Just enter a month day and year and it shows a simple page with the comic. But the gifs are not quite as simple. They have a date component, but they also seem to have randomly generated (or perhaps a hash) two letters at the start of them. Here are some examples:

http://wulffmorgenthaler.com/log/SD04122004.gif
http://wulffmorgenthaler.com/log/GD03122004.gif
http://wulffmorgenthaler.com/log/ZX02122004.gif

Any ideas on how to get this working?



[ Reply to This | # ]