…just to be snarky…

…don’t ask how or why I came to notice the copyright statement listed above–I honestly can’t remember. I can tell you that the site is a favorite of mine to visit from time to time…

So, why am I calling your attention to this notice? To be a smart-ass, mainly–and to express why I think such a statement is, well, a little ridiculous.

The site is–for the most part–an archive of information that was created for the purposes of sharing information (unless I am being extremely obtuse); furthermore, the grandest portion of the information that I have seen posted to the site is either factual–thus negating copyright–or already in the public domain, where copyright does not apply. Don’t believe my statement on factual information losing copyright?

Am I going to challenge Mr. Naff’s declaration of copyright by tossing all of his files up on another server? No, of course not–doing so would be a “true” copyright violation (which is what I think he was trying to convey–exact duplication/distribution without permission); but his statement–as it is currently written–tries to claim that if I wanted to include a quote of anything published on that server I’d be in violation of copyright law.

Um… No…

…as for this post…

Have I violated copyright by copying his copyright statement? Neah…

Though I did not get express written consent to capture an image of his copyright statement, I am protected under “fair-use” doctrine; this post is being written as a personal commentary for the express use of educating the public and is being published on a site which does not generate any profit…

…I could always go further and write something like:

The content of kg4vma.dyndns.org, kg4vma.wordpress.com, & kg4vma.livejournal.com has been written, compiled, transcribed, abstracted, extracted and/or edited by Jeremiah Palmer, except for content which has been submitted for use at the site by unpaid volunteer contributors or where otherwise noted, and he maintains all rights in these web pages as defined by the copyright laws of the United States of America.  No content of this website may be used at or viewed through any other website without the express written consent of Jeremiah Palmer. Persons violating this statement of copyright will lose all access to teh interwebs–which is like a series of tubes–and further agree to have sheep thrown at them; additionally, persons found in violation of this statement no longer can has cheezburgers.

…if I wrote something like that, I would then have grounds to argue that I would be covered under “fair-use” by means of parody.

I respect Mr. Naff’s desire to say, “Hey, I put a lot of time and effort into this–I want you to ask me before doing anything with it!”; trolling through the pages of information shows a man that put in countless hours of work–transcribing text of books; there’s dedication! But to try and put such a grip on all the material… Why bother publishing it? It’s like opening up a soup stand, and then screaming, “No soup for you!”

…c’mon, Mr. Naff…

Re-think your copyright statement–or at least make some clarification on which works are truly yours…

…or better yet, change the attitude of your site altogether, and declare the works as licensed under Creative Commons, which would be more aligned with what I perceive as your goal of sharing information–factual and historical information, at that!–with the world. (a creative commons license would also allow you have similar recourse–i.e. lawsuit–should anyone decide to profit from your work… go check out the different license types for details…)

…and, with regard to copyright, anyway….

Though the law is written so that *nearly* anything under copyright by its creator as soon as it exists, doesn’t one need to file with the Copyright Office in order to have a better leg to stand on?

…and–with specific regard to items on Naff’s site, like the Harrison Heritage News–certain items are “owned” by the person/organization that commissioned the work, not the persons that published or were otherwise involved in the authoring/editing/compiling/etc. of said work…

…hey, wait a minute…

…wouldn’t that negate an even larger portion of Mr. Naff’s claim to copyright? 😉

By the way, if the title of the post isn’t clue enough–I’m not being entirely serious with this post… Oh, and if anyone wants, feel free to copy this post, change it around, and profit to your heart’s content… but you may wanna get permission from Mr. Naff… 😉

WINTER WEATHER RETURNS TO THE REGION TONIGHT

Special Weather Statement valid until January 14 10:00pm EST
SPECIAL WEATHER STATEMENT
NATIONAL WEATHER SERVICE LOUISVILLE KY
332 PM EST TUE JAN 14 2014

