(footnote order [^mono] [^wine_true] [^wine_maybe] [^wine_false])
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pypdfium2 | |
- matrix render helper & CLI | |
- input mode selection in CLI | |
- think about mutex sharing, and plugging in a mutex into the autoclose machinery | |
- native sourcebuild script (-> implicit fallback on setup) WIP | |
- download the pdfium version in autorelease record by default, not latest | |
ghostscript: | |
- handle formats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Four lines intentionally left blank | |
# SPDX-FileCopyrightText: 2025 geisserml <[email protected]> | |
# SPDX-License-Identifier: MPL-2.0 OR GPL-3.0-or-later | |
# Note that Ghostscript is AGPL-licensed, so this code is altogether affected by copyleft | |
# Written with Ghostscript 9.56.1 on Fedora. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see also https://wiki.ubuntuusers.de/DVDs_manuell_rippen/#Komplette-Spur-rippen | |
lsdvd /dev/sr0 # to show available tracks and their length | |
mplayer dvd://n -dvd-device /dev/sr0 # to preview a track -- where n is the track number (1-based) | |
mplayer dvd://n -dvd-device /dev/sr0 -v -dumpstream -dumpfile filename.vob # to rip track |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 geisserml <[email protected]> | |
# SPDX-License-Identifier: MPL-2.0 | |
from string import ascii_uppercase as ALPHABET | |
N_CHARS, ORD_A = len(ALPHABET), ord("A") # 26, 65 | |
def idx_to_label(i): | |
count, remainder = divmod(i, N_CHARS) | |
char = ALPHABET[remainder] # chr(remainder + ORD_A) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 geisserml <[email protected]> | |
# SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause OR MPL-2.0 | |
import sys | |
import importlib.util | |
def v1_deferred_import(modpath): | |
# FIXME If modpath points to a submodule (e.g. PIL.Image), the parent module will be loaded immediately when this function is called. What's more, non-deferred imports of the submodule will break. This seems to be a nasty limitation of the importlib APIs used here. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 geisserml <[email protected]> | |
# SPDX-FileCopyrightText: 2024 James R. Barlow <[email protected]> | |
# SPDX-License-Identifier: MPL-2.0 | |
# Initial code derived from ocrmypdf/_exec/ghostscript.py | |
# Note that Ghostscript is AGPL-licensed. However, we are calling it via subprocess here, so not sure whether copyleft would actually apply. | |
# See also https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation | |
import io | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 geisserml <[email protected]> | |
# SPDX-License-Identifier: MPL-2.0 | |
# Note that (py)mupdf is AGPL-licensed, so this code is altogether affected by copyleft | |
import PIL.Image | |
import fitz as pymupdf | |
def invoke_pymupdf(filepath, index, scale=4, rotation=0, password=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 geisserml <[email protected]> | |
# SPDX-License-Identifier: MPL-2.0 | |
# Note that Poppler is GPL-licensed, so this code is altogether affected by copyleft | |
import io | |
import PIL.Image | |
from popplerqt5 import Poppler | |
from PyQt5.QtCore import QByteArray, QBuffer | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 geisserml <[email protected]> | |
# SPDX-License-Identifier: MPL-2.0 | |
# Note that Poppler is GPL-licensed, so this code is altogether affected by copyleft | |
import PIL.Image | |
import poppler # python-poppler | |
from poppler.cpp.page_renderer import render_hint | |
def _translate_rotation(rotation): |
NewerOlder