| 1 |
# SOME DESCRIPTIVE TITLE. |
| 2 |
# Copyright (C) Kovid Goyal |
| 3 |
# This file is distributed under the same license as the calibre package. |
| 4 |
# |
| 5 |
# Translators: |
| 6 |
# Anders Jonsson <[email protected]>, 2022 |
| 7 |
# Jonatan Nyberg, 2026 |
| 8 |
# efef6ec5b435a041fce803c7f8af77d2_2341d43, 2018 |
| 9 |
# Jonatan Nyberg, 2026 |
| 10 |
# Jonatan Nyberg, 2016-2017,2021-2026 |
| 11 |
# Jonatan Nyberg, 2018-2021 |
| 12 |
# efef6ec5b435a041fce803c7f8af77d2_2341d43, 2018 |
| 13 |
# Karl Jonatan Nyberg, 2026 |
| 14 |
# Jonatan Nyberg, 2026 |
| 15 |
# Merarom <[email protected]>, 2014-2017 |
| 16 |
# Sebastian Rasmussen <[email protected]>, 2018 |
| 17 |
msgid "" |
| 18 |
msgstr "" |
| 19 |
"Project-Id-Version: calibre\n" |
| 20 |
"Report-Msgid-Bugs-To: \n" |
| 21 |
"POT-Creation-Date: 2026-08-06 04:29+0000\n" |
| 22 |
"PO-Revision-Date: 2014-06-17 08:34+0000\n" |
| 23 |
"Last-Translator: Sebastian Rasmussen <[email protected]>, 2018\n" |
| 24 |
"Language-Team: Swedish (http://app.transifex.com/calibre/calibre/language/sv/)\n" |
| 25 |
"MIME-Version: 1.0\n" |
| 26 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 27 |
"Content-Transfer-Encoding: 8bit\n" |
| 28 |
"Language: sv\n" |
| 29 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
| 30 |
|
| 31 |
#: ../../../__w/calibre/calibre/manual/develop.rst:4 |
| 32 |
msgid "Setting up a calibre development environment" |
| 33 |
msgstr "Konfigurera en utvecklingsmiljö för calibre" |
| 34 |
|
| 35 |
#: ../../../__w/calibre/calibre/manual/develop.rst:6 |
| 36 |
msgid "" |
| 37 |
"calibre is completely open source, licensed under the `GNU GPL v3 " |
| 38 |
"<https://www.gnu.org/licenses/gpl.html>`_. This means that you are free to " |
| 39 |
"download and modify the program to your heart's content. In this section, " |
| 40 |
"you will learn how to get a calibre development environment set up on the " |
| 41 |
"operating system of your choice. calibre is written primarily in `Python " |
| 42 |
"<https://www.python.org>`_ with some C/C++ code for speed and system " |
| 43 |
"interfacing. Note that calibre requires at least Python 3.8." |
| 44 |
msgstr "calibre har helt öppen källkod och är licensierat under `GNU GPL v3 <https://www.gnu.org/licenses/gpl.html>`_. Det innebär att du fritt kan hämta och ändra programmet så mycket du vill. I det här avsnittet får du lära dig hur du konfigurerar en utvecklingsmiljö för calibre på valfritt operativsystem. calibre är huvudsakligen skrivet i `Python <https://www.python.org>`_, med viss C/C++-kod för bättre prestanda och systemintegration. Observera att calibre kräver minst Python 3.8." |
| 45 |
|
| 46 |
#: ../../../__w/calibre/calibre/manual/develop.rst:14 |
| 47 |
msgid "Contents" |
| 48 |
msgstr "Innehåll" |
| 49 |
|
| 50 |
#: ../../../__w/calibre/calibre/manual/develop.rst:17 |
| 51 |
msgid "Design philosophy" |
| 52 |
msgstr "Designfilosofi" |
| 53 |
|
| 54 |
#: ../../../__w/calibre/calibre/manual/develop.rst:19 |
| 55 |
msgid "" |
| 56 |
"calibre has its roots in the Unix world, which means that its design is " |
| 57 |
"highly modular. The modules interact with each other via well defined " |
| 58 |
"interfaces. This makes adding new features and fixing bugs in calibre very " |
| 59 |
"easy, resulting in a frenetic pace of development. Because of its roots, " |
| 60 |
"calibre has a comprehensive command line interface for all its functions, " |
| 61 |
"documented in :doc:`generated/en/cli-index`." |
| 62 |
msgstr "calibre har sina rötter i Unix-världen, vilket innebär att dess design är mycket modulär. Modulerna samverkar via väldefinierade gränssnitt. Det gör det mycket enkelt att lägga till nya funktioner och rätta fel i calibre, vilket ger en snabb utvecklingstakt. Tack vare sina rötter har calibre ett omfattande kommandoradsgränssnitt för samtliga funktioner, dokumenterat i :doc:`generated/sv/cli-index`." |
| 63 |
|
| 64 |
#: ../../../__w/calibre/calibre/manual/develop.rst:24 |
| 65 |
msgid "" |
| 66 |
"The modular design of calibre is expressed via ``Plugins``. There is a " |
| 67 |
":ref:`tutorial <customize>` on writing calibre plugins. For example, adding " |
| 68 |
"support for a new device to calibre typically involves writing fewer than " |
| 69 |
"100 lines of code in the form of a device driver plugin. You can browse the " |
| 70 |
"`built-in drivers " |
| 71 |
"<https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. " |
| 72 |
"Similarly, adding support for new conversion formats involves writing " |
| 73 |
"input/output format plugins. Another example of the modular design is the " |
| 74 |
":ref:`recipe system <news>` for fetching news. For more examples of plugins " |
| 75 |
"designed to add features to calibre, see the `Index of plugins " |
| 76 |
"<https://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_." |
| 77 |
msgstr "calibres modulära design bygger på ``insticksmoduler``. Det finns en :ref:`handledning <customize>` om hur du skriver insticksmoduler för calibre. Att lägga till stöd för en ny enhet kräver till exempel vanligtvis färre än 100 rader kod i form av en insticksmodul för enhetsdrivrutinen. Du kan bläddra bland de `inbyggda drivrutinerna <https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. På motsvarande sätt lägger du till stöd för nya konverteringsformat genom att skriva insticksmoduler för in- och utmatningsformat. Ett annat exempel på den modulära designen är :ref:`receptsystemet <news>` för att hämta nyheter. Fler exempel på insticksmoduler som lägger till funktioner i calibre finns i `indexet över insticksmoduler <https://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_." |
| 78 |
|
| 79 |
#: ../../../__w/calibre/calibre/manual/develop.rst:34 |
| 80 |
msgid "Code layout" |
| 81 |
msgstr "Kodstruktur" |
| 82 |
|
| 83 |
#: ../../../__w/calibre/calibre/manual/develop.rst:36 |
| 84 |
msgid "" |
| 85 |
"All the calibre Python code is in the ``calibre`` package. This package " |
| 86 |
"contains the following main sub-packages" |
| 87 |
msgstr "All Python-kod i calibre finns i paketet ``calibre``. Paketet innehåller följande huvudsakliga underpaket" |
| 88 |
|
| 89 |
#: ../../../__w/calibre/calibre/manual/develop.rst:38 |
| 90 |
msgid "" |
| 91 |
"devices - All the device drivers. Just look through some of the built-in " |
| 92 |
"drivers to get an idea for how they work." |
| 93 |
msgstr "devices – Alla enhetsdrivrutiner. Titta igenom några av de inbyggda drivrutinerna för att få en uppfattning om hur de fungerar." |
| 94 |
|
| 95 |
#: ../../../__w/calibre/calibre/manual/develop.rst:40 |
| 96 |
msgid "" |
| 97 |
"For details, see: ``devices.interface`` which defines the interface " |
| 98 |
"supported by device drivers and ``devices.usbms`` which defines a generic " |
| 99 |
"driver that connects to a USBMS device. All USBMS based drivers in calibre " |
| 100 |
"inherit from it." |
| 101 |
msgstr "Mer information finns i ``devices.interface``, som definierar gränssnittet som enhetsdrivrutiner stöder, och ``devices.usbms``, som definierar en allmän drivrutin för anslutning till en USBMS-enhet. Alla USBMS-baserade drivrutiner i calibre ärver från den." |
| 102 |
|
| 103 |
#: ../../../__w/calibre/calibre/manual/develop.rst:43 |
| 104 |
msgid "" |
| 105 |
"e-books - All the e-book conversion/metadata code. A good starting point is" |
| 106 |
" ``calibre.ebooks.conversion.cli`` which is the module powering the " |
| 107 |
":command:`ebook-convert` command. The conversion process is controlled via " |
| 108 |
"``conversion.plumber``. The format independent code is all in ``ebooks.oeb``" |
| 109 |
" and the format dependent code is in ``ebooks.format_name``." |
| 110 |
msgstr "e-books – All kod för e-bokskonvertering och metadata. En bra utgångspunkt är ``calibre.ebooks.conversion.cli``, modulen som driver kommandot :command:`ebook-convert`. Konverteringsprocessen styrs via ``conversion.plumber``. All formatoberoende kod finns i ``ebooks.oeb`` och den formatberoende koden i ``ebooks.format_name``." |
| 111 |
|
| 112 |
#: ../../../__w/calibre/calibre/manual/develop.rst:47 |
| 113 |
msgid "" |
| 114 |
"Metadata reading, writing, and downloading is all in ``ebooks.metadata``" |
| 115 |
msgstr "All läsning, skrivning och hämtning av metadata finns i ``ebooks.metadata``" |
| 116 |
|
| 117 |
#: ../../../__w/calibre/calibre/manual/develop.rst:48 |
| 118 |
msgid "" |
| 119 |
"Conversion happens in a pipeline, for the structure of the pipeline, see " |
| 120 |
":ref:`conversion-introduction`. The pipeline consists of an input plugin, " |
| 121 |
"various transforms and an output plugin. The code that constructs and drives" |
| 122 |
" the pipeline is in :file:`plumber.py`. The pipeline works on a " |
| 123 |
"representation of an e-book that is like an unzipped epub, with manifest, " |
| 124 |
"spine, toc, guide, html content, etc. The class that manages this " |
| 125 |
"representation is OEBBook in ``ebooks.oeb.base``. The various " |
| 126 |
"transformations that are applied to the book during conversions live in " |
| 127 |
":file:`oeb/transforms/*.py`. And the input and output plugins live in " |
| 128 |
":file:`conversion/plugins/*.py`." |
| 129 |
msgstr "Konverteringen sker i en bearbetningskedja. Information om kedjans struktur finns i :ref:`conversion-introduction`. Kedjan består av en insticksmodul för inmatning, olika omvandlingar och en insticksmodul för utmatning. Koden som bygger upp och driver kedjan finns i :file:`plumber.py`. Kedjan arbetar med en representation av en e-bok som liknar en uppackad EPUB, med manifest, läsordning, innehållsförteckning, guide, HTML-innehåll och så vidare. Klassen som hanterar representationen är OEBBook i ``ebooks.oeb.base``. De olika omvandlingarna som tillämpas på boken under konverteringen finns i :file:`oeb/transforms/*.py`. Insticksmodulerna för in- och utmatning finns i :file:`conversion/plugins/*.py`." |
| 130 |
|
| 131 |
#: ../../../__w/calibre/calibre/manual/develop.rst:58 |
| 132 |
msgid "" |
| 133 |
"E-book editing happens using a different container object. It is documented " |
| 134 |
"in :ref:`polish_api`." |
| 135 |
msgstr "E-boksredigering använder ett annat behållarobjekt. Det dokumenteras i :ref:`polish_api`." |
| 136 |
|
| 137 |
#: ../../../__w/calibre/calibre/manual/develop.rst:61 |
| 138 |
msgid "" |
| 139 |
"db - The database back-end. See :ref:`db_api` for the interface to the " |
| 140 |
"calibre library." |
| 141 |
msgstr "db - Databasens backend. Se :ref:`db_api` för gränssnittet till calibre-biblioteket." |
| 142 |
|
| 143 |
#: ../../../__w/calibre/calibre/manual/develop.rst:63 |
| 144 |
msgid "Content server: ``srv`` is the calibre Content server." |
| 145 |
msgstr "Innehållsserver: ``srv`` är calibre-innehållsservern." |
| 146 |
|
| 147 |
#: ../../../__w/calibre/calibre/manual/develop.rst:65 |
| 148 |
msgid "" |
| 149 |
"gui2 - The Graphical User Interface. GUI initialization happens in " |
| 150 |
"``gui2.main`` and ``gui2.ui``. The e-book-viewer is in ``gui2.viewer``. The " |
| 151 |
"e-book editor is in ``gui2.tweak_book``." |
| 152 |
msgstr "gui2 – Det grafiska användargränssnittet. Gränssnittet initieras i ``gui2.main`` och ``gui2.ui``. E-bokvisaren finns i ``gui2.viewer``. E-bokredigeraren finns i ``gui2.tweak_book``." |
| 153 |
|
| 154 |
#: ../../../__w/calibre/calibre/manual/develop.rst:67 |
| 155 |
msgid "" |
| 156 |
"If you want to locate the entry points for all the various calibre " |
| 157 |
"executables, look at the ``entry_points`` structure in `linux.py " |
| 158 |
"<https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_." |
| 159 |
msgstr "Om du vill hitta startpunkterna för de olika körbara calibre-programmen, titta på strukturen ``entry_points`` i `linux.py <https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_." |
| 160 |
|
| 161 |
#: ../../../__w/calibre/calibre/manual/develop.rst:71 |
| 162 |
msgid "" |
| 163 |
"If you need help understanding the code, post in the `development forum " |
| 164 |
"<https://www.mobileread.com/forums/forumdisplay.php?f=240>`_ and you will " |
| 165 |
"most likely get help from one of calibre's many developers." |
| 166 |
msgstr "Om du behöver hjälp med att förstå koden kan du göra ett inlägg i `utvecklingsforumet <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Du får sannolikt hjälp av någon av calibres många utvecklare." |
| 167 |
|
| 168 |
#: ../../../__w/calibre/calibre/manual/develop.rst:75 |
| 169 |
msgid "Getting the code" |
| 170 |
msgstr "Hämta koden" |
| 171 |
|
| 172 |
#: ../../../__w/calibre/calibre/manual/develop.rst:77 |
| 173 |
msgid "" |
| 174 |
"You can get the calibre source code in two ways, using a version control " |
| 175 |
"system or directly downloading a :website_base:`tarball <dist/src>`." |
| 176 |
msgstr "Du kan hämta calibres källkod på två sätt: med ett versionshanteringssystem eller genom att hämta ett :website_base:`tar-arkiv <dist/src>` direkt." |
| 177 |
|
| 178 |
#: ../../../__w/calibre/calibre/manual/develop.rst:80 |
| 179 |
msgid "" |
| 180 |
"calibre uses `Git <https://www.git-scm.com/>`_, a distributed version " |
| 181 |
"control system. Git is available on all the platforms calibre supports. " |
| 182 |
"After installing Git, you can get the calibre source code with the command::" |
| 183 |
msgstr "calibre använder `Git <https://www.git-scm.com/>`_, ett distribuerat versionshanteringssystem. Git är tillgänglig på alla plattformar som calibre stöder. När du har installerat Git kan du få calibre-källkoden med kommandot::" |
| 184 |
|
| 185 |
#: ../../../__w/calibre/calibre/manual/develop.rst:86 |
| 186 |
msgid "" |
| 187 |
"On Windows you will need the complete path name, that will be something like" |
| 188 |
" :file:`C:\\\\Program Files\\\\Git\\\\git.exe`." |
| 189 |
msgstr "I Windows behöver du det fullständiga sökvägsnamnet som kommer att vara något i stil med :file:`C:\\\\Program Files\\\\Git\\\\git.exe`." |
| 190 |
|
| 191 |
#: ../../../__w/calibre/calibre/manual/develop.rst:88 |
| 192 |
msgid "" |
| 193 |
"calibre is a very large project with a very long source control history, so " |
| 194 |
"the above can take a while (10 mins to an hour depending on your internet " |
| 195 |
"speed)." |
| 196 |
msgstr "calibre är ett mycket stort projekt med en mycket lång versionshanteringshistorik, så kommandot ovan kan ta en stund, från 10 minuter till en timme beroende på din internethastighet." |
| 197 |
|
| 198 |
#: ../../../__w/calibre/calibre/manual/develop.rst:91 |
| 199 |
msgid "" |
| 200 |
"If you want to get the code faster, the source code for the latest release " |
| 201 |
"is always available as an :website_base:`archive <dist/src>`." |
| 202 |
msgstr "Om du vill hämta koden snabbare är källkoden för den senaste utgåvan alltid tillgänglig som ett :website_base:`arkiv <dist/src>`." |
| 203 |
|
| 204 |
#: ../../../__w/calibre/calibre/manual/develop.rst:94 |
| 205 |
msgid "To update a branch to the latest code, use the command::" |
| 206 |
msgstr "Använd följande kommando för att uppdatera en gren till den senaste koden::" |
| 207 |
|
| 208 |
#: ../../../__w/calibre/calibre/manual/develop.rst:98 |
| 209 |
msgid "" |
| 210 |
"You can also browse the code at `GitHub " |
| 211 |
"<https://github.com/kovidgoyal/calibre>`_." |
| 212 |
msgstr "Du kan också se koden på `GitHub <https://github.com/kovidgoyal/calibre>`_." |
| 213 |
|
| 214 |
#: ../../../__w/calibre/calibre/manual/develop.rst:101 |
| 215 |
msgid "Submitting your changes to be included" |
| 216 |
msgstr "Skicka in ändringar för införande" |
| 217 |
|
| 218 |
#: ../../../__w/calibre/calibre/manual/develop.rst:103 |
| 219 |
msgid "" |
| 220 |
"If you only plan to make a few small changes, you can make your changes and " |
| 221 |
"create a \"merge directive\" which you can then attach to a ticket in the " |
| 222 |
"calibre `bug tracker <https://bugs.launchpad.net/calibre>`_. To do this, " |
| 223 |
"make your changes, then run::" |
| 224 |
msgstr "Om du bara planerar att göra några mindre ändringar kan du genomföra dem och skapa ett ”merge directive” som du sedan bifogar till ett ärende i calibres `felrapporteringssystem <https://bugs.launchpad.net/calibre>`_. Gör ändringarna och kör sedan::" |
| 225 |
|
| 226 |
#: ../../../__w/calibre/calibre/manual/develop.rst:111 |
| 227 |
msgid "" |
| 228 |
"This will create a :file:`my-changes` file in the current folder, simply " |
| 229 |
"attach that to a ticket on the calibre `bug tracker " |
| 230 |
"<https://bugs.launchpad.net/calibre>`_. Note that this will include *all* " |
| 231 |
"the commits you have made. If you only want to send some commits, you have " |
| 232 |
"to change ``origin/master`` above. To send only the last commit, use::" |
| 233 |
msgstr "Det skapar filen :file:`my-changes` i den aktuella mappen. Bifoga den till ett ärende i calibres `felrapporteringssystem <https://bugs.launchpad.net/calibre>`_. Observera att filen innehåller *alla* incheckningar du har gjort. Om du bara vill skicka vissa incheckningar måste du ändra ``origin/master`` ovan. Använd följande för att endast skicka den senaste incheckningen::" |
| 234 |
|
| 235 |
#: ../../../__w/calibre/calibre/manual/develop.rst:119 |
| 236 |
msgid "" |
| 237 |
"To send the last *n* commits, replace *1* with *n*, for example, for the " |
| 238 |
"last 3 commits::" |
| 239 |
msgstr "Om du vill skicka de senaste *n* incheckningarna ersätter du *1* med *n*. För de senaste tre incheckningarna använder du till exempel::" |
| 240 |
|
| 241 |
#: ../../../__w/calibre/calibre/manual/develop.rst:124 |
| 242 |
msgid "Be careful to not include merges when using ``HEAD~n``." |
| 243 |
msgstr "Var noga med att inte inkludera sammanslagningar när du använder ``HEAD~n``." |
| 244 |
|
| 245 |
#: ../../../__w/calibre/calibre/manual/develop.rst:126 |
| 246 |
msgid "" |
| 247 |
"If you plan to do a lot of development on calibre, then the best method is " |
| 248 |
"to create a `GitHub <https://github.com>`__ account. Below is a basic guide " |
| 249 |
"to setting up your own fork of calibre in a way that will allow you to " |
| 250 |
"submit pull requests for inclusion into the main calibre repository:" |
| 251 |
msgstr "Om du planerar att utveckla mycket för calibre är den bästa metoden att skapa ett konto på `GitHub <https://github.com>`__. Nedan följer en grundläggande guide för hur du skapar en egen förgrening av calibre så att du kan skicka pull-begäranden för införande i calibres huvudförråd:" |
| 252 |
|
| 253 |
#: ../../../__w/calibre/calibre/manual/develop.rst:131 |
| 254 |
msgid "" |
| 255 |
"Setup git on your machine as described in this article: `Setup Git " |
| 256 |
"<https://help.github.com/articles/set-up-git>`_" |
| 257 |
msgstr "Konfigurera Git på datorn enligt artikeln `Konfigurera Git <https://help.github.com/articles/set-up-git>`_" |
| 258 |
|
| 259 |
#: ../../../__w/calibre/calibre/manual/develop.rst:132 |
| 260 |
msgid "" |
| 261 |
"Setup ssh keys for authentication to GitHub, as described here: `Generating " |
| 262 |
"SSH keys <https://help.github.com/articles/generating-ssh-keys>`_" |
| 263 |
msgstr "Konfigurera SSH-nycklar för autentisering mot GitHub enligt anvisningarna här: `Skapa SSH-nycklar <https://help.github.com/articles/generating-ssh-keys>`_" |
| 264 |
|
| 265 |
#: ../../../__w/calibre/calibre/manual/develop.rst:133 |
| 266 |
msgid "" |
| 267 |
"Go to https://github.com/kovidgoyal/calibre and click the :guilabel:`Fork` " |
| 268 |
"button." |
| 269 |
msgstr "Gå till https://github.com/kovidgoyal/calibre och klicka på knappen :guilabel:`Fork`." |
| 270 |
|
| 271 |
#: ../../../__w/calibre/calibre/manual/develop.rst:134 |
| 272 |
msgid "In a Terminal do::" |
| 273 |
msgstr "Kör följande i en terminal::" |
| 274 |
|
| 275 |
#: ../../../__w/calibre/calibre/manual/develop.rst:139 |
| 276 |
msgid "" |
| 277 |
"Replace <username> above with your GitHub username. That will get your fork " |
| 278 |
"checked out locally." |
| 279 |
msgstr "Ersätt <username> ovan med ditt användarnamn på GitHub. Din förgrening checkas då ut lokalt." |
| 280 |
|
| 281 |
#: ../../../__w/calibre/calibre/manual/develop.rst:140 |
| 282 |
msgid "" |
| 283 |
"You can make changes and commit them whenever you like. When you are ready " |
| 284 |
"to have your work merged, do a::" |
| 285 |
msgstr "Du kan göra ändringar och checka in dem när du vill. När du är redo att få arbetet sammanslaget kör du::" |
| 286 |
|
| 287 |
#: ../../../__w/calibre/calibre/manual/develop.rst:144 |
| 288 |
msgid "" |
| 289 |
"and go to ``https://github.com/<username>/calibre`` and click the " |
| 290 |
":guilabel:`Pull Request` button to generate a pull request that can be " |
| 291 |
"merged." |
| 292 |
msgstr "Gå sedan till ``https://github.com/<username>/calibre`` och klicka på knappen :guilabel:`Pull Request` för att skapa en pull-begäran som kan slås samman." |
| 293 |
|
| 294 |
#: ../../../__w/calibre/calibre/manual/develop.rst:145 |
| 295 |
msgid "" |
| 296 |
"You can update your local copy with code from the main repo at any time by " |
| 297 |
"doing::" |
| 298 |
msgstr "Du kan när som helst uppdatera din lokala kopia med kod från huvudförrådet genom att köra::" |
| 299 |
|
| 300 |
#: ../../../__w/calibre/calibre/manual/develop.rst:150 |
| 301 |
msgid "" |
| 302 |
"You should also keep an eye on the calibre `development forum " |
| 303 |
"<https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Before making " |
| 304 |
"major changes, you should discuss them in the forum or contact Kovid " |
| 305 |
"directly (his email address is all over the source code)." |
| 306 |
msgstr "Du bör också hålla ett öga på calibres `utvecklingsforum <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Innan du gör större ändringar bör du diskutera dem i forumet eller kontakta Kovid direkt. Hans e-postadress finns på många ställen i källkoden." |
| 307 |
|
| 308 |
#: ../../../__w/calibre/calibre/manual/develop.rst:156 |
| 309 |
msgid "Windows development environment" |
| 310 |
msgstr "Windows-utvecklingsmiljö" |
| 311 |
|
| 312 |
#: ../../../__w/calibre/calibre/manual/develop.rst:158 |
| 313 |
#: ../../../__w/calibre/calibre/manual/develop.rst:192 |
| 314 |
#: ../../../__w/calibre/calibre/manual/develop.rst:229 |
| 315 |
msgid "" |
| 316 |
"You must also get the calibre source code separately as described above." |
| 317 |
msgstr "Du måste också hämta calibre-källkoden separat enligt beskrivningen ovan." |
| 318 |
|
| 319 |
#: ../../../__w/calibre/calibre/manual/develop.rst:160 |
| 320 |
msgid "" |
| 321 |
"Install calibre normally, using the `Windows installer <https://calibre-" |
| 322 |
"ebook.com/download_windows>`__. Then open a Command Prompt and change to the" |
| 323 |
" previously checked out calibre code folder. For example::" |
| 324 |
msgstr "Installera calibre på vanligt sätt med `installationsprogrammet för Windows <https://calibre-ebook.com/download_windows>`__. Öppna sedan en kommandotolk och växla till den tidigare utcheckade mappen med calibre-koden. Till exempel::" |
| 325 |
|
| 326 |
#: ../../../__w/calibre/calibre/manual/develop.rst:165 |
| 327 |
#: ../../../__w/calibre/calibre/manual/develop.rst:241 |
| 328 |
msgid "calibre is the folder that contains the src and resources sub-folders." |
| 329 |
msgstr "calibre är mappen som innehåller undermapparna src och resources." |
| 330 |
|
| 331 |
#: ../../../__w/calibre/calibre/manual/develop.rst:167 |
| 332 |
msgid "" |
| 333 |
"The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to" |
| 334 |
" the absolute path of the src folder. So, following the example above, it " |
| 335 |
"would be ``C:\\Users\\kovid\\work\\calibre\\src``. `Here is a short guide " |
| 336 |
"<https://docs.python.org/using/windows.html#excursus-setting-environment-" |
| 337 |
"variables>`_ to setting environment variables on Windows." |
| 338 |
msgstr "Nästa steg är att ställa in miljövariabeln ``CALIBRE_DEVELOP_FROM`` på den absoluta sökvägen till mappen src. I exemplet ovan blir det ``C:\\Users\\kovid\\work\\calibre\\src``. `Här finns en kort guide <https://docs.python.org/using/windows.html#excursus-setting-environment-variables>`_ till hur du ställer in miljövariabler i Windows." |
| 339 |
|
| 340 |
#: ../../../__w/calibre/calibre/manual/develop.rst:172 |
| 341 |
msgid "" |
| 342 |
"Once you have set the environment variable, open a new command prompt and " |
| 343 |
"check that it was correctly set by using the command::" |
| 344 |
msgstr "När du har ställt in miljövariabeln öppnar du en ny kommandotolk och kontrollerar med följande kommando att den är korrekt inställd::" |
| 345 |
|
| 346 |
#: ../../../__w/calibre/calibre/manual/develop.rst:177 |
| 347 |
#: ../../../__w/calibre/calibre/manual/develop.rst:260 |
| 348 |
msgid "" |
| 349 |
"Setting this environment variable means that calibre will now load all its " |
| 350 |
"Python code from the specified location." |
| 351 |
msgstr "När den här miljövariabeln ställs in läser calibre in all sin Python-kod från den angivna platsen." |
| 352 |
|
| 353 |
#: ../../../__w/calibre/calibre/manual/develop.rst:179 |
| 354 |
msgid "" |
| 355 |
"That's it! You are now ready to start hacking on the calibre code. For " |
| 356 |
"example, open the file :file:`src\\\\calibre\\\\__init__.py` in your " |
| 357 |
"favorite editor and add the line::" |
| 358 |
msgstr "Klart! Nu kan du börja arbeta med calibre-koden. Öppna till exempel filen :file:`src\\\\calibre\\\\__init__.py` i din favoritredigerare och lägg till raden::" |
| 359 |
|
| 360 |
#: ../../../__w/calibre/calibre/manual/develop.rst:184 |
| 361 |
#: ../../../__w/calibre/calibre/manual/develop.rst:267 |
| 362 |
msgid "" |
| 363 |
"near the top of the file. Now run the command :command:`calibredb`. The very" |
| 364 |
" first line of output should be ``Hello, world!``." |
| 365 |
msgstr "nära början av filen. Kör sedan kommandot :command:`calibredb`. Den första utdataraden ska vara ``Hello, world!``." |
| 366 |
|
| 367 |
#: ../../../__w/calibre/calibre/manual/develop.rst:186 |
| 368 |
msgid "" |
| 369 |
"You can also setup a calibre development environment inside the free " |
| 370 |
"Microsoft Visual Studio, if you like, following the instructions `here " |
| 371 |
"<https://www.mobileread.com/forums/showthread.php?t=251201>`_." |
| 372 |
msgstr "Du kan också konfigurera en utvecklingsmiljö för calibre i kostnadsfria Microsoft Visual Studio genom att följa anvisningarna `här <https://www.mobileread.com/forums/showthread.php?t=251201>`_." |
| 373 |
|
| 374 |
#: ../../../__w/calibre/calibre/manual/develop.rst:190 |
| 375 |
msgid "macOS development environment" |
| 376 |
msgstr "macOS-utvecklingsmiljö" |
| 377 |
|
| 378 |
#: ../../../__w/calibre/calibre/manual/develop.rst:194 |
| 379 |
msgid "" |
| 380 |
"Install calibre normally using the `provided .dmg <https://calibre-" |
| 381 |
"ebook.com/download_osx>`__. Then open a Terminal and change to the " |
| 382 |
"previously checked out calibre code folder, for example::" |
| 383 |
msgstr "Installera calibre på vanligt sätt med den `medföljande DMG-filen <https://calibre-ebook.com/download_osx>`__. Öppna sedan Terminal och växla till den tidigare utcheckade mappen med calibre-koden, till exempel::" |
| 384 |
|
| 385 |
#: ../../../__w/calibre/calibre/manual/develop.rst:199 |
| 386 |
msgid "" |
| 387 |
"calibre is the folder that contains the src and resources sub-folders. The " |
| 388 |
"calibre command line tools are found inside the calibre app bundle, in " |
| 389 |
":file:`/Applications/calibre.app/Contents/MacOS` you should add this folder " |
| 390 |
"to your PATH environment variable, if you want to run the command line tools" |
| 391 |
" easily." |
| 392 |
msgstr "calibre är mappen som innehåller undermapparna src och resources. Calibres kommandoradsverktyg finns i calibre-appens paket, i :file:`/Applications/calibre.app/Contents/MacOS`. Lägg till den mappen i miljövariabeln PATH om du enkelt vill kunna köra kommandoradsverktygen." |
| 393 |
|
| 394 |
#: ../../../__w/calibre/calibre/manual/develop.rst:205 |
| 395 |
msgid "" |
| 396 |
"The next step is to create a bash script that will set the environment " |
| 397 |
"variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src folder " |
| 398 |
"when running calibre in debug mode." |
| 399 |
msgstr "Nästa steg är att skapa ett bash-skript som ställer in miljövariabeln ``CALIBRE_DEVELOP_FROM`` på den absoluta sökvägen till mappen src när calibre körs i felsökningsläge." |
| 400 |
|
| 401 |
#: ../../../__w/calibre/calibre/manual/develop.rst:208 |
| 402 |
msgid "Create a plain text file::" |
| 403 |
msgstr "Skapa en vanlig textfil::" |
| 404 |
|
| 405 |
#: ../../../__w/calibre/calibre/manual/develop.rst:214 |
| 406 |
msgid "" |
| 407 |
"Save this file as :file:`/usr/local/bin/calibre-develop`, then set its " |
| 408 |
"permissions so that it can be executed::" |
| 409 |
msgstr "Spara den här filen som :file:`/usr/local/bin/calibre-develop` och ställ sedan in dess behörigheter så att den kan köras::" |
| 410 |
|
| 411 |
#: ../../../__w/calibre/calibre/manual/develop.rst:218 |
| 412 |
msgid "Once you have done this, run::" |
| 413 |
msgstr "När du har gjort detta, kör::" |
| 414 |
|
| 415 |
#: ../../../__w/calibre/calibre/manual/develop.rst:222 |
| 416 |
msgid "" |
| 417 |
"You should see some diagnostic information in the Terminal window as calibre" |
| 418 |
" starts up, and you should see an asterisk after the version number in the " |
| 419 |
"GUI window, indicating that you are running from source." |
| 420 |
msgstr "När calibre startar bör du se diagnostisk information i terminalfönstret och en asterisk efter versionsnumret i GUI-fönstret. Asterisken visar att du kör från källkoden." |
| 421 |
|
| 422 |
#: ../../../__w/calibre/calibre/manual/develop.rst:227 |
| 423 |
msgid "Linux development environment" |
| 424 |
msgstr "Linux-utvecklingsmiljö" |
| 425 |
|
| 426 |
#: ../../../__w/calibre/calibre/manual/develop.rst:231 |
| 427 |
msgid "" |
| 428 |
"calibre is primarily developed on Linux. You have two choices in setting up " |
| 429 |
"the development environment. You can install the calibre binary as normal " |
| 430 |
"and use that as a runtime environment to do your development. This approach " |
| 431 |
"is similar to that used in Windows and macOS. Alternatively, you can install" |
| 432 |
" calibre from source. Instructions for setting up a development environment " |
| 433 |
"from source are in the INSTALL file in the source tree. Here we will address" |
| 434 |
" using the binary as a runtime, which is the recommended method." |
| 435 |
msgstr "calibre utvecklas främst på Linux. Du kan konfigurera utvecklingsmiljön på två sätt. Antingen installerar du calibres binärversion på vanligt sätt och använder den som körmiljö för utvecklingen, på samma sätt som i Windows och macOS, eller så installerar du calibre från källkoden. Anvisningar för att konfigurera en utvecklingsmiljö från källkoden finns i filen INSTALL i källkodsträdet. Här beskriver vi hur binärversionen används som körmiljö, vilket är den rekommenderade metoden." |
| 436 |
|
| 437 |
#: ../../../__w/calibre/calibre/manual/develop.rst:237 |
| 438 |
msgid "" |
| 439 |
"Install calibre using the `binary installer <https://calibre-" |
| 440 |
"ebook.com/download_linux>`_. Then open a terminal and change to the " |
| 441 |
"previously checked out calibre code folder, for example::" |
| 442 |
msgstr "Installera calibre med hjälp av `det binära installationsprogrammet <https://calibre-ebook.com/download_linux>`_. Öppna sedan en terminal och ändra till den tidigare kontrollerade calibre-kodmappen, till exempel::" |
| 443 |
|
| 444 |
#: ../../../__w/calibre/calibre/manual/develop.rst:243 |
| 445 |
msgid "" |
| 446 |
"The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to" |
| 447 |
" the absolute path of the src folder. So, following the example above, it " |
| 448 |
"would be ``/home/kovid/work/calibre/src``. How to set environment variables " |
| 449 |
"depends on your Linux distribution and what shell you are using." |
| 450 |
msgstr "Nästa steg är att ställa in miljövariabeln ``CALIBRE_DEVELOP_FROM`` till den absoluta sökvägen till mappen src. Så, efter exemplet ovan, skulle det vara ``/home/kovid/work/calibre/src``. Hur man ställer in miljövariabler beror på din Linux-distribution och vilket skal du använder." |
| 451 |
|
| 452 |
#: ../../../__w/calibre/calibre/manual/develop.rst:248 |
| 453 |
msgid "" |
| 454 |
"It is recommended to use the binary installer provided from upstream. Should" |
| 455 |
" you insist on using a package provided by your distribution, use the " |
| 456 |
"``CALIBRE_PYTHON_PATH`` and ``CALIBRE_RESOURCES_PATH`` variables instead. " |
| 457 |
"You can get these by running ``calibre-debug --paths``. But note that " |
| 458 |
"distribution calibre packages are often terminally broken and are completely" |
| 459 |
" unsupported." |
| 460 |
msgstr "Vi rekommenderar att du använder det binära installationsprogrammet från huvudprojektet. Om du ändå vill använda ett paket från din distribution ska du i stället använda variablerna ``CALIBRE_PYTHON_PATH`` och ``CALIBRE_RESOURCES_PATH``. Du kan få fram dem genom att köra ``calibre-debug --paths``. Observera dock att distributionernas calibre-paket ofta är allvarligt trasiga och inte stöds alls." |
| 461 |
|
| 462 |
#: ../../../__w/calibre/calibre/manual/develop.rst:255 |
| 463 |
msgid "" |
| 464 |
"Once you have set the environment variable, open a new terminal and check " |
| 465 |
"that it was correctly set by using the command::" |
| 466 |
msgstr "När du har ställt in miljövariabeln, öppna en ny terminal och kontrollera att den blev korrekt inställd genom att använda kommandot::" |
| 467 |
|
| 468 |
#: ../../../__w/calibre/calibre/manual/develop.rst:262 |
| 469 |
msgid "" |
| 470 |
"That's it! You are now ready to start hacking on the calibre code. For " |
| 471 |
"example, open the file :file:`src/calibre/__init__.py` in your favorite " |
| 472 |
"editor and add the line::" |
| 473 |
msgstr "Klart! Nu kan du börja arbeta med calibre-koden. Öppna till exempel filen :file:`src/calibre/__init__.py` i din favoritredigerare och lägg till raden::" |
| 474 |
|
| 475 |
#: ../../../__w/calibre/calibre/manual/develop.rst:270 |
| 476 |
msgid "" |
| 477 |
"Having separate \"normal\" and \"development\" calibre installs on the same " |
| 478 |
"computer" |
| 479 |
msgstr "Ha separata installationer av den vanliga versionen och utvecklingsversionen av calibre på samma dator" |
| 480 |
|
| 481 |
#: ../../../__w/calibre/calibre/manual/develop.rst:272 |
| 482 |
msgid "" |
| 483 |
"The calibre source tree is very stable and rarely breaks, but if you feel " |
| 484 |
"the need to run from source on a separate test library and run the released " |
| 485 |
"calibre version with your everyday library, you can achieve this easily " |
| 486 |
"using .bat files or shell scripts to launch calibre. The example below shows" |
| 487 |
" how to do this on Windows using .bat files (the instructions for other " |
| 488 |
"platforms are the same, just use a shell script instead of a .bat file)" |
| 489 |
msgstr "Calibres källkodsträd är mycket stabilt och slutar sällan fungera. Om du ändå vill köra källkodsversionen med ett separat testbibliotek och den utgivna calibre-versionen med ditt vanliga bibliotek kan du enkelt göra det genom att starta calibre med .bat-filer eller skalskript. Exemplet nedan visar hur du gör i Windows med .bat-filer. På andra plattformar är anvisningarna desamma, men du använder ett skalskript i stället för en .bat-fil." |
| 490 |
|
| 491 |
#: ../../../__w/calibre/calibre/manual/develop.rst:277 |
| 492 |
msgid "To launch the release version of calibre with your everyday library:" |
| 493 |
msgstr "Så här startar du den utgivna versionen av calibre med ditt vanliga bibliotek:" |
| 494 |
|
| 495 |
#: ../../../__w/calibre/calibre/manual/develop.rst:279 |
| 496 |
msgid "calibre-normal.bat::" |
| 497 |
msgstr "calibre-normal.bat::" |
| 498 |
|
| 499 |
#: ../../../__w/calibre/calibre/manual/develop.rst:283 |
| 500 |
msgid "calibre-dev.bat::" |
| 501 |
msgstr "calibre-dev.bat::" |
| 502 |
|
| 503 |
#: ../../../__w/calibre/calibre/manual/develop.rst:290 |
| 504 |
msgid "Debugging tips" |
| 505 |
msgstr "Felsökningstips" |
| 506 |
|
| 507 |
#: ../../../__w/calibre/calibre/manual/develop.rst:292 |
| 508 |
msgid "" |
| 509 |
"Python is a dynamically typed language with excellent facilities for " |
| 510 |
"introspection. Kovid wrote the core calibre code without once using a " |
| 511 |
"debugger. There are many strategies to debug calibre code:" |
| 512 |
msgstr "Python är ett dynamiskt typat språk med utmärkta möjligheter till introspektion. Kovid skrev kärnan i calibre utan att någonsin använda en felsökare. Det finns många sätt att felsöka calibre-kod:" |
| 513 |
|
| 514 |
#: ../../../__w/calibre/calibre/manual/develop.rst:297 |
| 515 |
msgid "Using print statements" |
| 516 |
msgstr "Använda utskriftssatser" |
| 517 |
|
| 518 |
#: ../../../__w/calibre/calibre/manual/develop.rst:299 |
| 519 |
msgid "" |
| 520 |
"This is Kovid's favorite way to debug. Simply insert print statements at " |
| 521 |
"points of interest and run your program in the terminal. For example, you " |
| 522 |
"can start the GUI from the terminal as::" |
| 523 |
msgstr "Det här är Kovids favoritsätt att felsöka. Infoga helt enkelt utskriftssatser på intressanta ställen och kör programmet i terminalen. Du kan till exempel starta GUI:t från terminalen med::" |
| 524 |
|
| 525 |
#: ../../../__w/calibre/calibre/manual/develop.rst:304 |
| 526 |
msgid "Similarly, you can start the E-book viewer as::" |
| 527 |
msgstr "På samma sätt kan du starta e-bokvisaren med::" |
| 528 |
|
| 529 |
#: ../../../__w/calibre/calibre/manual/develop.rst:308 |
| 530 |
msgid "The e-book editor can be started as::" |
| 531 |
msgstr "E-bokredigeraren kan startas som::" |
| 532 |
|
| 533 |
#: ../../../__w/calibre/calibre/manual/develop.rst:313 |
| 534 |
msgid "Using an interactive Python interpreter" |
| 535 |
msgstr "Använda en interaktiv Python-tolk" |
| 536 |
|
| 537 |
#: ../../../__w/calibre/calibre/manual/develop.rst:315 |
| 538 |
msgid "" |
| 539 |
"You can insert the following two lines of code to start an interactive " |
| 540 |
"Python session at that point::" |
| 541 |
msgstr "Du kan infoga följande två kodrader för att starta en interaktiv Python-session vid den aktuella punkten::" |
| 542 |
|
| 543 |
#: ../../../__w/calibre/calibre/manual/develop.rst:320 |
| 544 |
msgid "" |
| 545 |
"When running from the command line, this will start an interactive Python " |
| 546 |
"interpreter with access to all locally defined variables (variables in the " |
| 547 |
"local scope). The interactive prompt even has :kbd:`Tab` completion for " |
| 548 |
"object properties and you can use the various Python facilities for " |
| 549 |
"introspection, such as :func:`dir`, :func:`type`, :func:`repr`, etc." |
| 550 |
msgstr "När du kör från kommandoraden startar detta en interaktiv Python-tolk med åtkomst till alla lokalt definierade variabler, det vill säga variabler i det lokala omfånget. Den interaktiva prompten har till och med :kbd:`Tab`-komplettering för objektegenskaper, och du kan använda Pythons olika funktioner för introspektion, till exempel :func:`dir`, :func:`type` och :func:`repr`." |
| 551 |
|
| 552 |
#: ../../../__w/calibre/calibre/manual/develop.rst:326 |
| 553 |
msgid "Using the Python debugger as a remote debugger" |
| 554 |
msgstr "Använda Python-felsökaren som fjärrfelsökare" |
| 555 |
|
| 556 |
#: ../../../__w/calibre/calibre/manual/develop.rst:328 |
| 557 |
msgid "" |
| 558 |
"You can use the builtin Python debugger (pdb) as a remote debugger from the " |
| 559 |
"command line. First, start the remote debugger at the point in the calibre " |
| 560 |
"code you are interested in, like this::" |
| 561 |
msgstr "Du kan använda den inbyggda Python-felsökaren (pdb) som en fjärrfelsökare från kommandoraden. Starta först fjärrfelsökaren vid den punkt i calibre-koden du är intresserad av, så här::" |
| 562 |
|
| 563 |
#: ../../../__w/calibre/calibre/manual/develop.rst:335 |
| 564 |
msgid "" |
| 565 |
"Then run calibre, either as normal, or using one of the calibre-debug " |
| 566 |
"commands described in the previous section. Once the above point in the code" |
| 567 |
" is reached, calibre will freeze, waiting for the debugger to connect." |
| 568 |
msgstr "Kör sedan calibre på vanligt sätt eller med något av kommandona för calibre-debug som beskrivs i föregående avsnitt. När den aktuella punkten i koden nås fryser calibre och väntar på att felsökaren ska ansluta." |
| 569 |
|
| 570 |
#: ../../../__w/calibre/calibre/manual/develop.rst:339 |
| 571 |
msgid "" |
| 572 |
"Now open a terminal or command prompt and use the following command to start" |
| 573 |
" the debugging session::" |
| 574 |
msgstr "Öppna nu en terminal eller kommandotolk och använd följande kommando för att starta felsökningssessionen::" |
| 575 |
|
| 576 |
#: ../../../__w/calibre/calibre/manual/develop.rst:344 |
| 577 |
msgid "" |
| 578 |
"You can read about how to use the Python debugger in the `Python stdlib docs" |
| 579 |
" for the pdb module <https://docs.python.org/library/pdb.html#debugger-" |
| 580 |
"commands>`_." |
| 581 |
msgstr "Du kan läsa om hur Python-felsökaren används i `Pythons standardbiblioteksdokumentation för pdb-modulen <https://docs.python.org/library/pdb.html#debugger-commands>`_." |
| 582 |
|
| 583 |
#: ../../../__w/calibre/calibre/manual/develop.rst:348 |
| 584 |
msgid "" |
| 585 |
"By default, the remote debugger will try to connect on port 4444. You can " |
| 586 |
"change it, by passing the port parameter to both the set_trace() and the " |
| 587 |
"cli() functions above, like this: ``set_trace(port=1234)`` and " |
| 588 |
"``cli(port=1234)``." |
| 589 |
msgstr "Som standard försöker fjärrfelsökaren ansluta via port 4444. Du kan ändra porten genom att skicka portparametern till både funktionerna set_trace() och cli() ovan, så här: ``set_trace(port=1234)`` och ``cli(port=1234)``." |
| 590 |
|
| 591 |
#: ../../../__w/calibre/calibre/manual/develop.rst:354 |
| 592 |
msgid "" |
| 593 |
"The Python debugger cannot handle multiple threads, so you have to call " |
| 594 |
"set_trace once per thread, each time with a different port number." |
| 595 |
msgstr "Python-felsökaren kan inte hantera flera trådar, så du måste anropa set_trace en gång per tråd, varje gång med ett annat portnummer." |
| 596 |
|
| 597 |
#: ../../../__w/calibre/calibre/manual/develop.rst:358 |
| 598 |
msgid "Using the debugger in your favorite Python IDE" |
| 599 |
msgstr "Använda felsökaren i din favorit-IDE för Python" |
| 600 |
|
| 601 |
#: ../../../__w/calibre/calibre/manual/develop.rst:360 |
| 602 |
msgid "" |
| 603 |
"It is possible to use the builtin debugger in your favorite Python IDE, if " |
| 604 |
"it supports remote debugging. The first step is to add the calibre src " |
| 605 |
"checkout to the ``PYTHONPATH`` in your IDE. In other words, the folder you " |
| 606 |
"set as ``CALIBRE_DEVELOP_FROM`` above, must also be in the ``PYTHONPATH`` of" |
| 607 |
" your IDE." |
| 608 |
msgstr "Du kan använda den inbyggda felsökaren i din favorit-IDE för Python om den stöder fjärrfelsökning. Lägg först till den utcheckade src-mappen för calibre i ``PYTHONPATH`` i din IDE. Med andra ord måste mappen som du angav som ``CALIBRE_DEVELOP_FROM`` ovan även finnas i IDE:ns ``PYTHONPATH``." |
| 609 |
|
| 610 |
#: ../../../__w/calibre/calibre/manual/develop.rst:365 |
| 611 |
msgid "" |
| 612 |
"Then place the IDE's remote debugger module into the :file:`src` sub-folder " |
| 613 |
"of the calibre source code checkout. Add whatever code is needed to launch " |
| 614 |
"the remote debugger to calibre at the point of interest, for example in the " |
| 615 |
"main function. Then run calibre as normal. Your IDE should now be able to " |
| 616 |
"connect to the remote debugger running inside calibre." |
| 617 |
msgstr "Placera sedan IDE:ns fjärrfelsökningsmodul i undermappen :file:`src` i den utcheckade calibre-källkoden. Lägg till den kod som krävs för att starta fjärrfelsökaren i calibre vid den punkt du vill undersöka, till exempel i huvudfunktionen. Kör därefter calibre som vanligt. Din IDE bör nu kunna ansluta till fjärrfelsökaren som körs inuti calibre." |
| 618 |
|
| 619 |
#: ../../../__w/calibre/calibre/manual/develop.rst:372 |
| 620 |
msgid "Executing arbitrary scripts in the calibre Python environment" |
| 621 |
msgstr "Köra godtyckliga skript i Python-miljön för calibre" |
| 622 |
|
| 623 |
#: ../../../__w/calibre/calibre/manual/develop.rst:374 |
| 624 |
msgid "" |
| 625 |
"The :command:`calibre-debug` command provides a couple of handy switches to " |
| 626 |
"execute your own code, with access to the calibre modules::" |
| 627 |
msgstr "Kommandot :command:`calibre-debug` har ett par praktiska växlar för att köra egen kod med åtkomst till calibre-modulerna::" |
| 628 |
|
| 629 |
#: ../../../__w/calibre/calibre/manual/develop.rst:379 |
| 630 |
msgid "" |
| 631 |
"is great for testing a little snippet of code on the command line. It works " |
| 632 |
"in the same way as the -c switch to the Python interpreter::" |
| 633 |
msgstr "är utmärkt för att testa ett kort kodavsnitt på kommandoraden. Det fungerar på samma sätt som växeln -c för Python-tolken::" |
| 634 |
|
| 635 |
#: ../../../__w/calibre/calibre/manual/develop.rst:383 |
| 636 |
msgid "" |
| 637 |
"can be used to execute your own Python script. It works in the same way as " |
| 638 |
"passing the script to the Python interpreter, except that the calibre " |
| 639 |
"environment is fully initialized, so you can use all the calibre code in " |
| 640 |
"your script. To use command line arguments with your script, use the form::" |
| 641 |
msgstr "kan användas för att köra ett eget Python-skript. Det fungerar på samma sätt som att skicka skriptet till Python-tolken, förutom att calibre-miljön är fullständigt initierad så att du kan använda all calibre-kod i skriptet. Om du vill använda kommandoradsargument med skriptet använder du följande form::" |
| 642 |
|
| 643 |
#: ../../../__w/calibre/calibre/manual/develop.rst:388 |
| 644 |
msgid "" |
| 645 |
"The ``--`` causes all subsequent arguments to be passed to your script." |
| 646 |
msgstr "``--`` gör att alla efterföljande argument skickas till ditt skript." |
| 647 |
|
| 648 |
#: ../../../__w/calibre/calibre/manual/develop.rst:392 |
| 649 |
msgid "Running the calibre test suite" |
| 650 |
msgstr "Köra calibres testsvit" |
| 651 |
|
| 652 |
#: ../../../__w/calibre/calibre/manual/develop.rst:394 |
| 653 |
msgid "The calibre test suite can be run by::" |
| 654 |
msgstr "Calibres testsvit kan köras med::" |
| 655 |
|
| 656 |
#: ../../../__w/calibre/calibre/manual/develop.rst:400 |
| 657 |
msgid "Using calibre in your projects" |
| 658 |
msgstr "Använda calibre i dina projekt" |
| 659 |
|
| 660 |
#: ../../../__w/calibre/calibre/manual/develop.rst:402 |
| 661 |
msgid "" |
| 662 |
"It is possible to directly use calibre functions/code in your Python " |
| 663 |
"project. Two ways exist to do this:" |
| 664 |
msgstr "Det är möjligt att direkt använda calibre-funktioner/-kod i ditt Python-projekt. Det finns två sätt att göra detta:" |
| 665 |
|
| 666 |
#: ../../../__w/calibre/calibre/manual/develop.rst:405 |
| 667 |
msgid "Binary install of calibre" |
| 668 |
msgstr "Binär installation av calibre" |
| 669 |
|
| 670 |
#: ../../../__w/calibre/calibre/manual/develop.rst:407 |
| 671 |
msgid "" |
| 672 |
"If you have a binary install of calibre, you can use the Python interpreter " |
| 673 |
"bundled with calibre, like this::" |
| 674 |
msgstr "Om du har en binär installation av calibre kan du använda Python-tolken som medföljer calibre, så här::" |
| 675 |
|
| 676 |
#: ../../../__w/calibre/calibre/manual/develop.rst:412 |
| 677 |
msgid "Source install on Linux" |
| 678 |
msgstr "Källkodsinstallation på Linux" |
| 679 |
|
| 680 |
#: ../../../__w/calibre/calibre/manual/develop.rst:414 |
| 681 |
msgid "" |
| 682 |
"In addition to using the above technique, if you do a source install on " |
| 683 |
"Linux, you can also directly import calibre, as follows::" |
| 684 |
msgstr "Förutom att använda metoden ovan kan du, om du installerar från källkod på Linux, även importera calibre direkt enligt följande::" |
| 685 |
|
| 686 |
#: ../../../__w/calibre/calibre/manual/develop.rst:422 |
| 687 |
msgid "" |
| 688 |
"It is essential that you import the init_calibre module before any other " |
| 689 |
"calibre modules/packages as it sets up the interpreter to run calibre code." |
| 690 |
msgstr "Det är viktigt att du importerar modulen init_calibre före andra calibre-moduler/-paket eftersom den ställer in tolken för att köra calibre-kod." |
| 691 |
|
| 692 |
#: ../../../__w/calibre/calibre/manual/develop.rst:426 |
| 693 |
msgid "API documentation for various parts of calibre" |
| 694 |
msgstr "API-dokumentation för olika delar av calibre" |