INZ076>079-083-084-089>092-KYZ023>043-045>049-053>057-061>067-
070>078-081-082-150300-
ORANGE IN-WASHINGTON IN-SCOTT IN-JEFFERSON IN-DUBOIS IN-
CRAWFORD IN-PERRY IN-HARRISON IN-FLOYD IN-CLARK IN-HANCOCK KY-
BRECKINRIDGE KY-MEADE KY-OHIO KY-GRAYSON KY-HARDIN KY-BULLITT KY-
JEFFERSON KY-OLDHAM KY-TRIMBLE KY-HENRY KY-SHELBY KY-FRANKLIN KY-
SCOTT KY-HARRISON KY-SPENCER KY-ANDERSON KY-WOODFORD KY-
FAYETTE KY-BOURBON KY-NICHOLAS KY-NELSON KY-WASHINGTON KY-
MERCER KY-JESSAMINE KY-CLARK KY-LARUE KY-MARION KY-BOYLE KY-
GARRARD KY-MADISON KY-BUTLER KY-EDMONSON KY-HART KY-GREEN KY-
TAYLOR KY-CASEY KY-LINCOLN KY-LOGAN KY-WARREN KY-SIMPSON KY-
ALLEN KY-BARREN KY-MONROE KY-METCALFE KY-ADAIR KY-RUSSELL KY-
CUMBERLAND KY-CLINTON KY-
INCLUDING THE CITIES OF...PAOLI...SALEM...SCOTTSBURG...MADISON...
JASPER...MARENGO...TELL CITY...CORYDON...NEW ALBANY...
JEFFERSONVILLE...HAWESVILLE...HARDINSBURG...BRANDENBURG...
BEAVER DAM...LEITCHFIELD...ELIZABETHTOWN...FORT KNOX...
MOUNT WASHINGTON...SHEPHERDSVILLE...LOUISVILLE...LA GRANGE...
BEDFORD...NEW CASTLE...SHELBYVILLE...FRANKFORT...GEORGETOWN...
CYNTHIANA...TAYLORSVILLE...LAWRENCEBURG...VERSAILLES...
LEXINGTON...PARIS...CARLISLE...BARDSTOWN...SPRINGFIELD...
HARRODSBURG...NICHOLASVILLE...WINCHESTER...HODGENVILLE...
LEBANON...DANVILLE...LANCASTER...RICHMOND...MORGANTOWN...
BROWNSVILLE...MUNFORDVILLE...GREENSBURG...CAMPBELLSVILLE...
LIBERTY...STANFORD...RUSSELLVILLE...BOWLING GREEN...FRANKLIN...
SCOTTSVILLE...GLASGOW...TOMPKINSVILLE...EDMONTON...COLUMBIA...
JAMESTOWN...BURKESVILLE...ALBANY
332 PM EST TUE JAN 14 2014 /232 PM CST TUE JAN 14 2014/

...WINTER WEATHER RETURNS TO THE REGION TONIGHT...

A QUICK MOVING COLD FRONT WILL PASS THROUGH SOUTHERN INDIANA AND
CENTRAL KENTUCKY TONIGHT. AHEAD OF THIS FRONT...SCATTERED RAIN
SHOWERS WILL BE POSSIBLE. HOWEVER...AS A MUCH COLDER AIR POURS IN
BEHIND THE FRONT...THE RAIN SHOWERS WILL QUICKLY CHANGE OVER TO
SNOW SHOWERS WHICH WILL CONTINUE OFF AND ON OVERNIGHT AND INTO THE
DAY ON WEDNESDAY.

AT THIS TIME...SOME VERY LIGHT SNOWFALL ACCUMULATIONS ARE
EXPECTED. IN GENERAL...MOST LOCATIONS WILL SEE A DUSTING TO LESS
THAN AN INCH. THE COMBINATION OF SNOW SHOWERS AND TEMPERATURES FALLING
INTO THE MIDDLE 20S TONIGHT MAY RESULT IN NEGATIVE TRAVEL IMPACTS
FOR THE WEDNESDAY MORNING COMMUTE AS SLICK SPOTS MAY DEVELOP ON
AREA ROADWAYS. MOTORISTS SHOULD EXERCISE CAUTION WEDNESDAY MORNING
AND ALLOW EXTRA TIME TO REACH THEIR DESTINATIONS.

IN ADDITION TO THE SNOW SHOWER ACTIVITY...IT WILL BECOME QUITE
WINDY ACROSS THE REGION. NORTHWEST WINDS OF 15 TO 20 MPH WITH
GUSTS OF 20 TO 30 MPH WILL BE POSSIBLE TONIGHT AND THROUGH THE DAY
ON WEDNESDAY. THESE WINDS COMBINED WITH TEMPERATURES IN THE 20S
LATE TONIGHT AND WEDNESDAY WILL RESULT IN WIND CHILL VALUES IN THE
LOWER TEENS.

