mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
http->https for many links in the manual
This commit is contained in:
parent
0296d09733
commit
9c793c7b1d
@ -696,7 +696,7 @@ TXT input supports a number of options to differentiate how paragraphs are detec
|
|||||||
allows for basic formatting to be added to TXT documents, such as bold, italics, section headings, tables,
|
allows for basic formatting to be added to TXT documents, such as bold, italics, section headings, tables,
|
||||||
lists, a Table of Contents, etc. Marking chapter headings with a leading # and setting the chapter XPath detection
|
lists, a Table of Contents, etc. Marking chapter headings with a leading # and setting the chapter XPath detection
|
||||||
expression to "//h:h1" is the easiest way to have a proper table of contents generated from a TXT document.
|
expression to "//h:h1" is the easiest way to have a proper table of contents generated from a TXT document.
|
||||||
You can learn more about the markdown syntax at `daringfireball <http://daringfireball.net/projects/markdown/syntax>`_.
|
You can learn more about the markdown syntax at `daringfireball <https://daringfireball.net/projects/markdown/syntax>`_.
|
||||||
|
|
||||||
:guilabel:`Formatting Style: None`
|
:guilabel:`Formatting Style: None`
|
||||||
Applies no special formatting to the text, the document is converted to html with no other changes.
|
Applies no special formatting to the text, the document is converted to html with no other changes.
|
||||||
@ -755,10 +755,10 @@ calibre will automatically convert this .cbc file into a ebook with a Table of C
|
|||||||
EPUB advanced formatting demo
|
EPUB advanced formatting demo
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Various advanced formatting for EPUB files is demonstrated in this `demo file <http://calibre-ebook.com/downloads/demos/demo.epub>`_.
|
Various advanced formatting for EPUB files is demonstrated in this `demo file <https://calibre-ebook.com/downloads/demos/demo.epub>`_.
|
||||||
The file was created from hand coded HTML using calibre and is meant to be used as a template for your own EPUB creation efforts.
|
The file was created from hand coded HTML using calibre and is meant to be used as a template for your own EPUB creation efforts.
|
||||||
|
|
||||||
The source HTML it was created from is available `demo.zip <http://calibre-ebook.com/downloads/demos/demo.zip>`_. The settings used to create the
|
The source HTML it was created from is available `demo.zip <https://calibre-ebook.com/downloads/demos/demo.zip>`_. The settings used to create the
|
||||||
EPUB from the ZIP file are::
|
EPUB from the ZIP file are::
|
||||||
|
|
||||||
ebook-convert demo.zip .epub -vv --authors "Kovid Goyal" --language en --level1-toc '//*[@class="title"]' --disable-font-rescaling --page-breaks-before / --no-default-epub-cover
|
ebook-convert demo.zip .epub -vv --authors "Kovid Goyal" --language en --level1-toc '//*[@class="title"]' --disable-font-rescaling --page-breaks-before / --no-default-epub-cover
|
||||||
|
@ -262,7 +262,7 @@ visible strings as translatable, by surrounding them in _(). For example::
|
|||||||
Then use some program to generate .po files from your plugin source code. There
|
Then use some program to generate .po files from your plugin source code. There
|
||||||
should be one .po file for every language you want to translate into. For
|
should be one .po file for every language you want to translate into. For
|
||||||
example: de.po for German, fr.po for French and so on. You can use the
|
example: de.po for German, fr.po for French and so on. You can use the
|
||||||
`poedit <http://poedit.net/>`_ program for this.
|
`poedit <https://poedit.net/>`_ program for this.
|
||||||
|
|
||||||
Send these .po files to your translators. Once you get them back, compile them
|
Send these .po files to your translators. Once you get them back, compile them
|
||||||
into .mo files. You can again use poedit for that, or just do::
|
into .mo files. You can again use poedit for that, or just do::
|
||||||
|
@ -77,7 +77,7 @@ Getting the code
|
|||||||
You can get the calibre source code in two ways, using a version control system or
|
You can get the calibre source code in two ways, using a version control system or
|
||||||
directly downloading a `tarball <https://calibre-ebook.com/dist/src>`_.
|
directly downloading a `tarball <https://calibre-ebook.com/dist/src>`_.
|
||||||
|
|
||||||
calibre uses `Git <http://www.git-scm.com/>`_, a distributed version control
|
calibre uses `Git <https://www.git-scm.com/>`_, a distributed version control
|
||||||
system. Git is available on all the platforms calibre supports. After
|
system. Git is available on all the platforms calibre supports. After
|
||||||
installing Git, you can get the calibre source code with the command::
|
installing Git, you can get the calibre source code with the command::
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ beautify. Accessed via :guilabel:`Tools->Beautify all files`.
|
|||||||
beautified. This can sometimes mean that a particular file will not be
|
beautified. This can sometimes mean that a particular file will not be
|
||||||
affected by beautify as it has no suitable block level tags. In such
|
affected by beautify as it has no suitable block level tags. In such
|
||||||
cases you can try different beautification tools, that are less careful,
|
cases you can try different beautification tools, that are less careful,
|
||||||
for example: `HTML Tidy <http://infohound.net/tidy/>`_.
|
for example: `HTML Tidy <https://infohound.net/tidy/>`_.
|
||||||
|
|
||||||
|
|
||||||
Inserting an inline Table of Contents
|
Inserting an inline Table of Contents
|
||||||
@ -664,7 +664,7 @@ Spanish languages. You can install your own dictionaries via
|
|||||||
:guilabel:`Preferences->Editor->Manage spelling dictionaries`. The spell
|
:guilabel:`Preferences->Editor->Manage spelling dictionaries`. The spell
|
||||||
checker can use dictionaries from the LibreOffice program (in the .oxt
|
checker can use dictionaries from the LibreOffice program (in the .oxt
|
||||||
format). You can download these dictionaries from
|
format). You can download these dictionaries from
|
||||||
`The LibreOffice Extensions repository <http://extensions.libreoffice.org/extension-center?getCategories=Dictionary&getCompatibility=any&sort_on=positive_ratings>`_.
|
`The LibreOffice Extensions repository <https://extensions.libreoffice.org/extension-center?getCategories=Dictionary&getCompatibility=any&sort_on=positive_ratings>`_.
|
||||||
|
|
||||||
|
|
||||||
Inserting special characters
|
Inserting special characters
|
||||||
|
@ -301,7 +301,7 @@ With recent reader iterations, SONY, in all its wisdom has decided to try to for
|
|||||||
use their software. If you install it, it auto-launches whenever you connect the reader.
|
use their software. If you install it, it auto-launches whenever you connect the reader.
|
||||||
If you don't want to uninstall it altogether, there are a couple of tricks you can use. The
|
If you don't want to uninstall it altogether, there are a couple of tricks you can use. The
|
||||||
simplest is to simply re-name the executable file that launches the library program. More detail
|
simplest is to simply re-name the executable file that launches the library program. More detail
|
||||||
`in the forums <http://www.mobileread.com/forums/showthread.php?t=65809>`_.
|
`in the forums <https://www.mobileread.com/forums/showthread.php?t=65809>`_.
|
||||||
|
|
||||||
How do I use calibre with my iPad/iPhone/iPod touch?
|
How do I use calibre with my iPad/iPhone/iPod touch?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -382,7 +382,7 @@ iBooks.
|
|||||||
With the USB cable + iTunes
|
With the USB cable + iTunes
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Use the 'Connect to iTunes' method in the 'Getting started' instructions in `Calibre + Apple iDevices: Start here <http://www.mobileread.com/forums/showthread.php?t=118559>`_.
|
Use the 'Connect to iTunes' method in the 'Getting started' instructions in `Calibre + Apple iDevices: Start here <https://www.mobileread.com/forums/showthread.php?t=118559>`_.
|
||||||
|
|
||||||
This method only works on Windows Vista and higher, and OS X up to 10.8. Linux
|
This method only works on Windows Vista and higher, and OS X up to 10.8. Linux
|
||||||
is not supported (iTunes is not available in linux) and OS X newer than 10.8 is
|
is not supported (iTunes is not available in linux) and OS X newer than 10.8 is
|
||||||
@ -610,7 +610,7 @@ How does calibre manage author names and sorting?
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Author names are complex, especially across cultures, see `this note
|
Author names are complex, especially across cultures, see `this note
|
||||||
<http://www.w3.org/International/questions/qa-personal-names.en.php?changelang=en>`_
|
<https://www.w3.org/International/questions/qa-personal-names.en.php?changelang=en>`_
|
||||||
for some of the complexities. calibre has a very flexible strategy for managing
|
for some of the complexities. calibre has a very flexible strategy for managing
|
||||||
author names. The first thing to understand is that books and authors are
|
author names. The first thing to understand is that books and authors are
|
||||||
separate entities in calibre. A book can have more than one author, and an
|
separate entities in calibre. A book can have more than one author, and an
|
||||||
@ -811,7 +811,7 @@ I want calibre to download news from my favorite news website.
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
If you are reasonably proficient with computers, you can teach calibre to download news from any website of your choosing. To learn how to do this see :ref:`news`.
|
If you are reasonably proficient with computers, you can teach calibre to download news from any website of your choosing. To learn how to do this see :ref:`news`.
|
||||||
|
|
||||||
Otherwise, you can request a particular news site by posting in the `calibre Recipes forum <http://www.mobileread.com/forums/forumdisplay.php?f=228>`_.
|
Otherwise, you can request a particular news site by posting in the `calibre Recipes forum <https://www.mobileread.com/forums/forumdisplay.php?f=228>`_.
|
||||||
|
|
||||||
|
|
||||||
Why the name calibre?
|
Why the name calibre?
|
||||||
@ -865,7 +865,7 @@ If it still wont launch, start a command prompt (press the windows key and R; th
|
|||||||
|
|
||||||
calibre-debug -g
|
calibre-debug -g
|
||||||
|
|
||||||
Post any output you see in a help message on the `Forum <http://www.mobileread.com/forums/forumdisplay.php?f=166>`_.
|
Post any output you see in a help message on the `Forum <https://www.mobileread.com/forums/forumdisplay.php?f=166>`_.
|
||||||
|
|
||||||
calibre freezes/crashes occasionally?
|
calibre freezes/crashes occasionally?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -1083,11 +1083,11 @@ For many reasons:
|
|||||||
updating trivial. Instructions are :ref:`available here <develop>`.
|
updating trivial. Instructions are :ref:`available here <develop>`.
|
||||||
|
|
||||||
* There are third party automatic updaters for calibre made by calibre users
|
* There are third party automatic updaters for calibre made by calibre users
|
||||||
in the `calibre forum <http://www.mobileread.com/forums/forumdisplay.php?f=238>`_.
|
in the `calibre forum <https://www.mobileread.com/forums/forumdisplay.php?f=238>`_.
|
||||||
|
|
||||||
How is calibre licensed?
|
How is calibre licensed?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
calibre is licensed under the GNU General Public License v3 (an open source license). This means that you are free to redistribute calibre as long as you make the source code available. So if you want to put calibre on a CD with your product, you must also put the calibre source code on the CD. The source code is available `for download <https://download.calibre-ebook.com>`_. You are free to use the results of conversions from calibre however you want. You cannot use either code or libraries from calibre in your software without making your software open source. For details, see `The GNU GPL v3 <http://www.gnu.org/licenses/gpl.html>`_.
|
calibre is licensed under the GNU General Public License v3 (an open source license). This means that you are free to redistribute calibre as long as you make the source code available. So if you want to put calibre on a CD with your product, you must also put the calibre source code on the CD. The source code is available `for download <https://download.calibre-ebook.com>`_. You are free to use the results of conversions from calibre however you want. You cannot use either code or libraries from calibre in your software without making your software open source. For details, see `The GNU GPL v3 <https://www.gnu.org/licenses/gpl.html>`_.
|
||||||
|
|
||||||
How do I run calibre from my USB stick?
|
How do I run calibre from my USB stick?
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -94,7 +94,7 @@ Convert books
|
|||||||
:class: float-right-img
|
:class: float-right-img
|
||||||
|
|
||||||
|cei| Ebooks can be converted from a number of formats into whatever format your ebook reader prefers.
|
|cei| Ebooks can be converted from a number of formats into whatever format your ebook reader prefers.
|
||||||
Many ebooks available for purchase will be protected by `Digital Rights Management <http://drmfree.calibre-ebook.com/about#drm>`_ *(DRM)* technology.
|
Many ebooks available for purchase will be protected by `Digital Rights Management <https://drmfree.calibre-ebook.com/about#drm>`_ *(DRM)* technology.
|
||||||
calibre will not convert these ebooks. It is easy to remove the DRM from many formats, but as this may be illegal,
|
calibre will not convert these ebooks. It is easy to remove the DRM from many formats, but as this may be illegal,
|
||||||
you will have to find tools to liberate your books yourself and then use calibre to convert them.
|
you will have to find tools to liberate your books yourself and then use calibre to convert them.
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ are available in the LRF format. Some more examples::
|
|||||||
format:epub publisher:feedbooks.com
|
format:epub publisher:feedbooks.com
|
||||||
|
|
||||||
Searches are by default 'contains'. An item matches if the search string appears anywhere in the indicated metadata.
|
Searches are by default 'contains'. An item matches if the search string appears anywhere in the indicated metadata.
|
||||||
Two other kinds of searches are available: equality search and search using `regular expressions <http://en.wikipedia.org/wiki/Regular_expression>`_.
|
Two other kinds of searches are available: equality search and search using `regular expressions <https://en.wikipedia.org/wiki/Regular_expression>`_.
|
||||||
|
|
||||||
Equality searches are indicated by prefixing the search string with an equals sign (=). For example, the query
|
Equality searches are indicated by prefixing the search string with an equals sign (=). For example, the query
|
||||||
``tag:"=science"`` will match "science", but not "science fiction" or "hard science". Regular expression searches are
|
``tag:"=science"`` will match "science", but not "science fiction" or "hard science". Regular expression searches are
|
||||||
|
@ -29,7 +29,7 @@ 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
|
in a simple and accessible way for new calibre users. In order to download this
|
||||||
blog into an ebook, we rely on the :term:`RSS` feed of the blog::
|
blog into an ebook, we rely on the :term:`RSS` feed of the blog::
|
||||||
|
|
||||||
http://blog.calibre-ebook.com/feeds/posts/default
|
https://blog.calibre-ebook.com/feeds/posts/default
|
||||||
|
|
||||||
I got the RSS URL by looking under "Subscribe to" at the bottom of the blog
|
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
|
page and choosing :guilabel:`Posts->Atom`. To make calibre download the feeds and convert
|
||||||
@ -267,7 +267,7 @@ to go to http://www.nytimes.com/pages/todayspaper/index.html and fetch the list
|
|||||||
of articles that appear in *todays* paper. While more complex than simply using
|
of articles that appear in *todays* paper. While more complex than simply using
|
||||||
:term:`RSS`, the recipe creates an ebook that corresponds very closely to the
|
:term:`RSS`, the recipe creates an ebook that corresponds very closely to the
|
||||||
days paper. ``parse_index`` makes heavy use of `BeautifulSoup
|
days paper. ``parse_index`` makes heavy use of `BeautifulSoup
|
||||||
<http://www.crummy.com/software/BeautifulSoup/documentation.html>`_ to parse
|
<https://www.crummy.com/software/BeautifulSoup/documentation.html>`_ to parse
|
||||||
the daily paper webpage. You can also use other, more modern parsers if you
|
the daily paper webpage. You can also use other, more modern parsers if you
|
||||||
dislike BeatifulSoup. calibre comes with `lxml <http://lxml.de/>`_ and
|
dislike BeatifulSoup. calibre comes with `lxml <http://lxml.de/>`_ and
|
||||||
`html5lib <https://github.com/html5lib/html5lib-python>`_, which are the
|
`html5lib <https://github.com/html5lib/html5lib-python>`_, which are the
|
||||||
|
@ -112,5 +112,5 @@ Change the path to :file:`calibre-wsgi-adapter.py` to wherever you saved it prev
|
|||||||
|
|
||||||
That's all, you will now be able to access the calibre Content Server under the /calibre URL in your apache server.
|
That's all, you will now be able to access the calibre Content Server under the /calibre URL in your apache server.
|
||||||
|
|
||||||
.. note:: For more help with using mod_wsgi in Apache, see `mod_wsgi <http://code.google.com/p/modwsgi/wiki/WhereToGetHelp>`_.
|
.. note:: For more help with using mod_wsgi in Apache, see `mod_wsgi <https://code.google.com/p/modwsgi/wiki/WhereToGetHelp>`_.
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ Inserting filler text [Lorem]
|
|||||||
|
|
||||||
The first built-in snippet, and the simplest is used to insert filler text into
|
The first built-in snippet, and the simplest is used to insert filler text into
|
||||||
a document. The filler text is taken from `De finibus bonorum et malorum
|
a document. The filler text is taken from `De finibus bonorum et malorum
|
||||||
<http://en.wikipedia.org/wiki/De_finibus_bonorum_et_malorum>`_ a philosophical
|
<https://en.wikipedia.org/wiki/De_finibus_bonorum_et_malorum>`_ a philosophical
|
||||||
work by Cicero (translated to English). To use it simply type ``Lorem`` in an
|
work by Cicero (translated to English). To use it simply type ``Lorem`` in an
|
||||||
HTML file and press |ct|. It will be replaced by a couple of paragraphs of
|
HTML file and press |ct|. It will be replaced by a couple of paragraphs of
|
||||||
filler.
|
filler.
|
||||||
|
@ -61,5 +61,5 @@ More information
|
|||||||
|
|
||||||
Since the calibre viewer uses the MathJax library to render mathematics, the best
|
Since the calibre viewer uses the MathJax library to render mathematics, the best
|
||||||
place to find out more about math in ebooks and get help is the `MathJax
|
place to find out more about math in ebooks and get help is the `MathJax
|
||||||
website <http://www.mathjax.org>`_.
|
website <https://www.mathjax.org>`_.
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
#: }
|
#: }
|
||||||
#:
|
#:
|
||||||
#: All keys are optional. For a full explanation of the search criteria, see
|
#: All keys are optional. For a full explanation of the search criteria, see
|
||||||
#: `Beautiful Soup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html#Searching%20the%20Parse%20Tree>`_
|
#: `Beautiful Soup <https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html#Searching%20the%20Parse%20Tree>`_
|
||||||
#: A common example::
|
#: A common example::
|
||||||
#:
|
#:
|
||||||
#: remove_tags = [dict(name='div', attrs={'class':'advert'})]
|
#: remove_tags = [dict(name='div', attrs={'class':'advert'})]
|
||||||
@ -320,7 +320,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
#: are expressed as a percentage of the downloaded cover.
|
#: are expressed as a percentage of the downloaded cover.
|
||||||
#: cover_margins = (10, 15, '#ffffff') pads the cover with a white margin
|
#: cover_margins = (10, 15, '#ffffff') pads the cover with a white margin
|
||||||
#: 10px on the left and right, 15px on the top and bottom.
|
#: 10px on the left and right, 15px on the top and bottom.
|
||||||
#: Color names defined at http://www.imagemagick.org/script/color.php
|
#: Color names defined at https://www.imagemagick.org/script/color.php
|
||||||
#: Note that for some reason, white does not always work on windows. Use
|
#: Note that for some reason, white does not always work on windows. Use
|
||||||
#: #ffffff instead
|
#: #ffffff instead
|
||||||
cover_margins = (0, 0, '#ffffff')
|
cover_margins = (0, 0, '#ffffff')
|
||||||
@ -471,7 +471,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
def get_browser(self, *args, **kwargs):
|
def get_browser(self, *args, **kwargs):
|
||||||
'''
|
'''
|
||||||
Return a browser instance used to fetch documents from the web. By default
|
Return a browser instance used to fetch documents from the web. By default
|
||||||
it returns a `mechanize <http://wwwsearch.sourceforge.net/mechanize/>`_
|
it returns a `mechanize <https://wwwsearch.sourceforge.net/mechanize/>`_
|
||||||
browser instance that supports cookies, ignores robots.txt, handles
|
browser instance that supports cookies, ignores robots.txt, handles
|
||||||
refreshes and has a mozilla firefox user agent.
|
refreshes and has a mozilla firefox user agent.
|
||||||
|
|
||||||
@ -482,7 +482,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
def get_browser(self):
|
def get_browser(self):
|
||||||
br = BasicNewsRecipe.get_browser(self)
|
br = BasicNewsRecipe.get_browser(self)
|
||||||
if self.username is not None and self.password is not None:
|
if self.username is not None and self.password is not None:
|
||||||
br.open('http://www.nytimes.com/auth/login')
|
br.open('https://www.nytimes.com/auth/login')
|
||||||
br.select_form(name='login')
|
br.select_form(name='login')
|
||||||
br['USERID'] = self.username
|
br['USERID'] = self.username
|
||||||
br['PASSWORD'] = self.password
|
br['PASSWORD'] = self.password
|
||||||
@ -535,7 +535,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
for key in article.keys():
|
for key in article.keys():
|
||||||
if key.endswith('_origlink'):
|
if key.endswith('_origlink'):
|
||||||
url = article[key]
|
url = article[key]
|
||||||
if url and url.startswith('http://'):
|
if url and (url.startswith('http://') or url.startswith('https://')):
|
||||||
return url
|
return url
|
||||||
ans = article.get('link', None)
|
ans = article.get('link', None)
|
||||||
if not ans and getattr(article, 'links', None):
|
if not ans and getattr(article, 'links', None):
|
||||||
@ -554,7 +554,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
an ad page, return the HTML of the real page. Otherwise return
|
an ad page, return the HTML of the real page. Otherwise return
|
||||||
None.
|
None.
|
||||||
|
|
||||||
`soup`: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
`soup`: A `BeautifulSoup <https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
||||||
instance containing the downloaded :term:`HTML`.
|
instance containing the downloaded :term:`HTML`.
|
||||||
'''
|
'''
|
||||||
return None
|
return None
|
||||||
@ -596,7 +596,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
It can be used to do arbitrarily powerful pre-processing on the :term:`HTML`.
|
It can be used to do arbitrarily powerful pre-processing on the :term:`HTML`.
|
||||||
It should return `soup` after processing it.
|
It should return `soup` after processing it.
|
||||||
|
|
||||||
`soup`: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
`soup`: A `BeautifulSoup <https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
||||||
instance containing the downloaded :term:`HTML`.
|
instance containing the downloaded :term:`HTML`.
|
||||||
'''
|
'''
|
||||||
return soup
|
return soup
|
||||||
@ -608,7 +608,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
It can be used to do arbitrarily powerful post-processing on the :term:`HTML`.
|
It can be used to do arbitrarily powerful post-processing on the :term:`HTML`.
|
||||||
It should return `soup` after processing it.
|
It should return `soup` after processing it.
|
||||||
|
|
||||||
:param soup: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_ instance containing the downloaded :term:`HTML`.
|
:param soup: A `BeautifulSoup <https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_ instance containing the downloaded :term:`HTML`.
|
||||||
:param first_fetch: True if this is the first page of an article.
|
:param first_fetch: True if this is the first page of an article.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
@ -643,7 +643,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
def index_to_soup(self, url_or_raw, raw=False, as_tree=False):
|
def index_to_soup(self, url_or_raw, raw=False, as_tree=False):
|
||||||
'''
|
'''
|
||||||
Convenience method that takes an URL to the index page and returns
|
Convenience method that takes an URL to the index page and returns
|
||||||
a `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
a `BeautifulSoup <https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
||||||
of it.
|
of it.
|
||||||
|
|
||||||
`url_or_raw`: Either a URL or the downloaded index page as a string
|
`url_or_raw`: Either a URL or the downloaded index page as a string
|
||||||
@ -1627,14 +1627,14 @@ class BasicNewsRecipe(Recipe):
|
|||||||
def tag_to_string(self, tag, use_alt=True, normalize_whitespace=True):
|
def tag_to_string(self, tag, use_alt=True, normalize_whitespace=True):
|
||||||
'''
|
'''
|
||||||
Convenience method to take a
|
Convenience method to take a
|
||||||
`BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
`BeautifulSoup <https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
||||||
`Tag` and extract the text from it recursively, including any CDATA sections
|
`Tag` and extract the text from it recursively, including any CDATA sections
|
||||||
and alt tag attributes. Return a possibly empty unicode string.
|
and alt tag attributes. Return a possibly empty unicode string.
|
||||||
|
|
||||||
`use_alt`: If `True` try to use the alt attribute for tags that don't
|
`use_alt`: If `True` try to use the alt attribute for tags that don't
|
||||||
have any textual content
|
have any textual content
|
||||||
|
|
||||||
`tag`: `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
`tag`: `BeautifulSoup <https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
|
||||||
`Tag`
|
`Tag`
|
||||||
'''
|
'''
|
||||||
if tag is None:
|
if tag is None:
|
||||||
@ -1755,7 +1755,7 @@ class CalibrePeriodical(BasicNewsRecipe):
|
|||||||
#: Set this to the slug for the calibre periodical
|
#: Set this to the slug for the calibre periodical
|
||||||
calibre_periodicals_slug = None
|
calibre_periodicals_slug = None
|
||||||
|
|
||||||
LOG_IN = 'http://news.calibre-ebook.com/accounts/login'
|
LOG_IN = 'https://news.calibre-ebook.com/accounts/login'
|
||||||
needs_subscription = True
|
needs_subscription = True
|
||||||
__author__ = 'calibre Periodicals'
|
__author__ = 'calibre Periodicals'
|
||||||
|
|
||||||
@ -1777,7 +1777,7 @@ class CalibrePeriodical(BasicNewsRecipe):
|
|||||||
self.log('Fetching downloaded recipe')
|
self.log('Fetching downloaded recipe')
|
||||||
try:
|
try:
|
||||||
raw = self.browser.open_novisit(
|
raw = self.browser.open_novisit(
|
||||||
'http://news.calibre-ebook.com/subscribed_files/%s/0/temp.downloaded_recipe'
|
'https://news.calibre-ebook.com/subscribed_files/%s/0/temp.downloaded_recipe'
|
||||||
% self.calibre_periodicals_slug
|
% self.calibre_periodicals_slug
|
||||||
).read()
|
).read()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user