Skip to content

Commit

Permalink
Merge commit 'a61b62e0f24f3b94d6f943a7d41543069f30edaf' of https://gi…
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiHuaDou committed Jun 5, 2024
2 parents 1101640 + a61b62e commit 973b0ac
Show file tree
Hide file tree
Showing 1,703 changed files with 9,102 additions and 5,168 deletions.
55 changes: 52 additions & 3 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,56 @@
# - title by author
# }}}

{{{ 7.8.0 2024-04-05

:: new features

- [2057929] E-book viewer: Highlight panel: Allow filtering the shown highlights by type of highlight

- Conversion: Add support for the CSS text-transform property when subsetting embedded fonts

- [2060079] E-book viewer: Allow displaying the view mode paged/flow in the header/footer

- [2059162] Book details popup window: Allow dropping of files to add formats/set the cover just as for the book details panel

- [2058814] Book details: Context menu: Add a menu action to remove the associated link

- DOCX Input: Add role=doc-noteref for links to footnotes/endnotes so that they popup in more e-book readers

- Add a "Mark all selected books" to the Mark action.

- [2059169] Add "Hide Empty Categories" to tag browser configuration menu

- Supernote: Support for new device firmware

- Sort by tool: Add an action to re-apply the current sort

:: bug fixes

- Grid view cover cache: Fix covers not loading when cache entries are stale

- [2058798] Conversion: Do not change viewport relative font sizes used for SVG text elements

- [2058798] Conversion: Fix <style> tags inside <svg> tags not being processed

- Get books: Update Kobo store plugin for website changes

- EPUB Input: Use a translated name for the cover page


:: improved recipes
- Caravan
- Global Times
- New York Review of Books
- Himal Southasian
- The Week
- CBC Canada

:: new recipes
- Bergfreunde Blog by VoHe
- Live Law and Politico.eu by unkn0wn
}}}

{{{ 7.7.0 2024-03-14

:: new features
Expand Down Expand Up @@ -54,7 +104,7 @@
:: improved recipes
- LiveMint
- Bloomberg
- Natural Geographic
- National Geographic
- MIT Technology Review
- NY Review of Books
- Scientific American
Expand Down Expand Up @@ -85,7 +135,7 @@

- Edit book: Live CSS: Fix regression causing incorrect colors in calibre 7

- Windows: Fix a regression in calibre 7 that caused images in long text columns to not be displayed in the tooltip for the tooltip
- Windows: Fix a regression in calibre 7 that caused images in long text columns to not be displayed in the tooltip for the column

- Fix disabled items in menus having blurry text

Expand Down Expand Up @@ -1683,4 +1733,3 @@ Then, when searching the Tag browser, press Ctrl+Alt+Shift+F to restrict the dis
- Business Standard Print Edition by unkn0wn
- The Economic Times India Print Edition by unkn0wn
}}}

6 changes: 2 additions & 4 deletions bypy/init_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
import subprocess
import sys

from bypy.constants import (
LIBDIR, PREFIX, PYTHON, SRC as CALIBRE_DIR, build_dir, islinux, ismacos,
worker_env
)
from bypy.constants import LIBDIR, PREFIX, PYTHON, build_dir, islinux, ismacos, worker_env
from bypy.constants import SRC as CALIBRE_DIR
from bypy.utils import run_shell