ADDITIONAL WEATHER DISTURBANCES ARE FORECAST TO IMPACT THE REGION
THURSDAY AND FRIDAY WHICH MAY DEPOSIT SOME ADDITIONAL LIGHT
SNOWFALL ACCUMULATIONS.

STAY TUNED TO NOAA ALL HAZARDS WEATHER RADIO AND YOUR LOCAL MEDIA
FOR THE LATEST ON THIS WINTER WEATHER SITUATION.

$$

EER

LIGHT WINTRY PRECIPITATION MAY CAUSE A FEW SLICK SPOTS THIS EVENING

A MIX OF RAIN…SLEET…AND SNOW WILL CONTINUE TO MOVE EAST ACROSS
SOUTHERN INDIANA AND CENTRAL KENTUCKY THIS EVENING RESULTING IN A
BRIEF DUSTING OF SLEET AND SNOW IN SOME AREAS. ALTHOUGH GROUND
TEMPERATURES ARE ABOVE FREEZING IN MOST AREAS AND RESIDUAL ICE
TREATMENT ON MAIN ROADS STILL EXISTS…SOME ISOLATED SLICK SPOTS
MAY BE POSSIBLE MAINLY ON SECONDARY UNTREATED ROADWAYS. DRIVERS
SHOULD USE CAUTION DURING THE EVENING RUSH HOUR.

000
WWUS83 KLMK 092207
SPSLMK

SPECIAL WEATHER STATEMENT
NATIONAL WEATHER SERVICE LOUISVILLE KY
507 PM EST THU JAN 9 2014

INZ076>079-083-084-089>092-KYZ023>043-045>049-053>057-061>067-
070>078-081-082-092315-
ORANGE IN-WASHINGTON IN-SCOTT IN-JEFFERSON IN-DUBOIS IN-
CRAWFORD IN-PERRY IN-HARRISON IN-FLOYD IN-CLARK IN-HANCOCK KY-
BRECKINRIDGE KY-MEADE KY-OHIO KY-GRAYSON KY-HARDIN KY-BULLITT KY-
JEFFERSON KY-OLDHAM KY-TRIMBLE KY-HENRY KY-SHELBY KY-FRANKLIN KY-
SCOTT KY-HARRISON KY-SPENCER KY-ANDERSON KY-WOODFORD KY-
FAYETTE KY-BOURBON KY-NICHOLAS KY-NELSON KY-WASHINGTON KY-
MERCER KY-JESSAMINE KY-CLARK KY-LARUE KY-MARION KY-BOYLE KY-
GARRARD KY-MADISON KY-BUTLER KY-EDMONSON KY-HART KY-GREEN KY-
TAYLOR KY-CASEY KY-LINCOLN KY-LOGAN KY-WARREN KY-SIMPSON KY-
ALLEN KY-BARREN KY-MONROE KY-METCALFE KY-ADAIR KY-RUSSELL KY-
CUMBERLAND KY-CLINTON KY-
INCLUDING THE CITIES OF...PAOLI...SALEM...SCOTTSBURG...MADISON...
JASPER...MARENGO...TELL CITY...CORYDON...NEW ALBANY...
JEFFERSONVILLE...HAWESVILLE...HARDINSBURG...BRANDENBURG...
BEAVER DAM...LEITCHFIELD...ELIZABETHTOWN...FORT KNOX...
MOUNT WASHINGTON...SHEPHERDSVILLE...LOUISVILLE...LA GRANGE...
BEDFORD...NEW CASTLE...SHELBYVILLE...FRANKFORT...GEORGETOWN...
CYNTHIANA...TAYLORSVILLE...LAWRENCEBURG...VERSAILLES...
LEXINGTON...PARIS...CARLISLE...BARDSTOWN...SPRINGFIELD...
HARRODSBURG...NICHOLASVILLE...WINCHESTER...HODGENVILLE...
LEBANON...DANVILLE...LANCASTER...RICHMOND...MORGANTOWN...
BROWNSVILLE...MUNFORDVILLE...GREENSBURG...CAMPBELLSVILLE...
LIBERTY...STANFORD...RUSSELLVILLE...BOWLING GREEN...FRANKLIN...
SCOTTSVILLE...GLASGOW...TOMPKINSVILLE...EDMONTON...COLUMBIA...
JAMESTOWN...BURKESVILLE...ALBANY
507 PM EST THU JAN 9 2014 /407 PM CST THU JAN 9 2014/

