![]() |
#1 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2007
Location: Brasil
Device: Sony Reader
|
Removing links from downloaded news
Hi all,
I often download news using Calibre, but I am old fashioned and want to read the text sequentially, and therefore do not like links in the downloaded document. Actually I sometimes select a link and then uneeded things happen, such as trying to visit a web site or something. Since I use my Kindle in airplane mode it is rather annoying. The question is, how can I remove links from a downloaded news file ? Or better yet, how can I make sure that no link is generated ? Thanks in advance, Sergio. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,145
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can edit the news recipe and add
remove_attributes = ['href'] to it. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2007
Location: Brasil
Device: Sony Reader
|
Thanks, but how can I edit the news recipe ? How do I get it ? When I select Fetch news and click download I see no option for editing the recipe or downloading it.
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,145
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Right click the fetch news button and choose add or edit custom news source
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2007
Location: Brasil
Device: Sony Reader
|
Thank you. I did get that far, but I forgot to mention that I don't want to start from scratch. i use mostly the The Economist recipe. How can I get so that I can modify it ?
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,145
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Click the customize builtin recipe button to edit an existing builting recipe
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2007
Location: Brasil
Device: Sony Reader
|
Thanks. I did find how to download the recipe and change it.
Unfortunately adding remove_attributes = ["href"] to the recipe did not work. I still get links. I guess because this has been downloaded as a web page, the links point to the original pages in the web site. I tried to convert the file. I went into the Look & feel options, Transform HTML tab, and added a rule that if a tag is [href] I remove it, but that did not work either. Is there a way of converting the file to remove the links ? |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,145
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
remove_attributes = ['href'] works fine, as does using transform HTML to remove the href attribute, though running an extra convert to use the latter will destroy amazon specific periodical formatting.
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2007
Location: Brasil
Device: Sony Reader
|
I see. Perhaps you can help me find what I did wrong. I am attaching the .recipe file below. In this week's The Economist on the very first paragraph of the weekly news there a link under the word Syria that was not removed. Perhaps I modified the recipe wrong ?
Using conversion, I don't mind losing the specific formatting, I am already converting it for another reason. To remove the href in the conversion should I type the tag name as href or 'href' or [href] or ['href'] or something else ? Thanks again. |
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,145
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In your recipe, locate the existing remove_attributes and add href to it.
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jul 2007
Location: Brasil
Device: Sony Reader
|
Ah, ok, so it was not add a remove_attributes line, but to add 'href' to an existing remove_attributes line, I get it now.
Thanks Kovid, it worked. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing links from articles | brennandai | Recipes | 4 | 08-03-2023 02:56 PM |
Convert links to text in downloaded news | jma1 | Recipes | 8 | 01-06-2019 10:27 PM |
removing links from text . | rolgiati | Sigil | 14 | 01-18-2015 07:09 PM |
Glo removing non-downloaded kepubs? | dakini | Kobo Reader | 7 | 10-10-2014 06:48 AM |
Add only news tag to downloaded news? | eric11210 | Calibre | 2 | 08-06-2010 05:51 AM |