Merge pull request #161418 from ozkutuk/init-videocr
This commit is contained in:
commit
6a3a14be42
@ -9253,6 +9253,12 @@
|
||||
githubId = 15930073;
|
||||
name = "Moritz Scheuren";
|
||||
};
|
||||
ozkutuk = {
|
||||
email = "ozkutuk@protonmail.com";
|
||||
github = "ozkutuk";
|
||||
githubId = 5948762;
|
||||
name = "Berk Özkütük";
|
||||
};
|
||||
pablovsky = {
|
||||
email = "dealberapablo07@gmail.com";
|
||||
github = "pablo1107";
|
||||
|
46
pkgs/development/python-modules/videocr/default.nix
Normal file
46
pkgs/development/python-modules/videocr/default.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python-Levenshtein
|
||||
, pytesseract
|
||||
, opencv4
|
||||
, fuzzywuzzy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "videocr";
|
||||
version = "0.1.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1clifwczvhvbaw2spgxkkyqsbqh21vyfw3rh094pxfmq89ylyj63";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python-Levenshtein
|
||||
pytesseract
|
||||
opencv4
|
||||
fuzzywuzzy
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "opencv-python" "opencv"
|
||||
substituteInPlace videocr/constants.py \
|
||||
--replace "master" "main"
|
||||
substituteInPlace videocr/video.py \
|
||||
--replace '--tessdata-dir "{}"' '--tessdata-dir="{}"'
|
||||
'';
|
||||
|
||||
# Project has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "videocr" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extract hardcoded subtitles from videos using machine learning";
|
||||
homepage = "https://github.com/apm1467/videocr";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ozkutuk ];
|
||||
};
|
||||
}
|
@ -10387,6 +10387,8 @@ in {
|
||||
|
||||
veryprettytable = callPackage ../development/python-modules/veryprettytable { };
|
||||
|
||||
videocr = callPackage ../development/python-modules/videocr { };
|
||||
|
||||
vidstab = callPackage ../development/python-modules/vidstab { };
|
||||
|
||||
ViennaRNA = toPythonModule pkgs.ViennaRNA;
|
||||
|
Loading…
Reference in New Issue
Block a user