...LIGHT WINTRY PRECIPITATION MAY CAUSE A FEW SLICK SPOTS THIS EVENING...

A MIX OF RAIN...SLEET...AND SNOW WILL CONTINUE TO MOVE EAST ACROSS
SOUTHERN INDIANA AND CENTRAL KENTUCKY THIS EVENING RESULTING IN A
BRIEF DUSTING OF SLEET AND SNOW IN SOME AREAS. ALTHOUGH GROUND
TEMPERATURES ARE ABOVE FREEZING IN MOST AREAS AND RESIDUAL ICE
TREATMENT ON MAIN ROADS STILL EXISTS...SOME ISOLATED SLICK SPOTS
MAY BE POSSIBLE MAINLY ON SECONDARY UNTREATED ROADWAYS. DRIVERS
SHOULD USE CAUTION DURING THE EVENING RUSH HOUR.

My adventures with eBooks: A calibre recipe for the Cynthiana Democrat

…another poorly written recipe–made through copying, pasting, and a whole lot of trial and error–this time for the Cynthiana Democrat. (It doesn’t really work anymore…)


'''
Cynthiana Democrat Calibre Recipe
'''

# Import the regular expressions module.
import re, string, time

# Import the BasicNewsRecipe class which this class extends.
from calibre.web.feeds.recipes import BasicNewsRecipe

from calibre import strftime
from datetime import timedelta, date
from time import sleep
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag, BeautifulStoneSoup

class AdvancedUserRecipe1371040942(BasicNewsRecipe):
title = u'The Cynthiana Democrat'

# A brief description for the ebook.
#
description = u'Cynthiana Democrat web site ebook created using rss feeds.'

# The max number of articles which may be downloaded from each feed.
#
max_articles_per_feed = 100
filterDuplicates = True
ignore_duplicate_articles = {'title', 'url'}
scale_news_images_to_device = True
recursions=0
# The max age of articles which may be downloaded from each feed. This is
# specified in days - note fractions of days are allowed, Eg. 2.5 (2 and a
# half days). My default of 1.5 days is the last 36 hours, the point at
# which I've decided 'news' becomes 'old news', but be warned this is not
# so good for the blogs, technology, magazine, etc., and sports feeds.
# You may wish to extend this to 2-5 but watch out ebook creation time will
# increase as well. Setting this to 30 will get everything (AFAICT) as long
# as max_articles_per_feed remains set high.
#
oldest_article = 7

# Number of simultaneous downloads. Speeds things up from the defualt of 5.
# If you have a lot of feeds and/or have increased oldest_article above 2
# then you may wish to try increasing simultaneous_downloads to 25-30,
# Or, of course, if you are in a hurry. [I've not tried beyond 20.]
#
simultaneous_downloads = 20

# Timeout for fetching files from the server in seconds. The default of
# 120 seconds, seems somewhat excessive.
#
timeout = 30

# The format string for the date shown on the ebook's first page.
# List of all values: http://docs.python.org/library/time.html
# Default in news.py has a leading space so that's mirrored here.
# As with 'feeds' select/de-select by adding/removing the initial '#',
# only one timefmt should be selected, here's a few to choose from.
#
#timefmt = ' [%a, %d %b %Y]' # [Fri, 14 Nov 2011] (Calibre default)
#timefmt = ' [%a, %d %b %Y %H:%M]' # [Fri, 14 Nov 2011 18:30]
timefmt = ' [%a, %d %b %Y %I:%M %p]' # [Fri, 14 Nov 2011 06:30 PM]
#timefmt = ' [%d %b %Y]' # [14 Nov 2011]
#timefmt = ' [%d %b %Y %H:%M]' # [14 Nov 2011 18.30]
#timefmt = ' [%Y-%m-%d]' # [2011-11-14]
#timefmt = ' [%Y-%m-%d-%H-%M]' # [2011-11-14-18-30]
auto_cleanup = True
auto_cleanup_keep = '//*[@class="content"]|//*[@class="slide-wrap"]'
#auto_cleanup_keep = '//div[@class="subsection-photo"]|//div[@class="top-news-pic"]|//div[@class="slide-wrap"]|//div[@class="source"]|//div[@class="news-sidebar"]'

# Author of this recipe.
__author__ = 'kg4vma'

