Fix various redirected/broken external links in the User Manual

This commit is contained in:
Kovid Goyal 2014-11-10 22:28:18 +05:30
parent e76d475126
commit d3a588e0f1
10 changed files with 21 additions and 21 deletions

View File

@ -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
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
`poedit <http://www.poedit.net/>`_ program for this.
`poedit <http://poedit.net/>`_ program for this.
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::

View File

@ -34,7 +34,7 @@ Environment variables
* ``http_proxy`` - Used on linux to specify an HTTP proxy
See `How to set environment variables in windows <http://www.computerhope.com/issues/ch000549.htm>`_ or
`How to set environment variables in OS X <http://blog.dowdandassociates.com/content/howto-set-an-environment-variable-in-mac-os-x-home-slash-dot-macosx-slash-environment-dot-plist/>`_.
`How to set environment variables in OS X <http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-mac-os-x-home-slash-dot-macosx-slash-environment-dot-plist/>`_.
Tweaks
------------

View File

@ -6,7 +6,7 @@ Setting up a calibre development environment
calibre is completely open source, licensed under the `GNU GPL v3 <http://www.gnu.org/copyleft/gpl.html>`_.
This means that you are free to download and modify the program to your heart's content. In this section,
you will learn how to get a calibre development environment set up on the operating system of your choice.
calibre is written primarily in `Python <http://www.python.org>`_ with some C/C++ code for speed and system interfacing.
calibre is written primarily in `Python <https://www.python.org>`_ with some C/C++ code for speed and system interfacing.
Note that calibre is not compatible with Python 3 and requires at least Python 2.7.
.. contents:: Contents
@ -122,7 +122,7 @@ commits::
Be careful to not include merges when using ``HEAD~n``.
If you plan to do a lot of development on calibre, then the best method is to create a
`GitHub <http://github.com>`_ account. Below is a basic guide to setting up
`GitHub <https://github.com>`_ account. Below is a basic guide to setting up
your own fork of calibre in a way that will allow you to submit pull requests
for inclusion into the main calibre repository:
@ -164,7 +164,7 @@ calibre is the directory that contains the src and resources sub-directories.
The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src directory.
So, following the example above, it would be ``C:\Users\kovid\work\calibre\src``. `Here is a short
guide <http://docs.python.org/using/windows.html#excursus-setting-environment-variables>`_ to setting environment
guide <https://docs.python.org/2/using/windows.html#excursus-setting-environment-variables>`_ to setting environment
variables on Windows.
Once you have set the environment variable, open a new command prompt and check that it was correctly set by using

View File

@ -878,7 +878,7 @@ be printed to it. If the debug output contains a line that looks like::
Qt: internal: -108: Error ATSUMeasureTextImage text/qfontengine_mac.mm
then the problem is probably a corrupted font cache. You can clear the cache by following these
`instructions <http://www.macworld.com/article/139383/2009/03/fontcacheclear.html>`_. If that doesn't
`instructions <http://www.macworld.com/article/1139383/fontcacheclear.html>`_. If that doesn't
solve it, look for a corrupted font file on your system, in ~/Library/Fonts or the like. An easy way to
check for corrupted fonts in OS X is to start the "Font Book" application, select all fonts and then in the File
menu, choose "Validate fonts".

View File

@ -8,7 +8,7 @@ Glossary
**RSS** *(Really Simple Syndication)* is a web feed format that is used to publish frequently updated content, like news articles, blog posts, etc. It is a format that is particularly suited to being read by computers, and is therefore the preferred way of getting content from the web into an ebook. There are many other feed formats in use on the Internet, and calibre understands most of them. In particular, it has good support for the *ATOM* format, which is commonly used for blogs.
recipe
A recipe is a set of instructions that teach calibre how to convert an online news source, such as a magazine or a blog, into an ebook. A recipe is essentially `Python <http://www.python.org>`_ code. As such, it is capable of converting arbitrarily complex news sources into ebooks. At the simplest level, it is just a set of variables, such as URLs, that give calibre enough information to go out onto the Internet and download the news.
A recipe is a set of instructions that teach calibre how to convert an online news source, such as a magazine or a blog, into an ebook. A recipe is essentially `Python <https://www.python.org>`_ code. As such, it is capable of converting arbitrarily complex news sources into ebooks. At the simplest level, it is just a set of variables, such as URLs, that give calibre enough information to go out onto the Internet and download the news.
HTML
**HTML** *(Hyper Text Mark-Up Language)*, a subset of Standard Generalized Mark-Up Language (SGML) for electronic publishing, is the specific standard used for the World Wide Web.
@ -26,5 +26,5 @@ Glossary
**URL** *(Uniform Resource Locator)* for example: ``http://example.com``
regexp
**Regular expressions** provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters. See `regexp syntax <http://docs.python.org/lib/re-syntax.html>`_ for the syntax of regular expressions used in Python.
**Regular expressions** provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters. See `regexp syntax <https://docs.python.org/2.7/library/re.html>`_ for the syntax of regular expressions used in Python.

View File

@ -101,7 +101,7 @@ This is python, so indentation is important. After you've added the lines, it sh
.. image:: images/bbc_altered.png
:align: center
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 <http://www.python.org>`_ see the `tutorial <http://docs.python.org/tut/>`_.
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 <https://www.python.org>`_ see the `tutorial <https://docs.python.org/2/tutorial/>`_.
Now, click the :guilabel:`Add/update recipe` button and your changes will be saved. Re-download the ebook. You should have a much improved ebook. 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 ebook, but even after the fixing process, the font size of the menus and navigation bar to become too large relative to the article text. To fix this, we will do some more customization, in the next section.

