12-05-2007, 05:32 PM | #1 |
Connoisseur
Posts: 65
Karma: 256
Join Date: Nov 2007
Location: Switzerland
Device: Iliad, Kindle K3, iPad , iPhone, etc...
|
News feed creation for Mac OSX (leopard)
k, first of all this is NOT a GUI ... i wanted a script i could run automatic everyday
what is it then: for a given RSS feed, it goes to the main web page (the link in the RSS) and converts that into a PDF file. in addition it allows cropping of the web page to get rid of stuff you probably dont want to see on your iLiad e.g. toolbars, sidebars etc. (if you remove margins, you will get the entire web page) there are a few other hidden features, such as substituting the link for the 'printed' page line, but will discuss those later. (see attached pdf for example, my margins could be bigger, to remove more, but as it is you can kind of see what its doing!) to use, execute: createDaily if you have a look at that script, you will see how to add new feeds easy enough. for the techies, what does it do? createDaily calles createNews for each feed createNews is a wrapper since the process is 3 steps: a) WebToPDF creates the stories, one story per PDF b) an automator script then executes to combine the PDFs into 1 called News.pdf c) this is then moved and renames to an appropriate name im using it now every day, and will probably extend it in a few ways (probably will get rid of the scripts at some point) note: it is ALPHA, esp command line args, make sure you have 'pairs' otherwise it will crash, will add more error checking, but thought id get it out quickly as i find it really useful enjoy |
12-08-2007, 01:44 AM | #2 |
Junior Member
Posts: 2
Karma: 10
Join Date: Oct 2007
Device: Iliad/Asus P525
|
Thanks for posting it up. Looks promising. Will give a spin.
|
05-30-2008, 06:15 PM | #3 |
Sleeper.
Posts: 109
Karma: 10
Join Date: Dec 2007
Device: Boox Max2, Kinde Voyage, reMarkable, Dasung Paperlike Pro
|
Looks really nice (BBC sample). Any news on this?
Last edited by jotheman; 05-30-2008 at 06:44 PM. |
06-06-2008, 08:59 AM | #4 |
Connoisseur
Posts: 65
Karma: 256
Join Date: Nov 2007
Location: Switzerland
Device: Iliad, Kindle K3, iPad , iPhone, etc...
|
sorry, not been doing much on iLiad recently, as my commute to work has reduced, so no time to read the paper in the morning
i did do some tweaks, not sure if i posted them here will have to check. only real issue i had was that sometimes the margin of the web pages seemed to be different ( as i mentioned in the first post, you usually want to crop out unwanted parts of the web page ... actually works a bit like apples webclip widget in that regard ) anyways the above should work fine, but its likely you will have to 'tune' margin parameters. i'll try to have another look, see if i can improve some more... btw, any other mac osx developers out there? |
06-22-2008, 04:06 PM | #5 |
Virtual Books Reader :)
Posts: 26
Karma: 37
Join Date: Sep 2007
Device: iLiad, Kindle DX, iPhone
|
It seems this script is not compatible with 10.5.3. It gives me lots and lots of error messages on the console when I run it!
Code:
$ ./createDaily 2008-06-22 23:00:33.459 WebToPDF[45027:10b] Error loading /Library/InputManagers/SIMBL/SIMBL.bundle/Contents/MacOS/SIMBL: dlopen(/Library/InputManagers/SIMBL/SIMBL.bundle/Contents/MacOS/SIMBL, 265): no suitable image found. Did find: /Library/InputManagers/SIMBL/SIMBL.bundle/Contents/MacOS/SIMBL: GC capability mismatch 2008-06-22 23:01:15.269 WebToPDF[45027:10b] Error loading /Users/mansour/Library/Internet Plug-Ins/iGetterBundle.plugin/Contents/MacOS/iGetterBundle: dlopen(/Users/mansour/Library/Internet Plug-Ins/iGetterBundle.plugin/Contents/MacOS/iGetterBundle, 262): no suitable image found. Did find: /Users/mansour/Library/Internet Plug-Ins/iGetterBundle.plugin/Contents/MacOS/iGetterBundle: GC capability mismatch 2008-06-22 23:01:15.843 WebToPDF[45027:10b] Error loading /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: dlopen(/Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player, 262): no suitable image found. Did find: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: GC capability mismatch 2008-06-22 23:01:21.590 WebToPDF[45027:10b] Error loading /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: dlopen(/Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player, 262): no suitable image found. Did find: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: GC capability mismatch 2008-06-22 23:02:58.974 WebToPDF[45027:10b] Error loading /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: dlopen(/Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player, 262): no suitable image found. Did find: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: GC capability mismatch 2008-06-22 23:03:05.201 WebToPDF[45027:10b] Error loading /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: dlopen(/Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player, 262): no suitable image found. Did find: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: GC capability mismatch 2008-06-22 23:03:07.745 WebToPDF[45027:10b] Error loading /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: dlopen(/Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player, 262): no suitable image found. Did find: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: GC capability mismatch 2008-06-22 23:03:23.266 WebToPDF[45027:10b] Error loading /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: dlopen(/Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player, 262): no suitable image found. Did find: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: GC capability mismatch 2008-06-22 23:03:26.558 WebToPDF[45027:10b] Error loading /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: dlopen(/Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player, 262): no suitable image found. Did find: /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player: GC capability mismatch 2008-06-22 23:03:41.319 combinepdfs[45064:10b] No application name for definition file at path: /Library/Automator/Office.definition Sun Jun 22 23:03:42 MacBookPro.local Python[45067] <Error>: The function `CGPDFDocumentGetMediaBox' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Please use `CGPDFPageGetBoxRect' instead. |
06-27-2008, 05:54 PM | #6 | |
Connoisseur
Posts: 65
Karma: 256
Join Date: Nov 2007
Location: Switzerland
Device: Iliad, Kindle K3, iPad , iPhone, etc...
|
Quote:
however, despite the errors, this still produce the correct pdfs for me. (though as i mentioned above, the margins werent quite right now, as bbc has altered its pages since i put the script up... but you can adjust in the script) i'll see if i can play at the weekend, perhaps a newer build for leopard will resolve error messages. |
|
08-23-2008, 06:19 AM | #7 |
Zealot
Posts: 119
Karma: 603
Join Date: May 2008
Location: Oslo, Norway
Device: irex iliad
|
I'm sorry to say it only created errors for me:
mkdir: /tmp/newsfeed: File exists 2008-08-23 12:17:38.722 WebToPDF[505:10b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithCString:]: NULL cString' 2008-08-23 12:17:38.725 WebToPDF[505:10b] Stack: ( 2488426827, 2527514875, 2488426283, 2488426346, 2425274612, 10745, 8370 ) ./createNews: line 8: 505 Trace/BPT trap $DIR/WebToPDF $* mv: rename /tmp/News.pdf to /Users/haridasi/.pdf: No such file or directory rm: *.pdf: No such file or directory |
08-23-2008, 06:46 AM | #8 |
Enthusiast
Posts: 28
Karma: 171
Join Date: Aug 2008
Location: Norwich, UK.
Device: iLiad Second Edition
|
I'm getting the same as haridasi. On OSX 10.5.4.
If you could spare the time to fettle it or tell us what we're doing wrong, I'd really appreciate it. This looks really promising. Rachael |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
QuickLook (Mac OS X Leopard and above) for Kindle/Mobipocket | pdurrant | Reading and Management | 15 | 03-22-2013 12:16 AM |
adding recipes in mac osx snow leopard | borjoz | Calibre | 2 | 07-30-2012 12:27 AM |
OI: ssh over USB/IP, OSX Leopard | RootlessAgrarian | OpenInkpot | 2 | 01-15-2010 09:19 PM |
OSX 10.6 'Snow Leopard' + calibre 0.6.14 = Working! | GRiker | Calibre | 2 | 09-30-2009 12:26 PM |
Mac OS X Leopard & libprs500 | Tamara | Calibre | 4 | 12-05-2007 04:29 PM |