# Specify English as the language of the RSS feeds (ISO-639 code).
language = 'en_US'

# Set tags.
tags = 'news, sport, blog'

# Set publisher and publication type.
publisher = 'The Cynthiana Democrat'
publication_type = 'newspaper'

# Disable stylesheets from site.
no_stylesheets = True
masthead_url = 'http://www.cynthianademocrat.com/sites/www.cynthianademocrat.com/files/cynthianalogov2.png'

# Specifies an override encoding for sites that have an incorrect charset
# specified. Default of 'None' says to auto-detect.
encoding = None

# Sets whether a feed has full articles embedded in it.
use_embedded_content = False

# Removes empty feeds - why keep them!?
remove_empty_feeds = True

feeds = [(u'News', u'http://www.cynthianademocrat.com/todaysnews/rss.xml'),
(u'Did you Know', u'http://www.cynthianademocrat.com/rss.xml'),
(u'Features', u'http://www.cynthianademocrat.com/features/rss.xml'),
(u'Obituaries', u'http://www.legacy.com/services/obitrss.asp?Source=cynthianademocrat'),
(u'Opinion', u'http://www.cynthianademocrat.com/todaysopinions/rss.xml'),
(u'Business', u'http://www.cynthianademocrat.com/news/business/rss.xml'),
(u'Sports', u'http://www.cynthianademocrat.com/sports/rss.xml')]

#cover_tag = 'KY_LHL'
#def get_cover_url(self):
# from datetime import timedelta, date
# cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.cover_tag+'.jpg'
# br = BasicNewsRecipe.get_browser(self)
# daysback=1
# try:
# br.open(cover)
# except:
# while daysback<7:
# cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.cover_tag+'.jpg'
# br = BasicNewsRecipe.get_browser(self)
# try:
# br.open(cover)
# except:
# daysback = daysback+1
# continue
# break
# if daysback==7:
# self.log("\nCover unavailable")
# cover = None
# return cover

My adventures with eBooks: A calibre recipe for the Lexington Herald-Leader

…a very poorly written recipe–made through copying, pasting, and a whole lot of trial and error–for the Lexington Herald-Leader.


'''
Lexington Herald-Leader Calibre Recipe
'''

# Import the regular expressions module.
import re, string, time

# Import the BasicNewsRecipe class which this class extends.
from calibre.web.feeds.recipes import BasicNewsRecipe

from calibre import strftime
from datetime import timedelta, date
from time import sleep
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag, BeautifulStoneSoup

class AdvancedUserRecipe1371040942(BasicNewsRecipe):
title = u'Lexington Herald-Leader'

# A brief description for the ebook.
#
description = u'Lexington Herald-Leader web site ebook created using rss feeds.'

# The max number of articles which may be downloaded from each feed.
#
max_articles_per_feed = 100
filterDuplicates = True
# The max age of articles which may be downloaded from each feed. This is
# specified in days - note fractions of days are allowed, Eg. 2.5 (2 and a
# half days). My default of 1.5 days is the last 36 hours, the point at
# which I've decided 'news' becomes 'old news', but be warned this is not
# so good for the blogs, technology, magazine, etc., and sports feeds.
# You may wish to extend this to 2-5 but watch out ebook creation time will
# increase as well. Setting this to 30 will get everything (AFAICT) as long
# as max_articles_per_feed remains set high.
#
oldest_article = 1.5

# Number of simultaneous downloads. Speeds things up from the defualt of 5.
# If you have a lot of feeds and/or have increased oldest_article above 2
# then you may wish to try increasing simultaneous_downloads to 25-30,
# Or, of course, if you are in a hurry. [I've not tried beyond 20.]
#
simultaneous_downloads = 20

# Timeout for fetching files from the server in seconds. The default of
# 120 seconds, seems somewhat excessive.
#
timeout = 30

# The format string for the date shown on the ebook's first page.
# List of all values: http://docs.python.org/library/time.html
# Default in news.py has a leading space so that's mirrored here.
# As with 'feeds' select/de-select by adding/removing the initial '#',
# only one timefmt should be selected, here's a few to choose from.
#
#timefmt = ' [%a, %d %b %Y]' # [Fri, 14 Nov 2011] (Calibre default)
#timefmt = ' [%a, %d %b %Y %H:%M]' # [Fri, 14 Nov 2011 18:30]
timefmt = ' [%a, %d %b %Y %I:%M %p]' # [Fri, 14 Nov 2011 06:30 PM]
#timefmt = ' [%d %b %Y]' # [14 Nov 2011]
#timefmt = ' [%d %b %Y %H:%M]' # [14 Nov 2011 18.30]
#timefmt = ' [%Y-%m-%d]' # [2011-11-14]
#timefmt = ' [%Y-%m-%d-%H-%M]' # [2011-11-14-18-30]
auto_cleanup = True
auto_cleanup_keep = '//div[@class="aside"]|//*[@class="story_content"]'

