ao3downloader: init at 2025.6.1 (#419739)

This commit is contained in:
Aleksana 2025-08-01 23:36:27 +08:00 committed by GitHub
commit 224e4e5306
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 118 additions and 0 deletions

View File

@ -0,0 +1,56 @@
{
lib,
python312Packages,
fetchFromGitHub,
}:
# ao3downloader explicitly does not support Python 3.13 yet
# https://github.com/nianeyna/ao3downloader/blob/f8399bb8aca276ae7359157b90afd13925c90056/pyproject.toml#L8
python312Packages.buildPythonApplication rec {
pname = "ao3downloader";
version = "2025.6.1";
pyproject = true;
src = fetchFromGitHub {
owner = "nianeyna";
repo = "ao3downloader";
tag = "v${version}";
hash = "sha256-ukS3uku8OW5nhM2Nr0IxAiG03XfqUn/Xyd0lZDGGkWw=";
};
build-system = with python312Packages; [
hatchling
];
dependencies = with python312Packages; [
beautifulsoup4
mobi
pdfquery
requests
six
tqdm
];
pythonRelaxDeps = [
"requests"
];
pythonImportsCheck = [
"ao3downloader"
];
nativeCheckInputs = with python312Packages; [
pytestCheckHook
syrupy
pythonImportsCheckHook
];
meta = {
description = "Utility for downloading fanfiction in bulk from the Archive of Our Own";
changelog = "https://github.com/nianeyna/ao3downloader/releases/tag/v${version}";
mainProgram = "ao3downloader";
homepage = "https://nianeyna.dev/ao3downloader";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.samasaur ];
};
}

View File

@ -0,0 +1,60 @@
{
buildPythonPackage,
fetchPypi,
lib,
cssselect,
chardet,
lxml,
pdfminer-six,
pyquery,
roman,
six,
setuptools,
}:
buildPythonPackage rec {
pname = "pdfquery";
version = "0.4.3";
pyproject = true;
# The latest version is on PyPI but not tagged on GitHub
src = fetchPypi {
inherit pname version;
hash = "sha256-oqKXTLMS/aT1aa3I1jN30l1cY2ckC0p7+xZTksc+Hc4=";
};
dependencies = [
cssselect
chardet
lxml
pdfminer-six
pyquery
roman
# Not explicitly listed in setup.py; found through trial and error
six
];
build-system = [
setuptools
];
# Although this package has tests, they aren't runnable with
# `unittestCheckHook` or `pytestCheckHook` because you're meant
# to run the tests with `python setup.py test`, but that's deprecated
# and doesn't work anymore. So there are no runnable tests.
doCheck = false;
# This runs as a different phase than checkPhase, so still runs
# despite `doCheck = false`
pythonImportsCheck = [
"pdfquery"
];
meta = {
description = "Concise, friendly PDF scraping using JQuery or XPath syntax";
homepage = "https://github.com/jcushman/pdfquery";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.samasaur ];
};
}

View File

@ -11358,6 +11358,8 @@ self: super: with self; {
pdfplumber = callPackage ../development/python-modules/pdfplumber { };
pdfquery = callPackage ../development/python-modules/pdfquery { };
pdfrw = callPackage ../development/python-modules/pdfrw { };
pdfrw2 = callPackage ../development/python-modules/pdfrw2 { };