pdf-file-renamer 0.4.2__py3-none-any.whl → 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pdf_renamer → pdf_file_renamer}/__init__.py +1 -1
- pdf_file_renamer/application/__init__.py +7 -0
- {pdf_renamer → pdf_file_renamer}/application/filename_service.py +2 -2
- {pdf_renamer → pdf_file_renamer}/application/pdf_rename_workflow.py +2 -2
- {pdf_renamer → pdf_file_renamer}/application/rename_service.py +1 -1
- {pdf_renamer → pdf_file_renamer}/domain/__init__.py +2 -2
- {pdf_renamer → pdf_file_renamer}/domain/ports.py +1 -1
- {pdf_renamer → pdf_file_renamer}/infrastructure/__init__.py +1 -1
- pdf_file_renamer/infrastructure/llm/__init__.py +5 -0
- {pdf_renamer → pdf_file_renamer}/infrastructure/llm/pydantic_ai_provider.py +2 -2
- pdf_file_renamer/infrastructure/pdf/__init__.py +7 -0
- {pdf_renamer → pdf_file_renamer}/infrastructure/pdf/composite.py +2 -2
- {pdf_renamer → pdf_file_renamer}/infrastructure/pdf/docling_extractor.py +2 -2
- {pdf_renamer → pdf_file_renamer}/infrastructure/pdf/pymupdf_extractor.py +2 -2
- {pdf_renamer → pdf_file_renamer}/main.py +1 -1
- pdf_file_renamer/presentation/__init__.py +6 -0
- {pdf_renamer → pdf_file_renamer}/presentation/cli.py +5 -5
- {pdf_renamer → pdf_file_renamer}/presentation/formatters.py +1 -1
- {pdf_file_renamer-0.4.2.dist-info → pdf_file_renamer-0.5.0.dist-info}/METADATA +13 -14
- pdf_file_renamer-0.5.0.dist-info/RECORD +25 -0
- {pdf_file_renamer-0.4.2.dist-info → pdf_file_renamer-0.5.0.dist-info}/WHEEL +1 -2
- pdf_file_renamer-0.5.0.dist-info/entry_points.txt +2 -0
- pdf_file_renamer-0.4.2.dist-info/RECORD +0 -26
- pdf_file_renamer-0.4.2.dist-info/entry_points.txt +0 -2
- pdf_file_renamer-0.4.2.dist-info/top_level.txt +0 -1
- pdf_renamer/application/__init__.py +0 -7
- pdf_renamer/infrastructure/llm/__init__.py +0 -5
- pdf_renamer/infrastructure/pdf/__init__.py +0 -7
- pdf_renamer/presentation/__init__.py +0 -6
- {pdf_renamer → pdf_file_renamer}/domain/models.py +0 -0
- {pdf_renamer → pdf_file_renamer}/infrastructure/config.py +0 -0
- {pdf_file_renamer-0.4.2.dist-info → pdf_file_renamer-0.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
"""Application layer - use cases and business logic orchestration."""
|
2
|
+
|
3
|
+
from pdf_file_renamer.application.filename_service import FilenameService
|
4
|
+
from pdf_file_renamer.application.pdf_rename_workflow import PDFRenameWorkflow
|
5
|
+
from pdf_file_renamer.application.rename_service import RenameService
|
6
|
+
|
7
|
+
__all__ = ["FilenameService", "PDFRenameWorkflow", "RenameService"]
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
import re
|
4
4
|
|
5
|
-
from
|
6
|
-
from
|
5
|
+
from pdf_file_renamer.domain.models import FilenameResult, PDFContent
|
6
|
+
from pdf_file_renamer.domain.ports import FilenameGenerator, LLMProvider
|
7
7
|
|
8
8
|
|
9
9
|
class FilenameService(FilenameGenerator):
|
@@ -4,8 +4,8 @@ import asyncio
|
|
4
4
|
from collections.abc import Callable
|
5
5
|
from pathlib import Path
|
6
6
|
|
7
|
-
from
|
8
|
-
from
|
7
|
+
from pdf_file_renamer.domain.models import FileRenameOperation
|
8
|
+
from pdf_file_renamer.domain.ports import (
|
9
9
|
FilenameGenerator,
|
10
10
|
FileRenamer,
|
11
11
|
PDFExtractor,
|
@@ -1,12 +1,12 @@
|
|
1
1
|
"""Domain layer - pure business logic with no external dependencies."""
|
2
2
|
|
3
|
-
from
|
3
|
+
from pdf_file_renamer.domain.models import (
|
4
4
|
FilenameResult,
|
5
5
|
FileRenameOperation,
|
6
6
|
PDFContent,
|
7
7
|
PDFMetadata,
|
8
8
|
)
|
9
|
-
from
|
9
|
+
from pdf_file_renamer.domain.ports import (
|
10
10
|
FilenameGenerator,
|
11
11
|
FileRenamer,
|
12
12
|
LLMProvider,
|
@@ -17,8 +17,8 @@ from tenacity import (
|
|
17
17
|
wait_exponential,
|
18
18
|
)
|
19
19
|
|
20
|
-
from
|
21
|
-
from
|
20
|
+
from pdf_file_renamer.domain.models import ConfidenceLevel, FilenameResult
|
21
|
+
from pdf_file_renamer.domain.ports import LLMProvider
|
22
22
|
|
23
23
|
# System prompt for filename generation
|
24
24
|
FILENAME_GENERATION_PROMPT = """You are an expert at creating concise, descriptive filenames for academic papers and technical documents.
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"""PDF extraction implementations."""
|
2
|
+
|
3
|
+
from pdf_file_renamer.infrastructure.pdf.composite import CompositePDFExtractor
|
4
|
+
from pdf_file_renamer.infrastructure.pdf.docling_extractor import DoclingPDFExtractor
|
5
|
+
from pdf_file_renamer.infrastructure.pdf.pymupdf_extractor import PyMuPDFExtractor
|
6
|
+
|
7
|
+
__all__ = ["CompositePDFExtractor", "DoclingPDFExtractor", "PyMuPDFExtractor"]
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
from pathlib import Path
|
4
4
|
|
5
|
-
from
|
6
|
-
from
|
5
|
+
from pdf_file_renamer.domain.models import PDFContent
|
6
|
+
from pdf_file_renamer.domain.ports import PDFExtractor
|
7
7
|
|
8
8
|
|
9
9
|
class CompositePDFExtractor(PDFExtractor):
|
@@ -6,8 +6,8 @@ from pathlib import Path
|
|
6
6
|
from docling_core.types.doc.page import TextCellUnit
|
7
7
|
from docling_parse.pdf_parser import DoclingPdfParser
|
8
8
|
|
9
|
-
from
|
10
|
-
from
|
9
|
+
from pdf_file_renamer.domain.models import PDFContent, PDFMetadata
|
10
|
+
from pdf_file_renamer.domain.ports import PDFExtractor
|
11
11
|
|
12
12
|
|
13
13
|
class DoclingPDFExtractor(PDFExtractor):
|
@@ -5,8 +5,8 @@ from pathlib import Path
|
|
5
5
|
|
6
6
|
import pymupdf
|
7
7
|
|
8
|
-
from
|
9
|
-
from
|
8
|
+
from pdf_file_renamer.domain.models import PDFContent, PDFMetadata
|
9
|
+
from pdf_file_renamer.domain.ports import PDFExtractor
|
10
10
|
|
11
11
|
|
12
12
|
class PyMuPDFExtractor(PDFExtractor):
|
@@ -9,19 +9,19 @@ import typer
|
|
9
9
|
from rich.console import Console
|
10
10
|
from rich.live import Live
|
11
11
|
|
12
|
-
from
|
12
|
+
from pdf_file_renamer.application import (
|
13
13
|
FilenameService,
|
14
14
|
PDFRenameWorkflow,
|
15
15
|
RenameService,
|
16
16
|
)
|
17
|
-
from
|
18
|
-
from
|
19
|
-
from
|
17
|
+
from pdf_file_renamer.infrastructure.config import Settings
|
18
|
+
from pdf_file_renamer.infrastructure.llm import PydanticAIProvider
|
19
|
+
from pdf_file_renamer.infrastructure.pdf import (
|
20
20
|
CompositePDFExtractor,
|
21
21
|
DoclingPDFExtractor,
|
22
22
|
PyMuPDFExtractor,
|
23
23
|
)
|
24
|
-
from
|
24
|
+
from pdf_file_renamer.presentation.formatters import (
|
25
25
|
InteractivePrompt,
|
26
26
|
ProgressDisplay,
|
27
27
|
ResultsTable,
|
@@ -1,28 +1,27 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pdf-file-renamer
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.5.0
|
4
4
|
Summary: Intelligent PDF renaming using LLMs
|
5
|
-
Requires-Python: >=3.11
|
6
|
-
Description-Content-Type: text/markdown
|
7
5
|
License-File: LICENSE
|
8
|
-
Requires-
|
6
|
+
Requires-Python: >=3.11
|
7
|
+
Requires-Dist: docling-core>=2.0.0
|
8
|
+
Requires-Dist: docling-parse>=2.0.0
|
9
9
|
Requires-Dist: pydantic-ai>=1.0.17
|
10
10
|
Requires-Dist: pydantic-settings>=2.7.1
|
11
|
+
Requires-Dist: pydantic>=2.10.6
|
11
12
|
Requires-Dist: pymupdf>=1.26.5
|
12
|
-
Requires-Dist: docling-parse>=2.0.0
|
13
|
-
Requires-Dist: docling-core>=2.0.0
|
14
13
|
Requires-Dist: python-dotenv>=1.1.1
|
15
14
|
Requires-Dist: rich>=14.2.0
|
16
|
-
Requires-Dist: typer>=0.19.2
|
17
15
|
Requires-Dist: tenacity>=9.0.0
|
16
|
+
Requires-Dist: typer>=0.19.2
|
18
17
|
Provides-Extra: dev
|
19
|
-
Requires-Dist:
|
20
|
-
Requires-Dist: pytest-
|
21
|
-
Requires-Dist: pytest-
|
22
|
-
Requires-Dist: pytest-mock>=3.14.0; extra ==
|
23
|
-
Requires-Dist:
|
24
|
-
Requires-Dist:
|
25
|
-
|
18
|
+
Requires-Dist: mypy>=1.14.1; extra == 'dev'
|
19
|
+
Requires-Dist: pytest-asyncio>=0.25.2; extra == 'dev'
|
20
|
+
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
|
21
|
+
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
|
22
|
+
Requires-Dist: pytest>=8.3.4; extra == 'dev'
|
23
|
+
Requires-Dist: ruff>=0.9.1; extra == 'dev'
|
24
|
+
Description-Content-Type: text/markdown
|
26
25
|
|
27
26
|
# PDF Renamer
|
28
27
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
pdf_file_renamer/__init__.py,sha256=-AwcDwYbiTXKjPI_TJHHlhklYB5-u-tskiT3o5kT0Dc,85
|
2
|
+
pdf_file_renamer/main.py,sha256=FTEEb-9QmOOsN9SE8L1SZvFVIkVpQDy8xZ5a8t8CWUs,145
|
3
|
+
pdf_file_renamer/application/__init__.py,sha256=riSV7UXBenkDst7Nnf11N1_RuRtM7wpKdwugxOhumS4,363
|
4
|
+
pdf_file_renamer/application/filename_service.py,sha256=5nXEzWn2L_9R2-eEsxto-DdiE1mimlxuhepOPlOr78E,2039
|
5
|
+
pdf_file_renamer/application/pdf_rename_workflow.py,sha256=4Onxzk5x87kXDd8O4v8YTZpnuHbmT-TkMqcd2lKPJ-0,4720
|
6
|
+
pdf_file_renamer/application/rename_service.py,sha256=vviNQolk_w-qDQvOKTKj8ZhqYyyNWL-VJMfuUnL6WLw,2357
|
7
|
+
pdf_file_renamer/domain/__init__.py,sha256=jxbH3h6xaCnSRuBxclFESl6ZE1pua_I1K4CRAaYxu_I,503
|
8
|
+
pdf_file_renamer/domain/models.py,sha256=7S2ul3BoWi2aivWtmDa9LRlmeqURrGEV1sfSu8W6x5k,2246
|
9
|
+
pdf_file_renamer/domain/ports.py,sha256=YadoFyYccrac0YEKxqCrR0Vkbg04r8uccFpyDC_eilo,2555
|
10
|
+
pdf_file_renamer/infrastructure/__init__.py,sha256=C3ZQ7WCPCa6PMfP00lu4wqb0r57GVyDdiD5EL2DhCeY,187
|
11
|
+
pdf_file_renamer/infrastructure/config.py,sha256=baNL5_6_NNiS50ZNdql7fDwQbeAwf6f58HGYIWFQxQQ,2464
|
12
|
+
pdf_file_renamer/infrastructure/llm/__init__.py,sha256=ToB8__mHvXwaIukGKPEAQ8SeC4ZLiH4auZI1P1yH5PQ,159
|
13
|
+
pdf_file_renamer/infrastructure/llm/pydantic_ai_provider.py,sha256=kVsmj0NIawkj-1WWM0hZXbsNH09GabVZm9HPlYsxGuo,9217
|
14
|
+
pdf_file_renamer/infrastructure/pdf/__init__.py,sha256=uMHqxSXNLZH5WH_e1kXrp9m7uTqPkiI2hXjNo6rCRoo,368
|
15
|
+
pdf_file_renamer/infrastructure/pdf/composite.py,sha256=dNrrcGTsGf1LLF4F0AoF7jRbvLkgRGnIF6XNGlg92n4,1801
|
16
|
+
pdf_file_renamer/infrastructure/pdf/docling_extractor.py,sha256=auZrJpK7mMg1mUXK6ptjZC1pnAUQje1h7ZAS7gFUBzo,3974
|
17
|
+
pdf_file_renamer/infrastructure/pdf/pymupdf_extractor.py,sha256=C61udZCqGqiVx7T0HWNyjvnhgv5AgMIcCYtrhgHOJwk,5465
|
18
|
+
pdf_file_renamer/presentation/__init__.py,sha256=1VR44GoPGTixk3hG5YzhGyQf7a4BTKsJBd2VP3rHcFM,211
|
19
|
+
pdf_file_renamer/presentation/cli.py,sha256=8SLM1v_9VKntc7JrlEs7e2ZkMfZWRoSWryG-oVMrxg4,7844
|
20
|
+
pdf_file_renamer/presentation/formatters.py,sha256=Yl-Et7OKMfthyLqTA5qEtSAqh0PfHKp3lNNBA_dn01c,8519
|
21
|
+
pdf_file_renamer-0.5.0.dist-info/METADATA,sha256=XTOPPHhdelMHhexy2o8-0a9jHh3DN0vuOPBaMm21tzA,8646
|
22
|
+
pdf_file_renamer-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
23
|
+
pdf_file_renamer-0.5.0.dist-info/entry_points.txt,sha256=0fEGYy60chGE9rECWeCVPxjxzz6vMtIAYdFvmH7xzbw,63
|
24
|
+
pdf_file_renamer-0.5.0.dist-info/licenses/LICENSE,sha256=_w08V08WgoMpDMlGNlkIatC5QfQ_Ds_rXOBM8pl7ffE,1068
|
25
|
+
pdf_file_renamer-0.5.0.dist-info/RECORD,,
|
@@ -1,26 +0,0 @@
|
|
1
|
-
pdf_file_renamer-0.4.2.dist-info/licenses/LICENSE,sha256=_w08V08WgoMpDMlGNlkIatC5QfQ_Ds_rXOBM8pl7ffE,1068
|
2
|
-
pdf_renamer/__init__.py,sha256=3RvsqaTO80Ud1KZZdLL_Lh-HXxagncoqI4m6u3VL_UE,85
|
3
|
-
pdf_renamer/main.py,sha256=5eTsrCQaotNwbdwJwandOlzrWODI73-L5mALHUIvqyw,140
|
4
|
-
pdf_renamer/application/__init__.py,sha256=EebV66jsZjubnh6PSEeNGs0A_JGeYXFghzGLDQ92eco,348
|
5
|
-
pdf_renamer/application/filename_service.py,sha256=Gk-nPnURsJYLDvoG_NZ4o_yHwAqK6bHU8kqzlev0XXM,2029
|
6
|
-
pdf_renamer/application/pdf_rename_workflow.py,sha256=MEUmDR6bLRB-ncNgKk3ahIfsIIk3Gsw1048cId6pYv4,4710
|
7
|
-
pdf_renamer/application/rename_service.py,sha256=rnScP2JwKMrIJcplFvxC0b2MOLzWqxpPKc3uDLHPjRI,2352
|
8
|
-
pdf_renamer/domain/__init__.py,sha256=UPcXunsI30iFK9dupv2Fc_YDreT1tAqsYaGEAK9sJew,493
|
9
|
-
pdf_renamer/domain/models.py,sha256=7S2ul3BoWi2aivWtmDa9LRlmeqURrGEV1sfSu8W6x5k,2246
|
10
|
-
pdf_renamer/domain/ports.py,sha256=ecnpkFYB3259ZjaZaOVo1sjP8nXD3x1NGR6hN5nn3gc,2550
|
11
|
-
pdf_renamer/infrastructure/__init__.py,sha256=CxBinDAuNm2X57-Y7XdXxVL6uHQXQqWpPrlznzu5_1M,182
|
12
|
-
pdf_renamer/infrastructure/config.py,sha256=baNL5_6_NNiS50ZNdql7fDwQbeAwf6f58HGYIWFQxQQ,2464
|
13
|
-
pdf_renamer/infrastructure/llm/__init__.py,sha256=evEhabaBshvekLO9DlAZvp-pQ_u03zYXqXaDfa9QUww,154
|
14
|
-
pdf_renamer/infrastructure/llm/pydantic_ai_provider.py,sha256=FM2Sd3n3lltJC76afrem5QuuS8qApEma52YD-Y8K89Y,9207
|
15
|
-
pdf_renamer/infrastructure/pdf/__init__.py,sha256=-WHYNLeBekm7jwIXRj4xpSIXyZz9olDiMIJLUjv2B-U,353
|
16
|
-
pdf_renamer/infrastructure/pdf/composite.py,sha256=1tlZ_X9_KVY01GTr1Hg3x_Ag7g3g4ik6_8R0jip8Wx0,1791
|
17
|
-
pdf_renamer/infrastructure/pdf/docling_extractor.py,sha256=7UamnbYFMgtD53oMqu1qKAq3FyQTQlq0Uw0k1sNzPw8,3964
|
18
|
-
pdf_renamer/infrastructure/pdf/pymupdf_extractor.py,sha256=lwIPr9yhy2hZVnuvoLcZvmjYSzbTra0AyW59UvU7GgU,5455
|
19
|
-
pdf_renamer/presentation/__init__.py,sha256=mxIxy8POUwewiMsmrOMVA8z9pe57lOghuwHZ5RAbMo4,201
|
20
|
-
pdf_renamer/presentation/cli.py,sha256=ykZx22quR9ye-ui9bLrRinD7BSChjSbGTRsazCafo5s,7819
|
21
|
-
pdf_renamer/presentation/formatters.py,sha256=ilUcXZ-7MpBlz7k7cqRAuixfkVT3cuD-pBcy5fsE2Qo,8514
|
22
|
-
pdf_file_renamer-0.4.2.dist-info/METADATA,sha256=xSIAQrGaKmT2o2vOT5HlX6ILaTmDyYbn6P8YG8JtK8U,8668
|
23
|
-
pdf_file_renamer-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
24
|
-
pdf_file_renamer-0.4.2.dist-info/entry_points.txt,sha256=IvW2oP2SRPv5qqFwDYBRCE53Q3JAyi_chbCo-0rdKQA,53
|
25
|
-
pdf_file_renamer-0.4.2.dist-info/top_level.txt,sha256=CFtpWKQjLObHZIssi5I3q7FXfLJZWKpHo7uuAiJ0pVY,12
|
26
|
-
pdf_file_renamer-0.4.2.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
pdf_renamer
|
@@ -1,7 +0,0 @@
|
|
1
|
-
"""Application layer - use cases and business logic orchestration."""
|
2
|
-
|
3
|
-
from pdf_renamer.application.filename_service import FilenameService
|
4
|
-
from pdf_renamer.application.pdf_rename_workflow import PDFRenameWorkflow
|
5
|
-
from pdf_renamer.application.rename_service import RenameService
|
6
|
-
|
7
|
-
__all__ = ["FilenameService", "PDFRenameWorkflow", "RenameService"]
|
@@ -1,7 +0,0 @@
|
|
1
|
-
"""PDF extraction implementations."""
|
2
|
-
|
3
|
-
from pdf_renamer.infrastructure.pdf.composite import CompositePDFExtractor
|
4
|
-
from pdf_renamer.infrastructure.pdf.docling_extractor import DoclingPDFExtractor
|
5
|
-
from pdf_renamer.infrastructure.pdf.pymupdf_extractor import PyMuPDFExtractor
|
6
|
-
|
7
|
-
__all__ = ["CompositePDFExtractor", "DoclingPDFExtractor", "PyMuPDFExtractor"]
|
File without changes
|
File without changes
|
File without changes
|