# Author of this recipe.
__author__ = 'kg4vma'

# Specify English as the language of the RSS feeds (ISO-639 code).
language = 'en_GB'

# Set tags.
tags = 'news, sport, blog'

# Set publisher and publication type.
publisher = 'Lexington Herald-Leader'
publication_type = 'newspaper'

# Disable stylesheets from site.
no_stylesheets = True
# extra_css = '
# .articleHeadline { text-align: left; margin-top:0.5em; margin-bottom:0.25em; }
# .credit { font-weight: normal; text-align: right; font-size: 50%; line-height:1em; margin-top:5px; margin-left:0; margin-right:0; margin-bottom: 0; }
# .byline { text-align: left; font-size: 50%; line-height:1em; margin-top:10px; margin-left:0; margin-right:0; margin-bottom: 0; }
# .dateline { text-align: left; font-size: 50%; line-height:1em;margin-top:5px; margin-left:0; margin-right:0; margin-bottom: 0; }
# .kicker { font-size: 50%; line-height:1em;margin-top:5px; margin-left:0; margin-right:0; margin-bottom: 0; }
# .timestamp { font-weight: normal; text-align: left; font-size: 50%; }
# .caption { font-size: 50%; font-style:italic; line-height:1em; margin-top:5px; margin-left:0; margin-right:0; margin-bottom: 0; }
# a:link {text-decoration: none; }
# .date{font-size: 50%; }
# .update{font-size: 50%; }
# .articleBody { }
# .authorId {text-align: left; font-size: 50%; }
# .image {text-align: center;}
# .aside {color:blue;margin:0px 0px 0px 0px; padding: 0px 0px 0px 0px; font-size:100%;}
# .asidenote {color:blue;margin:0px 0px 0px 0px; padding: 0px 0px 0px 0px; font-size:100%;font-weight:bold;}
# .source {text-align: left; font-size: x-small; }'

# Specifies an override encoding for sites that have an incorrect charset
# specified. Default of 'None' says to auto-detect.
encoding = None

# Sets whether a feed has full articles embedded in it.
use_embedded_content = False

# Removes empty feeds - why keep them!?
remove_empty_feeds = True

feeds = [
(u'Top News', u'http://www.kentucky.com/322/index.rss'),
(u'Local News', u'http://www.kentucky.com/164/index.rss'),
(u'Obituaries', u'http://www.legacy.com/services/obitrss.asp?Source=kentucky'),
(u'Nation / World', u'http://www.kentucky.com/1250/index.rss'),
(u'Opinion', u'http://www.kentucky.com/349/index.rss'),
(u'Life / Neighbors', u'http://www.kentucky.com/131/index.rss'),
(u'Entertainment', u'http://www.kentucky.com/684/index.rss'),
(u'Sports', u'http://www.kentucky.com/268/index.rss'),
(u'Business', u'http://www.kentucky.com/101/index.rss'),
(u'Weather', u'http://weather.bloginky.com/feed/')
]

cover_tag = 'KY_LHL'
def get_cover_url(self):
from datetime import timedelta, date
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str(date.today().day)+'/lg/'+self.cover_tag+'.jpg'
br = BasicNewsRecipe.get_browser(self)
daysback=1
try:
br.open(cover)
except:
while daysback<7:
cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg'+str((date.today() - timedelta(days=daysback)).day)+'/lg/'+self.cover_tag+'.jpg'
br = BasicNewsRecipe.get_browser(self)
try:
br.open(cover)
except:
daysback = daysback+1
continue
break
if daysback==7:
self.log("\nCover unavailable")
cover = None
return cover

My adventures with eBooks: Getting your favorite Newspaper/Magazine/Blog via calibre

So, the other day I rambled on at length about eBooks and a little program called ‘calibre’… While writing that post, I ended up thinking, “hey, why not make a series of posts?” So, here it is–post number two…