View File

@ -114,7 +114,7 @@ Bulk editing metadata
The last part is regular expression search and replace in metadata fields. You can access this by selecting multiple books in the library and using bulk metadata edit. Be very careful when using this last feature, as it can do **Very Bad Things** to your library! Doublecheck that your expressions do what you want them to using the test fields, and only mark the books you really want to change! In the regular expression search mode, you can search in one field, replace the text with something and even write the result into another field. A practical example: Say your library contained the books of Frank Herbert's Dune series, named after the fashion ``Dune 1 - Dune``, ``Dune 2 - Dune Messiah`` and so on. Now you want to get ``Dune`` into the series field. You can do that by searching for ``(.*?) \d+ - .*`` in the title field and replacing it with ``\1`` in the series field. See what I did there? That's a reference to the first group you're replacing the series field with. Now that you have the series all set, you only need to do another search for ``.*? -`` in the title field and replace it with ``""`` (an empty string), again in the title field, and your metadata is all neat and tidy. Isn't that great? By the way, instead of replacing the entire field, you can also append or prepend to the field, so, if you *wanted* the book title to be prepended with series info, you could do that as well. As you by now have undoubtedly noticed, there's a checkbox labeled :guilabel:`Case sensitive`, so you won't have to use flags to select behaviour here.
Well, that just about concludes the very short introduction to regular expressions. Hopefully I'll have shown you enough to at least get you started and to enable you to continue learning by yourself- a good starting point would be the `Python documentation for regexps <http://docs.python.org/library/re.html>`_.
Well, that just about concludes the very short introduction to regular expressions. Hopefully I'll have shown you enough to at least get you started and to enable you to continue learning by yourself- a good starting point would be the `Python documentation for regexps <https://docs.python.org/2/library/re.html>`_.
One last word of warning, though: Regexps are powerful, but also really easy to get wrong. calibre provides really great testing possibilities to see if your expressions behave as you expect them to. Use them. Try not to shoot yourself in the foot. (God, I love that expression...) But should you, despite the warning, injure your foot (or any other body parts), try to learn from it.
@ -130,5 +130,5 @@ Thanks for helping with tips, corrections and such:
* kacir
* Starson17
For more about regexps see `The Python User Manual <http://docs.python.org/library/re.html>`_.
For more about regexps see `The Python User Manual <https://docs.python.org/2/library/re.html>`_.

View File

@ -84,7 +84,7 @@ If you want only the first two letters of the data, use::
{author_sort:.2} - Only the first two letter of the author sort name
The calibre template language comes from python and for more details on the syntax of these advanced formatting operations, look at the `Python documentation <http://docs.python.org/library/string.html#format-string-syntax>`_.
The calibre template language comes from python and for more details on the syntax of these advanced formatting operations, look at the `Python documentation <https://docs.python.org/2/library/string.html#format-string-syntax>`_.
Advanced features
------------------

View File

@ -107,5 +107,5 @@ XPath built-in functions
``re:test(src, pattern, flags)`` returns `true` if the string `src` matches the
regular expression `pattern`. A particularly useful flag is ``i``, it makes matching
case insensitive. A good primer on the syntax for regular expressions can be found
at `regexp syntax <http://docs.python.org/lib/re-syntax.html>`_
at `regexp syntax <https://docs.python.org/2.7/library/re.html>`_

View File

@ -551,11 +551,11 @@ class BasicNewsRecipe(Recipe):
Override in a subclass to customize extraction of the :term:`URL` that points
to the content for each article. Return the
article URL. It is called with `article`, an object representing a parsed article
from a feed. See `feedparser <http://packages.python.org/feedparser/>`_.
from a feed. See `feedparser <https://pythonhosted.org/feedparser/>`_.
By default it looks for the original link (for feeds syndicated via a
service like feedburner or pheedo) and if found,
returns that or else returns
`article.link <http://packages.python.org/feedparser/reference-entry-link.html>`_.
`article.link <https://pythonhosted.org/feedparser/reference-entry-link.html>`_.
'''
for key in article.keys():
if key.endswith('_origlink'):
@ -579,7 +579,7 @@ class BasicNewsRecipe(Recipe):
an ad page, return the HTML of the real page. Otherwise return
None.
`soup`: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_
`soup`: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
instance containing the downloaded :term:`HTML`.
'''
return None
@ -615,7 +615,7 @@ class BasicNewsRecipe(Recipe):
It can be used to do arbitrarily powerful pre-processing on the :term:`HTML`.
It should return `soup` after processing it.
`soup`: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_
`soup`: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
instance containing the downloaded :term:`HTML`.
'''
return soup
@ -627,7 +627,7 @@ class BasicNewsRecipe(Recipe):
It can be used to do arbitrarily powerful post-processing on the :term:`HTML`.
It should return `soup` after processing it.
:param soup: A `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_ instance containing the downloaded :term:`HTML`.
:param soup: A `BeautifulSoup <http://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.
'''
@ -643,7 +643,7 @@ class BasicNewsRecipe(Recipe):
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
a `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_
a `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
of it.
`url_or_raw`: Either a URL or the downloaded index page as a string
@ -1624,14 +1624,14 @@ class BasicNewsRecipe(Recipe):
def tag_to_string(self, tag, use_alt=True, normalize_whitespace=True):
'''
Convenience method to take a
`BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_
`BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
`Tag` and extract the text from it recursively, including any CDATA sections
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
have any textual content
`tag`: `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_
`tag`: `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_
`Tag`
'''
if tag is None: