# SOME DESCRIPTIVE TITLE. # Copyright (C) Kovid Goyal # This file is distributed under the same license as the calibre package. # # Translators: # Jonatan Nyberg, 2026 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2018,2020 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2020 # Jonatan Nyberg, 2026 # Jonatan Nyberg, 2016-2017,2021-2023,2025-2026 # Jonatan Nyberg, 2018-2021 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2018 # Jonatan Nyberg, 2026 # Merarom , 2014-2017 # Sebastian Rasmussen , 2018 msgid "" msgstr "" "Project-Id-Version: calibre\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-09-16 15:05+0000\n" "PO-Revision-Date: 2014-06-17 08:34+0000\n" "Last-Translator: Sebastian Rasmussen , 2018\n" "Language-Team: Swedish (http://app.transifex.com/calibre/calibre/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: sv\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../../../__w/calibre/calibre/manual/news.rst:4 msgid "Adding your favorite news website" msgstr "Lägga till din favoritnyhetswebbplats" #: ../../../__w/calibre/calibre/manual/news.rst:6 msgid "" "calibre has a powerful, flexible and easy-to-use framework for downloading " "news from the Internet and converting it into an e-book. The following will " "show you, by means of examples, how to get news from various websites." msgstr "calibre har ett kraftfullt, flexibelt och lättanvänt ramverk för att hämta nyheter från Internet och konvertera dem till en e-bok. Följande kommer att visa dig, med hjälp av exempel, hur du får nyheter från olika webbplatser." #: ../../../__w/calibre/calibre/manual/news.rst:8 msgid "" "To gain an understanding of how to use the framework, follow the examples in" " the order listed below:" msgstr "För att få en förståelse för hur man använder ramverket, följ exemplen i den ordning som anges nedan:" #: ../../../__w/calibre/calibre/manual/news.rst:15 msgid "Completely automatic fetching" msgstr "Helt automatisk hämtning" #: ../../../__w/calibre/calibre/manual/news.rst:17 msgid "" "If your news source is simple enough, calibre may well be able to fetch it " "completely automatically, all you need to do is provide the URL. calibre " "gathers all the information needed to download a news source into a " ":term:`recipe`. In order to tell calibre about a news source, you have to " "create a :term:`recipe` for it. Let's see some examples:" msgstr "Om nyhetskällan är tillräckligt enkel kan calibre kanske hämta den helt automatiskt. Du behöver bara ange URL:en. calibre samlar all information som behövs för att hämta en nyhetskälla i ett :term:`recept`. För att informera calibre om en nyhetskälla måste du skapa ett :term:`recept` för den. Här följer några exempel:" #: ../../../__w/calibre/calibre/manual/news.rst:26 msgid "The calibre blog" msgstr "calibre-bloggen" #: ../../../__w/calibre/calibre/manual/news.rst:28 msgid "" "The calibre blog is a blog of posts that describe many useful calibre " "features in a simple and accessible way for new calibre users. In order to " "download this blog into an e-book, we rely on the :term:`RSS` feed of the " "blog::" msgstr "calibre-bloggen innehåller inlägg som beskriver många användbara calibre-funktioner på ett enkelt och lättillgängligt sätt för nya användare. För att hämta bloggen som en e-bok använder vi bloggens :term:`RSS`-flöde::" #: ../../../__w/calibre/calibre/manual/news.rst:34 msgid "" "I got the RSS URL by looking under \"Subscribe to\" at the bottom of the " "blog page and choosing :guilabel:`Posts->Atom`. To make calibre download the" " feeds and convert them into an e-book, you should right click the " ":guilabel:`Fetch news` button and then the :guilabel:`Add a custom news " "source` menu item and then the :guilabel:`New Recipe` button. A dialog " "similar to that shown below should open up." msgstr "Jag fick RSS-URL:en genom att titta under \"Prenumerera\" längst ner på bloggsidan och välja :guilabel:`Posts->Atom`. För att låta calibre hämta flödena och konvertera dem till en e-bok, bör du högerklicka på knappen :guilabel:`Hämta nyheter` och sedan på menyalternativet :guilabel:`Lägg till en anpassad nyhetskälla` och sedan knappen :guilabel:`Nytt recept`. En dialogruta liknande den som visas nedan bör öppnas." #: ../../../__w/calibre/calibre/manual/news.rst:43 msgid "" "First enter ``Calibre Blog`` into the :guilabel:`Recipe title` field. This " "will be the title of the e-book that will be created from the articles in " "the above feeds." msgstr "Ange först ``Calibre Blog`` i fältet :guilabel:`Recepttitel`. Detta kommer att vara titeln på e-boken som kommer att skapas från artiklarna i ovanstående flöden." #: ../../../__w/calibre/calibre/manual/news.rst:45 msgid "" "The next two fields (:guilabel:`Oldest article` and :guilabel:`Max. number " "of articles`) allow you some control over how many articles should be " "downloaded from each feed, and they are pretty self explanatory." msgstr "Med de två följande fälten (:guilabel:`Äldsta artikel` och :guilabel:`Högst antal artiklar`) kan du i viss mån styra hur många artiklar som ska hämtas från varje flöde. Fälten är i stort sett självförklarande." #: ../../../__w/calibre/calibre/manual/news.rst:47 msgid "" "To add the feeds to the recipe, enter the feed title and the feed URL and " "click the :guilabel:`Add feed` button. Once you have added the feed, simply " "click the :guilabel:`Save` button and you're done! Close the dialog." msgstr "För att lägga till flöden till receptet, mata in flödestitel och flödes-URL:en och klicka på knappen :guilabel:`Lägg till flöde`. När du har lagt till flödet klickar du på knappen :guilabel:`Spara` och du är klar! Stäng dialogrutan." #: ../../../__w/calibre/calibre/manual/news.rst:51 msgid "" "To test your new :term:`recipe`, click the :guilabel:`Fetch news` button and" " in the :guilabel:`Custom news sources` sub-menu click :guilabel:`calibre " "Blog`. After a couple of minutes, the newly downloaded e-book of blog posts " "will appear in the main library view (if you have your reader connected, it " "will be put onto the reader instead of into the library). Select it and hit " "the :guilabel:`View` button to read!" msgstr "För att testa ditt nya :term:`recept` klickar du på knappen :guilabel:`Hämta nyheter` och sedan på :guilabel:`calibre Blog` i undermenyn :guilabel:`Anpassade nyhetskällor`. Efter ett par minuter visas den nyligen hämtade e-boken med blogginlägg i biblioteksvyn. Om läsenheten är ansluten läggs den i stället till på läsenheten. Markera den och klicka på knappen :guilabel:`Visa` för att läsa den." #: ../../../__w/calibre/calibre/manual/news.rst:53 msgid "" "The reason this worked so well, with so little effort is that the blog " "provides *full-content* :term:`RSS` feeds, i.e., the article content is " "embedded in the feed itself. For most news sources that provide news in this" " fashion, with *full-content* feeds, you don't need any more effort to " "convert them to e-books. Now we will look at a news source that does not " "provide full content feeds. In such feeds, the full article is a webpage and" " the feed only contains a link to the webpage with a short summary of the " "article." msgstr "Det fungerade så bra med så liten arbetsinsats eftersom bloggen tillhandahåller :term:`RSS`-flöden med *fullständigt innehåll*, det vill säga artikeltexten är inbäddad i själva flödet. För de flesta nyhetskällor som tillhandahåller sådana flöden behövs inget ytterligare arbete för att konvertera dem till e-böcker. Nu ska vi titta på en nyhetskälla som inte tillhandahåller flöden med fullständigt innehåll. I sådana flöden finns hela artikeln på en webbsida, medan flödet bara innehåller en länk till sidan och en kort sammanfattning av artikeln." #: ../../../__w/calibre/calibre/manual/news.rst:58 msgid "bbc.co.uk" msgstr "bbc.co.uk" #: ../../../__w/calibre/calibre/manual/news.rst:60 msgid "Let's try the following two feeds from *The BBC*:" msgstr "Låt oss testa följande två flöden från *BBC*:" #: ../../../__w/calibre/calibre/manual/news.rst:62 msgid "" "News Front Page: " "https://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml" msgstr "Nyheter framsida: https://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml" #: ../../../__w/calibre/calibre/manual/news.rst:63 msgid "" "Science/Nature: " "https://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml" msgstr "Vetenskap/Natur: https://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml" #: ../../../__w/calibre/calibre/manual/news.rst:65 msgid "" "Follow the procedure outlined in :ref:`calibre_blog` above to create a " "recipe for *The BBC* (using the feeds above). Looking at the downloaded " "e-book, we see that calibre has done a creditable job of extracting only the" " content you care about from each article's webpage. However, the extraction" " process is not perfect. Sometimes it leaves in undesirable content like " "menus and navigation aids or it removes content that should have been left " "alone, like article headings. In order, to have perfect content extraction, " "we will need to customize the fetch process, as described in the next " "section." msgstr "Följ proceduren i :ref:`calibre_blog` ovan för att skapa ett recept för *BBC* med flödena ovan. I den hämtade e-boken ser vi att calibre har lyckats ganska bra med att hämta ut enbart det relevanta innehållet från varje artikels webbsida. Processen är dock inte perfekt. Ibland lämnas oönskat innehåll kvar, till exempel menyer och navigeringshjälpmedel, eller så tas innehåll bort som borde ha behållits, till exempel artikelrubriker. För att få med exakt rätt innehåll behöver vi anpassa hämtningsprocessen enligt nästa avsnitt." #: ../../../__w/calibre/calibre/manual/news.rst:68 msgid "Customizing the fetch process" msgstr "Anpassa hämtningsprocessen" #: ../../../__w/calibre/calibre/manual/news.rst:70 msgid "" "When you want to perfect the download process, or download content from a " "particularly complex website, you can avail yourself of all the power and " "flexibility of the :term:`recipe` framework. In order to do that, in the " ":guilabel:`Add custom news sources` dialog, simply click the " ":guilabel:`Switch to Advanced mode` button." msgstr "När du vill finslipa hämtningsprocessen eller hämta innehåll från en särskilt komplex webbplats kan du använda alla möjligheter i ramverket för :term:`recept`. Klicka då på knappen :guilabel:`Växla till avancerat läge` i dialogrutan :guilabel:`Lägg till anpassade nyhetskällor`." #: ../../../__w/calibre/calibre/manual/news.rst:72 msgid "" "The easiest and often most productive customization is to use the print " "version of the online articles. The print version typically has much less " "cruft and translates much more smoothly to an e-book. Let's try to use the " "print version of the articles from *The BBC*." msgstr "Den enklaste och ofta mest effektiva anpassningen är att använda artiklarnas utskriftsversioner. De innehåller vanligtvis mycket mindre ovidkommande material och är lättare att konvertera till en e-bok. Låt oss försöka använda utskriftsversionerna av artiklarna från *BBC*." #: ../../../__w/calibre/calibre/manual/news.rst:75 msgid "Using the print version of bbc.co.uk" msgstr "Använda utskriftsversionen av bbc.co.uk" #: ../../../__w/calibre/calibre/manual/news.rst:77 msgid "" "The first step is to look at the e-book we downloaded previously from " ":ref:`bbc`. At the end of each article, in the e-book is a little blurb " "telling you where the article was downloaded from. Copy and paste that URL " "into a browser. Now on the article webpage look for a link that points to " "the \"Printable version\". Click it to see the print version of the article." " It looks much neater! Now compare the two URLs. For me they were:" msgstr "Det första steget är att titta på e-boken som vi tidigare hämtade från :ref:`bbc`. I slutet av varje artikel finns en kort text som anger varifrån artikeln hämtades. Kopiera URL:en och klistra in den i en webbläsare. Leta sedan efter en länk till \"Utskriftsversion\" på artikelns webbsida. Klicka på den för att visa artikelns utskriftsversion. Den ser mycket prydligare ut! Jämför nu de två URL:erna. För mig var de:" #: ../../../__w/calibre/calibre/manual/news.rst:79 msgid "Article URL" msgstr "Artikelns URL" #: ../../../__w/calibre/calibre/manual/news.rst:80 msgid "https://news.bbc.co.uk/2/hi/science/nature/7312016.stm" msgstr "https://news.bbc.co.uk/2/hi/science/nature/7312016.stm" #: ../../../__w/calibre/calibre/manual/news.rst:82 msgid "Print version URL" msgstr "Utskriftsversionens URL" #: ../../../__w/calibre/calibre/manual/news.rst:83 msgid "" "https://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/science/nature/7312016.stm" msgstr "https://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/science/nature/7312016.stm" #: ../../../__w/calibre/calibre/manual/news.rst:85 msgid "" "So it looks like to get the print version, we need to prefix every article " "URL with:" msgstr "För att hämta utskriftsversionen verkar vi alltså behöva lägga följande prefix framför varje artikeladress:" #: ../../../__w/calibre/calibre/manual/news.rst:87 msgid "newsvote.bbc.co.uk/mpapps/pagetools/print/" msgstr "newsvote.bbc.co.uk/mpapps/pagetools/print/" #: ../../../__w/calibre/calibre/manual/news.rst:89 msgid "" "Now in the :guilabel:`Advanced mode` of the Custom news sources dialog, you " "should see something like (remember to select *The BBC* recipe before " "switching to advanced mode):" msgstr "Nu i :guilabel:`Avancerat läge` i dialogrutan Anpassade nyhetskällor ska du se något liknande (kom ihåg att välja *BBC*-receptet innan du växlar till avancerat läge):" #: ../../../__w/calibre/calibre/manual/news.rst:94 msgid "" "You can see that the fields from the :guilabel:`Basic mode` have been " "translated to Python code in a straightforward manner. We need to add " "instructions to this recipe to use the print version of the articles. All " "that's needed is to add the following two lines:" msgstr "Du kan se att fälten från :guilabel:`Grundläge` har översatts till Python-kod på ett enkelt sätt. Vi måste lägga till instruktioner som får receptet att använda artiklarnas utskriftsversioner. Det enda som behövs är följande två rader:" #: ../../../__w/calibre/calibre/manual/news.rst:101 msgid "" "This is Python, so indentation is important. After you've added the lines, " "it should look like:" msgstr "Detta är Python, så indrag är viktigt. När du har lagt till raderna ska det se ut som:" #: ../../../__w/calibre/calibre/manual/news.rst:106 msgid "" "In the above, ``def print_version(self, url)`` defines a *method* that is " "called by calibre for every article. ``url`` is the URL of the original " "article. What ``print_version`` does is take that url and replace it with " "the new URL that points to the print version of the article. To learn about " "`Python `_ see the `tutorial " "`_." msgstr "I exemplet ovan definierar ``def print_version(self, url)`` en *metod* som calibre anropar för varje artikel. ``url`` är den ursprungliga artikelns URL. Metoden ``print_version`` tar denna URL och ersätter den med den nya URL som leder till artikelns utskriftsversion. Mer information om `Python `_ finns i `handledningen `_." #: ../../../__w/calibre/calibre/manual/news.rst:108 msgid "" "Now, click the :guilabel:`Add/update recipe` button and your changes will be" " saved. Re-download the e-book. You should have a much improved e-book. One " "of the problems with the new version is that the fonts on the print version " "webpage are too small. This is automatically fixed when converting to an " "e-book, but even after the fixing process, the font size of the menus and " "navigation bar become too large relative to the article text. To fix this, " "we will do some more customization, in the next section." msgstr "Nu klickar du på knappen :guilabel:`Lägg till/uppdatera recept` och dina ändringar sparas. Hämta e-boken igen. Du borde nu ha en mycket förbättrad e-bok. Ett av problemen med den nya versionen är att teckensnitten på utskriftsversionens webbplats är för små. Det här är automatiskt åtgärdat vid konvertering till en e-bok, men även efter justeringsprocessen blir teckensnittsstorleken på menyer och navigeringsfältet för stor i förhållande till artikeltexten. För att åtgärda det här, kommer vi att göra lite mer anpassning, i nästa avsnitt." #: ../../../__w/calibre/calibre/manual/news.rst:111 msgid "Replacing article styles" msgstr "Ersätta artiklarnas formatmallar" #: ../../../__w/calibre/calibre/manual/news.rst:113 msgid "" "In the previous section, we saw that the font size for articles from the " "print version of *The BBC* was too small. In most websites, *The BBC* " "included, this font size is set by means of :term:`CSS` stylesheets. We can " "disable the fetching of such stylesheets by adding the line::" msgstr "I föregående avsnitt såg vi att teckenstorleken i artiklar från utskriftsversionen av *BBC* var för liten. På de flesta webbplatser, inklusive *BBC*, anges teckenstorleken med hjälp av :term:`CSS`-formatmallar. Vi kan förhindra att sådana formatmallar hämtas genom att lägga till raden::" #: ../../../__w/calibre/calibre/manual/news.rst:119 msgid "The recipe now looks like:" msgstr "Receptet ser nu ut så här:" #: ../../../__w/calibre/calibre/manual/news.rst:124 msgid "" "The new version looks pretty good. If you're a perfectionist, you'll want to" " read the next section, which deals with actually modifying the downloaded " "content." msgstr "Den nya versionen ser ganska bra ut. Om du är perfektionist vill du nog läsa nästa avsnitt, som handlar om att ändra själva det hämtade innehållet." #: ../../../__w/calibre/calibre/manual/news.rst:127 msgid "Slicing and dicing" msgstr "Bearbeta innehållet" #: ../../../__w/calibre/calibre/manual/news.rst:129 msgid "" "calibre contains very powerful and flexible abilities when it comes to " "manipulating downloaded content. To show off a couple of these, let's look " "at our old friend the :ref:`The BBC ` recipe again. Looking at the " "source code (:term:`HTML`) of a couple of articles (print version), we see " "that they have a footer that contains no useful information, contained in" msgstr "calibre har kraftfulla och flexibla funktioner för att bearbeta hämtat innehåll. För att visa ett par av dem tittar vi återigen på receptet :ref:`BBC `. I källkoden (:term:`HTML`) för ett par artiklars utskriftsversioner ser vi en sidfot utan användbar information, innesluten i" #: ../../../__w/calibre/calibre/manual/news.rst:137 msgid "This can be removed by adding::" msgstr "Detta kan tas bort genom att lägga till::" #: ../../../__w/calibre/calibre/manual/news.rst:141 msgid "" "to the recipe. Finally, let's replace some of the :term:`CSS` that we " "disabled earlier, with our own :term:`CSS` that is suitable for conversion " "to an e-book::" msgstr "till receptet. Låt oss slutligen ersätta en del av :term:`CSS` som vi inaktiverade tidigare med vår egen :term:`CSS` som är lämplig för konvertering till en e-bok::" #: ../../../__w/calibre/calibre/manual/news.rst:145 msgid "With these additions, our recipe has become \"production quality\"." msgstr "Med dessa tillägg är vårt recept redo för praktisk användning." #: ../../../__w/calibre/calibre/manual/news.rst:147 msgid "" "This :term:`recipe` explores only the tip of the iceberg when it comes to " "the power of calibre. To explore more of the abilities of calibre we'll " "examine a more complex real life example in the next section." msgstr "Detta :term:`recept` visar bara en liten del av vad calibre kan göra. För att utforska fler av möjligheterna tittar vi på ett mer komplext exempel från verkligheten i nästa avsnitt." #: ../../../__w/calibre/calibre/manual/news.rst:150 msgid "Real life example" msgstr "Exempel i verkligheten" #: ../../../__w/calibre/calibre/manual/news.rst:152 msgid "" "A reasonably complex real life example that exposes more of the :term:`API` " "of ``BasicNewsRecipe`` is the :term:`recipe` for *The New York Times*" msgstr "Ett relativt komplext exempel från verkligheten som visar mer av :term:`API`:et för ``BasicNewsRecipe`` är :term:`receptet ` för *The New York Times*" #: ../../../__w/calibre/calibre/manual/news.rst:238 msgid "We see several new features in this :term:`recipe`. First, we have::" msgstr "Vi ser flera nya funktioner i detta :term:`recept`. Först har vi::" #: ../../../__w/calibre/calibre/manual/news.rst:242 msgid "" "This sets the displayed time on the front page of the created e-book to be " "in the format, ``Day, Day_Number Month, Year``. See :attr:`timefmt " "`." msgstr "Detta anger att tiden på den skapade e-bokens förstasida ska visas i formatet ``Dag, dagnummer månad, år``. Se :attr:`timefmt `." #: ../../../__w/calibre/calibre/manual/news.rst:245 msgid "" "Then we see a group of directives to cleanup the downloaded :term:`HTML`::" msgstr "Då ser vi en grupp direktiv för att rensa hämtad :term:`HTML`::" #: ../../../__w/calibre/calibre/manual/news.rst:251 msgid "" "These remove everything before the first ``