In the previous post I had mentioned that one of the neat features of calibre was its ability to grab feeds from sites and turn them into a nifty little eBook for you to enjoy. If you want to use one of the included “recipes”, the operation is fairly simple; if you want to go further and try to make your own recipe for collecting your local newspaper’s feed, you can do that, too!

Using included recipes

Clicking the “Fetch News” button in the toolbar will open a window where the user can select from a number of news/blog sources–all sources are grouped by language. Here’s a screenshot showing example of what’s available:

schedule_news_download

After you’ve found a source you like, it’s as simple as telling calibre that you want it, and how frequently. (Option exists for some sources–such as the New York Times, as shown above–where you can enter a username and pass, so that calibre can login and get the ‘whole’ article or otherwise restricted content, rather than the snippet.)

Neat, eh?

How about taking it a step further–and have your news delivered to you!

If you’ve setup your email address in the calibre preferences as a way to ‘share’ books–see ‘sharing books by email’–then you can have your selected news sources emailed to you! For the most part, this process is self-explanatory–as such, I’m not gonna give instruction; but if you need help, there’s always the calibre manual…

Adding your own news source

Okay, this is an advanced topic that I’m still working on myself–but I wanted to include it, anyway. Rather than attempting to go over the process, let me redirect you to the MobileRead Forum topic: Using News Recipes: Start Here; there’s also the calibre manual page: Adding your favorite news source.

Once you’ve given those pages a peek, you can start tearing your hair out while debugging your own recipes!

…as for me, I’ve tried creating two recipes, one for the Lexington Herald-Leader and one for the Cynthiana Democrat. The Herald recipe kind of works–I have issue with it throwing in duplicate content; the Democrat was working up until they fixed an issue where their RSS feeds somehow opened a backdoor into viewing subscribed content…

Delivering your news without running the calibre GUI

Ok, this one is more advanced–and there’s a good chance that there’s a better way to do it; but…

I don’t like the idea of leaving calibre running all the time, but I want to be able to have my morning news emailed to me; enter a little bit of batch programming, the calibre command-line tools, and Windows Task Scheduler.

First, I placed the recipes that I wanted to call in a separate directory. (you’ll see where in the batch file, below.

I then located an example of a batch program–http://www.mobileread.com/forums/showpost.php?p=1193772&postcount=5–and then toyed with it until I got what I’m using below (yes, I’m a lazy–I left unnecessary stuff there, just remarking them out):


@echo on

rem -- set preconfigured feeds --
rem -- old feeds: AP ArsTechnica CNN HuffingtonPost Reuters WashingtonPost Wired
set feeds=HeraldLeader NYtimes

rem -- set custom feeds --
set recipes=C:\Calibre Library\_NEWS
set workdir=C:\Calibre Library\_NEWS

rem -- set calibre dir --
set calibre=C:\Program Files\Calibre2

rem -- set for email delivery --
set server=smtp.gmail.com
set port=587
set user=user@gmail.com
set pwd=password
set mailserver=-r %server% --port %port% -u %user% -p %pwd%

set subject=News:
set text="Calibre News Feed %DATE% %TIME%"

set from=user@gmail.com
set to=user@gmail.com

rem ----------------------------------------------------------------

rem chdir /d "%workdir%

echo %DATE% %TIME% Start Calibre News Feed > news.log
echo. >> news.log

for %%a in (%feeds%) do (

rem timer /nologo > nul
call "%calibre%\ebook-convert" "%recipes%\%%a.recipe" "%%a.EPUB"
call "%calibre%\calibre-smtp" %mailserver% -a "%%a.EPUB" -s "%subject% %%a" %from% %to% %text%
rem call "%calibre%\calibredb" add --tags="News, %%a" "%%a.EPUB"
del "%%a.EPUB"

echo %%a >> news.log
rem timer /nologo /s >> news.log
echo. >> news.log

)

echo %DATE% %TIME% End Calibre News Feed >> news.log

rem C:\Windows\system32\shutdown.exe /h

exit 0

Once I got that established, I launched Task Scheduler and set up times for Windows to launch the task. Voila! (albeit messy, and a half-assed job… but… I really don’t have any technical skills, and I do this sort of thing while keeping kids from killing each other!)

So, there it is, my second post on calibre!–more of an interest catcher than instruction/guide… but, hey, I’m sharing my adventures–hopefully yours will turn out better!