diff --git a/resources/content_server/browse/browse.js b/resources/content_server/browse/browse.js
index c6914467fa..2169eb52e1 100644
--- a/resources/content_server/browse/browse.js
+++ b/resources/content_server/browse/browse.js
@@ -19,7 +19,7 @@
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
* If set to null or omitted, the cookie will be a session cookie and will not be retained
- * when the the browser exits.
+ * when the browser exits.
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
diff --git a/resources/viewer/hyphenate/Hyphenator.js b/resources/viewer/hyphenate/Hyphenator.js
index 6923518cba..75aac3e5b4 100644
--- a/resources/viewer/hyphenate/Hyphenator.js
+++ b/resources/viewer/hyphenate/Hyphenator.js
@@ -2010,7 +2010,7 @@ var Hyphenator = (function (window) {
exceptions[lang] = exceptions.global;
}
}
- //move exceptions from the the local 'exceptions'-obj to the 'language'-object
+ //move exceptions from the local 'exceptions'-obj to the 'language'-object
if (exceptions.hasOwnProperty(lang)) {
lo.exceptions = convertExceptionsToObject(exceptions[lang]);
delete exceptions[lang];
diff --git a/setup/installer/windows/XUnzip.cpp b/setup/installer/windows/XUnzip.cpp
index cc9400306a..a729f8c9fd 100644
--- a/setup/installer/windows/XUnzip.cpp
+++ b/setup/installer/windows/XUnzip.cpp
@@ -3075,7 +3075,7 @@ unzFile unzOpenInternal(LUFILE *fin)
uLong number_disk; // number of the current dist, used for spanning ZIP, unsupported, always 0
if (unzlocal_getShort(fin,&number_disk)!=UNZ_OK) err=UNZ_ERRNO;
// number of the disk with the start of the central directory
- uLong number_disk_with_CD; // number the the disk with central dir, used for spaning ZIP, unsupported, always 0
+ uLong number_disk_with_CD; // number of the disk with central dir, used for spaning ZIP, unsupported, always 0
if (unzlocal_getShort(fin,&number_disk_with_CD)!=UNZ_OK) err=UNZ_ERRNO;
// total number of entries in the central dir on this disk
if (unzlocal_getShort(fin,&us.gi.number_entry)!=UNZ_OK) err=UNZ_ERRNO;
diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py
index 7353ea4f43..d4c71f23d3 100644
--- a/src/calibre/devices/apple/driver.py
+++ b/src/calibre/devices/apple/driver.py
@@ -3647,7 +3647,7 @@ class BookList(list):
self.log = log
def supports_collections(self):
- ''' Return True if the the device supports collections for this book list. '''
+ ''' Return True if the device supports collections for this book list. '''
return False
def add_book(self, book, replace_metadata):
diff --git a/src/calibre/ebooks/hyphenate.py b/src/calibre/ebooks/hyphenate.py
index 5c3fb8191e..2ef6ce75c8 100644
--- a/src/calibre/ebooks/hyphenate.py
+++ b/src/calibre/ebooks/hyphenate.py
@@ -32,7 +32,7 @@ class Hyphenator:
self.exceptions[ex.replace('-', '')] = [0] + [int(h == '-') for h in re.split(r"[a-z]", ex)]
def _insert_pattern(self, pattern):
- # Convert the a pattern like 'a1bc3d4' into a string of chars 'abcd'
+ # Convert a pattern like 'a1bc3d4' into a string of chars 'abcd'
# and a list of points [ 1, 0, 3, 4 ].
chars = re.sub('[0-9]', '', pattern)
points = [int(d or 0) for d in re.split("[.a-z]", pattern)]
diff --git a/src/calibre/ebooks/markdown/extensions/footnotes.py b/src/calibre/ebooks/markdown/extensions/footnotes.py
index b52815f3c8..362aa20b64 100644
--- a/src/calibre/ebooks/markdown/extensions/footnotes.py
+++ b/src/calibre/ebooks/markdown/extensions/footnotes.py
@@ -72,7 +72,7 @@ class FootnoteExtension(Extension):
)
# Insert a tree-processor that would actually add the footnote div
# This must be before all other treeprocessors (i.e., inline and
- # codehilite) so they can run on the the contents of the div.
+ # codehilite) so they can run on the contents of the div.
md.treeprocessors.add(
"footnote", FootnoteTreeprocessor(self), "_begin"
)
diff --git a/src/calibre/ebooks/mobi/reader/mobi8.py b/src/calibre/ebooks/mobi/reader/mobi8.py
index a3730daa4d..14b72de538 100644
--- a/src/calibre/ebooks/mobi/reader/mobi8.py
+++ b/src/calibre/ebooks/mobi/reader/mobi8.py
@@ -233,7 +233,7 @@ class Mobi8Reader(object):
# The primary css style sheet is typically stored next followed by any
# snippets of code that were previously inlined in the
# original xhtml but have been stripped out and placed here.
- # This can include local CDATA snippets and and svg sections.
+ # This can include local CDATA snippets and svg sections.
# The problem is that for most browsers and ereaders, you can not
# use
to import any svg image that itself
diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py
index aaa998ab75..7c6cf2db80 100644
--- a/src/calibre/ebooks/oeb/base.py
+++ b/src/calibre/ebooks/oeb/base.py
@@ -1002,7 +1002,7 @@ class Manifest(object):
entry's associated content.
- XHTML, HTML, and variant content is parsed as necessary to
- convert and and return as an lxml.etree element in the XHTML
+ convert and return as an lxml.etree element in the XHTML
namespace.
- XML content is parsed and returned as an lxml.etree element.
- CSS and CSS-variant content is parsed and returned as a cssutils
diff --git a/src/calibre/ebooks/pdb/plucker/reader.py b/src/calibre/ebooks/pdb/plucker/reader.py
index 4dc74a6141..acdce617eb 100644
--- a/src/calibre/ebooks/pdb/plucker/reader.py
+++ b/src/calibre/ebooks/pdb/plucker/reader.py
@@ -246,7 +246,7 @@ class SectionText(object):
class SectionCompositeImage(object):
'''
- A composite image consists of a a 2D array
+ A composite image consists of a 2D array
of rows and columns. The entries in the array
are uid's.
'''
diff --git a/src/calibre/ebooks/rtf2xml/field_strings.py b/src/calibre/ebooks/rtf2xml/field_strings.py
index 72a87a2114..c32301afec 100755
--- a/src/calibre/ebooks/rtf2xml/field_strings.py
+++ b/src/calibre/ebooks/rtf2xml/field_strings.py
@@ -595,7 +595,7 @@ class FieldStrings:
name --the changed name according to the dictionary.
line -- the string to parse.
Returns:
- A string with a a value for the type and label attributes
+ A string with a value for the type and label attributes
Logic:
The type of sequence--whether figure, graph, my-name, or
whatever--is represented by the second word in the string. Extract
@@ -614,7 +614,7 @@ class FieldStrings:
name --the changed name according to the dictionary.
line -- the string to parse.
Returns:
- A string with a a value for the type and label attributes
+ A string with a value for the type and label attributes
Logic:
"""
the_string = name
@@ -645,7 +645,7 @@ class FieldStrings:
name --the changed name according to the dictionary.
line -- the string to parse.
Returns:
- A string with a a value for the type and label attributes
+ A string with a value for the type and label attributes
Logic:
"""
# self.__index_insert_blank_line_exp = re.compile(r'\\h\s{1,}""')
diff --git a/src/calibre/utils/formatter.py b/src/calibre/utils/formatter.py
index 8522f5a580..5d94987a54 100644
--- a/src/calibre/utils/formatter.py
+++ b/src/calibre/utils/formatter.py
@@ -316,7 +316,7 @@ class TemplateFormatter(string.Formatter):
_validation_string = 'This Is Some Text THAT SHOULD be LONG Enough.%^&*'
- # Dict to do recursion detection. It is up the the individual get_value
+ # Dict to do recursion detection. It is up to the individual get_value
# method to use it. It is cleared when starting to format a template
composite_values = {}
diff --git a/src/calibre/utils/opensearch/__init__.py b/src/calibre/utils/opensearch/__init__.py
index 7f3729ded7..134a07e2e2 100644
--- a/src/calibre/utils/opensearch/__init__.py
+++ b/src/calibre/utils/opensearch/__init__.py
@@ -3,7 +3,7 @@ Based on the OpenSearch Python module by Ed Summers from
https://github.com/edsu/opensearch .
This module is heavily modified and does not implement all the features from
-the original. The ability for the the module to perform a search and retrieve
+the original. The ability for the module to perform a search and retrieve
search results has been removed. The original module used a modified version
of the Universal feed parser from http://feedparser.org/ . The use of
FeedPaser made getting search results very slow. There is also a bug in the
diff --git a/src/calibre/utils/threadpool.py b/src/calibre/utils/threadpool.py
index 1bafd7a2ff..a07fd11a97 100644
--- a/src/calibre/utils/threadpool.py
+++ b/src/calibre/utils/threadpool.py
@@ -123,7 +123,7 @@ class WorkRequest:
callback=None, exc_callback=None):
"""Create a work request for a callable and attach callbacks.
- A work request consists of the a callable to be executed by a
+ A work request consists of the callable to be executed by a
worker thread, a list of positional arguments, a dictionary
of keyword arguments.
diff --git a/src/duktape/duktape/duktape.c b/src/duktape/duktape/duktape.c
index 031e47e236..2ca6a5596f 100644
--- a/src/duktape/duktape/duktape.c
+++ b/src/duktape/duktape/duktape.c
@@ -49446,7 +49446,7 @@ DUK_INTERNAL duk_uint_fast32_t duk_hobject_pc2line_query(duk_context *ctx, duk_i
* duk_tval copies is not problematic with respect to side effects;
* care must be taken when holding and using argument duk_tval pointers.
*
- * - If a finalizer is executed, it may operate on the the same object
+ * - If a finalizer is executed, it may operate on the same object
* we're currently dealing with. For instance, the finalizer might
* delete a certain property which has already been looked up and
* confirmed to exist. Ideally finalizers would be disabled if GC
@@ -76353,7 +76353,7 @@ void duk_lexer_parse_js_input_element(duk_lexer_ctx *lex_ctx,
* "pre-parsing", followed by an actual, accurate parser step.
*
* Note: the leading sign character ('+' or '-') is -not- part of
- * the production in E5 grammar, and that the a DecimalLiteral
+ * the production in E5 grammar, and that the DecimalLiteral
* starting with a '0' must be followed by a non-digit. Leading
* zeroes are syntax errors and must be checked for.
*