`` tag and everything after " "the first tag whose id is ``footer``. See :attr:`remove_tags " "`, " ":attr:`remove_tags_before " "`, " ":attr:`remove_tags_after " "`." msgstr "Dessa tar bort allt innan den första ``

``-taggen och allt efter den första taggen vars id är ``footer``. Se :attr:`remove_tags `, :attr:`remove_tags_before `, :attr:`remove_tags_after `." #: ../../../__w/calibre/calibre/manual/news.rst:253 msgid "The next interesting feature is::" msgstr "Nästa intressanta funktion är::" #: ../../../__w/calibre/calibre/manual/news.rst:260 msgid "" "``needs_subscription = True`` tells calibre that this recipe needs a " "username and password in order to access the content. This causes, calibre " "to ask for a username and password whenever you try to use this recipe. The " "code in :meth:`calibre.web.feeds.news.BasicNewsRecipe.get_browser` actually " "does the login into the NYT website. Once logged in, calibre will use the " "same, logged in, browser instance to fetch all content. See `mechanize " "`_ to understand the code in " "``get_browser``." msgstr "``needs_subscription = True`` berättar för calibre att detta recept behöver användarnamn och lösenord för att komma åt innehållet. Detta medför att calibre frågar efter användarnamn och lösenord när du försöker använda det här receptet. Koden i :meth:`calibre.web.feeds.news.BasicNewsRecipe.get_browser` loggar faktiskt in på NYT-webbplatsen. När du loggat in kommer calibre att använda samma webbläsarinstans för att hämta allt innehåll. Se `mechanize `_ för att förstå koden i ``get_browser``." #: ../../../__w/calibre/calibre/manual/news.rst:262 msgid "" "The next new feature is the " ":meth:`calibre.web.feeds.news.BasicNewsRecipe.parse_index` method. Its job " "is to go to https://www.nytimes.com/pages/todayspaper/index.html and fetch " "the list of articles that appear in *today's* paper. While more complex than" " simply using :term:`RSS`, the recipe creates an e-book that corresponds " "very closely to the day's paper. ``parse_index`` makes heavy use of " "`BeautifulSoup `_ to" " parse the daily paper webpage. You can also use other, more modern parsers " "if you dislike BeautifulSoup. calibre comes with `lxml `_ " "and `html5lib `_, which are the" " recommended parsers. To use them, replace the call to ``index_to_soup()`` " "with the following::" msgstr "Nästa nya funktion är metoden :meth:`calibre.web.feeds.news.BasicNewsRecipe.parse_index`. Den går till https://www.nytimes.com/pages/todayspaper/index.html och hämtar listan över artiklar i *dagens* tidning. Detta är mer komplicerat än att bara använda :term:`RSS`, men receptet skapar en e-bok som mycket nära motsvarar dagens tidning. ``parse_index`` använder `BeautifulSoup `_ i stor utsträckning för att tolka webbsidan med dagens tidning. Du kan också använda andra, modernare tolkar om du inte vill använda BeautifulSoup. calibre levereras med `lxml `_ och `html5lib `_, som är de rekommenderade tolkarna. Ersätt anropet till ``index_to_soup()`` med följande för att använda dem::" #: ../../../__w/calibre/calibre/manual/news.rst:283 msgid "" "The final new feature is the " ":meth:`calibre.web.feeds.news.BasicNewsRecipe.preprocess_html` method. It " "can be used to perform arbitrary transformations on every downloaded HTML " "page. Here it is used to bypass the ads that the nytimes shows you before " "each article." msgstr "Den sista nya funktionen är metoden :meth:`calibre.web.feeds.news.BasicNewsRecipe.preprocess_html`. Den kan användas för att utföra godtyckliga omvandlingar på varje hämtad HTML-sida. Här används den för att kringgå annonserna som nytimes visar före varje artikel." #: ../../../__w/calibre/calibre/manual/news.rst:286 msgid "Tips for developing new recipes" msgstr "Tips för att utveckla nya recept" #: ../../../__w/calibre/calibre/manual/news.rst:288 msgid "" "The best way to develop new recipes is to use the command line interface. " "Create the recipe using your favorite Python editor and save it to a file " "say :file:`myrecipe.recipe`. The `.recipe` extension is required. You can " "download content using this recipe with the command::" msgstr "Det bästa sättet att utveckla nya recept är att använda kommandoradsgränssnittet. Skapa receptet i den Python-redigerare du föredrar och spara det i en fil, till exempel :file:`myrecipe.recipe`. Filändelsen `.recipe` krävs. Du kan hämta innehåll med receptet med följande kommando::" #: ../../../__w/calibre/calibre/manual/news.rst:292 msgid "" "The command :command:`ebook-convert` will download all the webpages and save" " them to the EPUB file :file:`myrecipe.epub`. The ``-vv`` option makes " "ebook-convert spit out a lot of information about what it is doing. The " ":option:`ebook-convert-recipe-input --test` option makes it download only a " "couple of articles from at most two feeds. In addition, ebook-convert will " "put the downloaded HTML into the ``debug/input`` folder, where ``debug`` is " "the folder you specified in the :option:`ebook-convert --debug-pipeline` " "option." msgstr "Kommandot :command:`ebook-convert` hämtar alla webbsidor och sparar dem i EPUB-filen :file:`myrecipe.epub`. Flaggan ``-vv`` gör att ebook-convert skriver ut utförlig information om vad programmet gör. Flaggan :option:`ebook-convert-recipe-input --test` begränsar hämtningen till ett par artiklar från högst två flöden. Dessutom placerar ebook-convert den hämtade HTML-koden i mappen ``debug/input``, där ``debug`` är den mapp du angav med flaggan :option:`ebook-convert --debug-pipeline`." #: ../../../__w/calibre/calibre/manual/news.rst:300 msgid "" "Once the download is complete, you can look at the downloaded :term:`HTML` " "by opening the file :file:`debug/input/index.html` in a browser. Once you're" " satisfied that the download and preprocessing is happening correctly, you " "can generate e-books in different formats as shown below::" msgstr "När hämtningen är klar kan du titta på hämtad :term:`HTML` genom att öppna filen :file:`debug/input/index.html` i en webbläsare. När du är nöjd med att hämtningen och förbehandling sker korrekt kan du skapa e-böcker i olika format enligt nedan::" #: ../../../__w/calibre/calibre/manual/news.rst:307 msgid "" "If you're satisfied with your recipe, and you feel there is enough demand to" " justify its inclusion into the set of built-in recipes, post your recipe in" " the `calibre recipes forum " "`_ to share it " "with other calibre users." msgstr "Om du är nöjd med ditt recept och du känner att det finns tillräcklig efterfrågan för att motivera dess införande i uppsättningen av inbyggda recept, lägg upp ditt recept i `calibres receptforum `_ för att dela med andra calibre-användare." #: ../../../__w/calibre/calibre/manual/news.rst:310 msgid "" "On macOS, the command line tools are inside the calibre bundle, for example," " if you installed calibre in :file:`/Applications` the command line tools " "are in :file:`/Applications/calibre.app/Contents/MacOS/`." msgstr "I macOS finns kommandoradsverktygen inuti calibre-paketet. Om du till exempel installerade calibre i :file:`/Applications` finns verktygen i :file:`/Applications/calibre.app/Contents/MacOS/`." #: ../../../__w/calibre/calibre/manual/news.rst:316 msgid ":doc:`generated/en/ebook-convert`" msgstr ":doc:`generated/sv/ebook-convert`" #: ../../../__w/calibre/calibre/manual/news.rst:317 msgid "The command line interface for all e-book conversion." msgstr "Kommandoradsgränssnittet för all e-bokkonvertering." #: ../../../__w/calibre/calibre/manual/news.rst:321 msgid "Further reading" msgstr "Ytterligare läsning" #: ../../../__w/calibre/calibre/manual/news.rst:323 msgid "" "To learn more about writing advanced recipes using some of the facilities, " "available in ``BasicNewsRecipe`` you should consult the following sources:" msgstr "Om du vill veta mer om att skriva avancerade recept med funktionerna i ``BasicNewsRecipe`` kan du läsa följande källor:" #: ../../../__w/calibre/calibre/manual/news.rst:325 msgid ":ref:`API documentation `" msgstr ":ref:`API-dokumentation `" #: ../../../__w/calibre/calibre/manual/news.rst:326 msgid "" "Documentation of the ``BasicNewsRecipe`` class and all its important methods" " and fields." msgstr "Dokumentation av ``BasicNewsRecipe``-klassen och alla dess viktiga metoder och fält." #: ../../../__w/calibre/calibre/manual/news.rst:328 msgid "" "`BasicNewsRecipe " "`_" msgstr "`BasicNewsRecipe `_" #: ../../../__w/calibre/calibre/manual/news.rst:329 msgid "The source code of ``BasicNewsRecipe``" msgstr "Källkoden för ``BasicNewsRecipe``" #: ../../../__w/calibre/calibre/manual/news.rst:331 msgid "" "`Built-in recipes " "`_" msgstr "`Inbyggda recept `_" #: ../../../__w/calibre/calibre/manual/news.rst:332 msgid "The source code for the built-in recipes that come with calibre" msgstr "Källkoden för de inbyggda recept som kommer med calibre" #: ../../../__w/calibre/calibre/manual/news.rst:334 msgid "" "`The calibre recipes forum " "`_" msgstr "`calibre-receptforumet `_" #: ../../../__w/calibre/calibre/manual/news.rst:335 msgid "Lots of knowledgeable calibre recipe writers hang out here." msgstr "Här finns massor av kunniga receptförfattare för calibre." #: ../../../__w/calibre/calibre/manual/news.rst:339 msgid "API documentation" msgstr "API-dokumentation"