dlls = [
Expand Down
14 changes: 4 additions & 10 deletions bypy/linux/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@
import time
from functools import partial

from bypy.constants import (
LIBDIR, OUTPUT_DIR, PREFIX, SRC as CALIBRE_DIR, python_major_minor_version,
)
from bypy.freeze import (
extract_extension_modules, fix_pycryptodome, freeze_python, is_package_dir,
path_to_freeze_dir,
)
from bypy.utils import (
create_job, get_dll_path, mkdtemp, parallel_build, py_compile, run, walk,
)
from bypy.constants import LIBDIR, OUTPUT_DIR, PREFIX, python_major_minor_version
from bypy.constants import SRC as CALIBRE_DIR
from bypy.freeze import extract_extension_modules, fix_pycryptodome, freeze_python, is_package_dir, path_to_freeze_dir
from bypy.utils import create_job, get_dll_path, mkdtemp, parallel_build, py_compile, run, walk

j = os.path.join
self_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down
14 changes: 4 additions & 10 deletions bypy/macos/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,10 @@
from functools import partial, reduce
from itertools import repeat

from bypy.constants import (
OUTPUT_DIR, PREFIX, PYTHON, SRC as CALIBRE_DIR, python_major_minor_version,
)
from bypy.freeze import (
extract_extension_modules, fix_pycryptodome, freeze_python, is_package_dir,
path_to_freeze_dir,
)
from bypy.utils import (
current_dir, get_arches_in_binary, mkdtemp, py_compile, timeit, walk,
)
from bypy.constants import OUTPUT_DIR, PREFIX, PYTHON, python_major_minor_version
from bypy.constants import SRC as CALIBRE_DIR
from bypy.freeze import extract_extension_modules, fix_pycryptodome, freeze_python, is_package_dir, path_to_freeze_dir
from bypy.utils import current_dir, get_arches_in_binary, mkdtemp, py_compile, timeit, walk

abspath, join, basename, dirname = os.path.abspath, os.path.join, os.path.basename, os.path.dirname
iv = globals()['init_env']
Expand Down
5 changes: 1 addition & 4 deletions bypy/macos/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import plistlib
from glob import glob

from bypy.macos_sign import (
codesign, create_entitlements_file, make_certificate_useable, notarize_app,
verify_signature
)
from bypy.macos_sign import codesign, create_entitlements_file, make_certificate_useable, notarize_app, verify_signature
from bypy.utils import current_dir

entitlements = {
Expand Down
1 change: 1 addition & 0 deletions bypy/macos/site.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import builtins
import os
import sys

import _sitebuiltins

USER_SITE = None
Expand Down
11 changes: 3 additions & 8 deletions bypy/windows/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
import sys
import zipfile

from bypy.constants import (
CL, LINK, MT, PREFIX, RC, SIGNTOOL, SRC as CALIBRE_DIR, SW, build_dir,
python_major_minor_version, worker_env
)
from bypy.freeze import (
cleanup_site_packages, extract_extension_modules, freeze_python,
path_to_freeze_dir
)
from bypy.constants import CL, LINK, MT, PREFIX, RC, SIGNTOOL, SW, build_dir, python_major_minor_version, worker_env
from bypy.constants import SRC as CALIBRE_DIR
from bypy.freeze import cleanup_site_packages, extract_extension_modules, freeze_python, path_to_freeze_dir
from bypy.utils import mkdtemp, py_compile, run, walk

iv = globals()['init_env']
Expand Down
3 changes: 2 additions & 1 deletion bypy/windows/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import os
import sys
from importlib import import_module
from importlib.util import spec_from_file_location
from importlib.machinery import EXTENSION_SUFFIXES
from importlib.util import spec_from_file_location

import _sitebuiltins

Expand Down Expand Up @@ -96,6 +96,7 @@ def fake_getline(filename, lineno, module_globals=None):
except Exception:
if sys.gui_app and sys.excepthook == sys.__excepthook__:
import traceback

import calibre_os_module
calibre_os_module.gui_error_message(
f"Unhandled exception running {sys.calibre_basename}",
Expand Down
2 changes: 1 addition & 1 deletion bypy/windows/wix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>

from itertools import count
import os
import shutil
from itertools import count

from bypy.constants import is64bit
from bypy.utils import run
Expand Down
2 changes: 1 addition & 1 deletion format_docs/pdb/mobi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from (https://wiki.mobileread.com/wiki/MOBI)
About
-----

MOBI is the format used by the the MobiPocket Reader. It may have a .mobi
MOBI is the format used by the MobiPocket Reader. It may have a .mobi
extension or it may have a .prc extension. The extension can be changed by the
user to either of the accepted forms. In either case it may be DRM protected or
non-DRM. The .prc extension is used because the PalmOS doesn't support any file
Expand Down
2 changes: 1 addition & 1 deletion format_docs/pdb/plucker.html
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ <h3><a name="navigation_dr">Navigation metadata</a></h3>

<td>String sequence</td>

<td>A concatenated sequence of NUL-terminated strings, each an anchor name name. The relative
<td>A concatenated sequence of NUL-terminated strings, each an anchor name. The relative
location of an anchor name string in the string sequence represents its index into the anchor
name data.</td>
</tr>
Expand Down
5 changes: 4 additions & 1 deletion icons/icns/make_iconsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'

import os, shutil, subprocess, sys
import os
import shutil
import subprocess
import sys

d, j, a = (getattr(os.path, x) for x in ('dirname', 'join', 'abspath'))
base = d(a(__file__))
Expand Down
5 changes: 4 additions & 1 deletion icons/make_ico_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'

import os, shutil, subprocess, sys
import os
import shutil
import subprocess
import sys

d, j, a = (getattr(os.path, x) for x in ('dirname', 'join', 'abspath'))
base = d(a(__file__))
Expand Down
7 changes: 6 additions & 1 deletion imgsrc/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>

import os, glob, subprocess, argparse, json, hashlib
import argparse
import glob
import hashlib
import json
import os
import subprocess

duplicates = {
'character-set': ['languages'],
Expand Down
5 changes: 4 additions & 1 deletion imgsrc/render-logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>


import os, subprocess, sys, shutil
import os
import shutil
import subprocess
import sys

j = os.path.join
base = os.path.dirname(os.path.abspath(__file__))
Expand Down
4 changes: 3 additions & 1 deletion imgsrc/srv/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# License: GPLv3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>


import os, re, sys
import os
import re
import sys

from lxml import etree

Expand Down
8 changes: 6 additions & 2 deletions manual/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'

import sys, os, subprocess, shutil
import os
import shutil
import subprocess
import sys
import tempfile
from functools import partial

Expand All @@ -15,8 +18,9 @@

sys.path.insert(0, d(BASE))
from setup import __appname__, __version__
from calibre.ebooks.oeb.polish.container import epub_to_azw3

sys.path.remove(d(BASE))
from calibre.ebooks.oeb.polish.container import epub_to_azw3


def sphinx_build(language, base, builder='html', bdir='html', t=None, quiet=True, very_quiet=False):
Expand Down
13 changes: 10 additions & 3 deletions manual/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@
# All configuration values have a default value; values that are commented out
# serve to show the default value.

import sys, os, errno
import errno
import os
import sys
from datetime import date

# If your extensions are in another directory, add it here.
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
sys.path.insert(0, os.path.dirname(base))
from setup import __appname__, __version__
from calibre.utils.localization import localize_website_link

sys.path.append(base)

import calibre.utils.img as cimg
import custom
from calibre.utils.localization import localize_website_link

del sys.path[0]

custom, cimg
# General configuration
# ---------------------
Expand Down Expand Up @@ -158,6 +164,7 @@ def generated_langs():
html_short_title = _('Start')

from calibre.utils.localization import get_language

html_context = {}
html_context['other_languages'] = [
(lc, get_language(lc)) for lc in os.environ.get('ALL_USER_MANUAL_LANGUAGES', '').split() if lc != language]
Expand Down
9 changes: 4 additions & 5 deletions manual/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
import re
from functools import partial

from sphinx.util.console import bold
from sphinx.util.logging import getLogger

from calibre.linux import cli_index_strings, entry_points
from epub import EPUBHelpBuilder
from sphinx.util.console import bold
from sphinx.util.logging import getLogger


def info(*a):
Expand Down Expand Up @@ -86,7 +85,7 @@ def titlecase(language, x):


def generate_calibredb_help(preamble, language):
from calibre.db.cli.main import COMMANDS, option_parser_for, get_parser
from calibre.db.cli.main import COMMANDS, get_parser, option_parser_for
preamble = preamble[:preamble.find('\n\n\n', preamble.find('code-block'))]
preamble += '\n\n'
preamble += _('''\
Expand Down Expand Up @@ -156,8 +155,8 @@ def generate_calibredb_help(preamble, language):


def generate_ebook_convert_help(preamble, app):
from calibre.ebooks.conversion.cli import create_option_parser, manual_index_strings
from calibre.customize.ui import input_format_plugins, output_format_plugins
from calibre.ebooks.conversion.cli import create_option_parser, manual_index_strings
from calibre.utils.logging import default_log
preamble = re.sub(r'http.*\.html', ':ref:`conversion`', preamble)

Expand Down
8 changes: 4 additions & 4 deletions manual/epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

import os

from sphinx.builders.epub3 import Epub3Builder as EpubBuilder

from calibre.ebooks.oeb.base import OPF
from calibre.ebooks.oeb.polish.container import get_container, OEB_DOCS
from calibre.ebooks.oeb.polish.check.links import check_links, UnreferencedResource
from calibre.ebooks.oeb.polish.check.links import UnreferencedResource, check_links
from calibre.ebooks.oeb.polish.container import OEB_DOCS, get_container
from calibre.ebooks.oeb.polish.pretty import pretty_html_tree, pretty_opf
from calibre.utils.imghdr import identify
from sphinx.builders.epub3 import Epub3Builder as EpubBuilder

from polyglot.builtins import iteritems


Expand Down
2 changes: 1 addition & 1 deletion manual/gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ You can set only one of the search options `Case sensitive searching` and `Unacc
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`. Character variants are significant: `é` doesn't match `e`.

Two variants of equality searches are used for hierarchical items (e.g., A.B.C): hierarchical prefix searches and hierarchical component searches. The first, indicated by a single period after the equals (``=.``) matches the initial parts of a hierarchical item. The second, indicated by two periods after the the equals (``=..``) matches an internal name in the hierarchical item. Examples, using the tag ``History.Military.WWII`` as the value:
Two variants of equality searches are used for hierarchical items (e.g., A.B.C): hierarchical prefix searches and hierarchical component searches. The first, indicated by a single period after the equals (``=.``) matches the initial parts of a hierarchical item. The second, indicated by two periods after the equals (``=..``) matches an internal name in the hierarchical item. Examples, using the tag ``History.Military.WWII`` as the value:

* ``tags:"=.History"`` : True. ``History`` is a prefix of the tag.
* ``tags:"=.History.Military"`` : True. ``History.Military`` is a prefix of the tag.
Expand Down
Loading

0 comments on commit 973b0ac

Please sign in to comment.