docslicer 0.2.2__tar.gz → 0.2.3__tar.gz
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.
- {docslicer-0.2.2/src/docslicer.egg-info → docslicer-0.2.3}/PKG-INFO +2 -2
- {docslicer-0.2.2 → docslicer-0.2.3}/pyproject.toml +2 -2
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_result.py +14 -4
- {docslicer-0.2.2 → docslicer-0.2.3/src/docslicer.egg-info}/PKG-INFO +2 -2
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer.egg-info/SOURCES.txt +0 -1
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_charts.py +1 -1
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_exports.py +4 -4
- docslicer-0.2.2/LICENSE-COMMERCIAL.md +0 -29
- {docslicer-0.2.2 → docslicer-0.2.3}/LICENSE +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/README.md +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/setup.cfg +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_config.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_orchestrator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/color_utils.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/cpu.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/df_aggregation/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/df_aggregation/registry_aggregator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/df_aggregation/text_merge.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/df_export/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/df_export/export_debug.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/df_export/reorder_columns.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/yaml_compilers/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/yaml_compilers/exhibit_patterns.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/yaml_compilers/hierarchy_type_patterns.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/yaml_compilers/page_label_patterns.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/yaml_loader.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/layout/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/layout/gutter_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/layout/layouts.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/layout/line_merger.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/layout/line_number_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/layout/reading_order.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/layout/shape_processor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/oxm_package.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/parallel.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/password.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/safe_call.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/table/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/table/table_header.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/table/table_normalize.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/table/table_schema.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/text_utils.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/timing.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/cli.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/config/common_author_names.csv +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/config/exhibit_patterns.yaml +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/config/hierarchy_type_patterns.yaml +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/config/page_label_patterns.yaml +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/docx_orchestrator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/native_metadata.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/step_01_package_reader.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/step_02_run_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/step_03_chart_point_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/step_04_table_cell_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/step_05_paragraph_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/step_06_line_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/docx/step_07_style_prefiller.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/extract_boxes.js +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/html_orchestrator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/native_metadata.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/step_01_box_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/step_01_static_box_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/step_02_box_cleaner.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/step_03_page_label_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/step_04_line_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/step_05_table_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/html/step_06_style_prefiller.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/mcp/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/mcp/_store.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/mcp/server.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/metadata/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/metadata/consolidate.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/metadata/generator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/metadata/ocr_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/metadata/page_analysis.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/metadata/schema.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/metadata/text_fallback.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/_availability.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/ocr_orchestrator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/step_01_word_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/step_02_word_colorizer.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/step_03_shape_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/step_04_text_cleaner.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/ocr/step_05_font_size_estimator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/coordinates.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/form_fields.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/form_label_link.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/line_classification.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/page_rotation.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/script_thresholds.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/struct_context.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/_utils/struct_tree.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/native_metadata.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/pdf_orchestrator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_01_word_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_02_image_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_03_shape_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_04_link_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_05_struct_group.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_06_style_prefiller.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_07_stream_group.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_08_reading_order.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_09_word_relationships.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_10_cell_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_11_page_label_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_12_cell_grouper.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_13_line_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pdf/step_14_table_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/native_metadata.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/pptx_orchestrator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_01_package_reader.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_02_run_extractor.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_03_chart_point_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_04_table_cell_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_05_paragraph_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_06_reading_order.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_07_line_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/pptx/step_08_style_prefiller.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/config.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/cookie_consent.js +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/dispatcher.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/fetchers/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/fetchers/http_fetcher.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/fetchers/sec_fetcher.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/models.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/scraping/stealth_init.js +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/__init__.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/shared_orchestrator.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_01_navigation_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_02_toc_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_03_exhibit_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_04_section_classifier.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_05_heading_detector.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_06_hierarchy_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_07_block_merger.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/shared/step_08_chunk_builder.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer.egg-info/dependency_links.txt +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer.egg-info/entry_points.txt +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer.egg-info/requires.txt +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer.egg-info/top_level.txt +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_api.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_document_parser.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_errors.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_loose_box_reconstruction.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_packaging.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_smoke.py +0 -0
- {docslicer-0.2.2 → docslicer-0.2.3}/tests/test_table_cell_newlines.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docslicer
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: Answer questions from documents too large to fit in context, reading only the sections you need
|
|
5
5
|
Author-email: "Market Framer Inc." <jelle@docslicer.ai>
|
|
6
6
|
License-Expression: AGPL-3.0-only
|
|
7
7
|
Project-URL: Homepage, https://docslicer.ai
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "docslicer"
|
|
7
|
-
version = "0.2.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.2.3"
|
|
8
|
+
description = "Answer questions from documents too large to fit in context, reading only the sections you need"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "AGPL-3.0-only"
|
|
11
11
|
license-files = ["LICENSE"]
|
|
@@ -1110,7 +1110,8 @@ class ParseResult:
|
|
|
1110
1110
|
if self.charts:
|
|
1111
1111
|
_to_parquet(self.charts_df(), path / "charts.parquet")
|
|
1112
1112
|
(path / "metadata.json").write_text(
|
|
1113
|
-
json.dumps(self.metadata.to_dict(), indent=2, ensure_ascii=False)
|
|
1113
|
+
json.dumps(self.metadata.to_dict(), indent=2, ensure_ascii=False),
|
|
1114
|
+
encoding="utf-8",
|
|
1114
1115
|
)
|
|
1115
1116
|
return
|
|
1116
1117
|
|
|
@@ -1129,20 +1130,29 @@ class ParseResult:
|
|
|
1129
1130
|
if stem == "metadata":
|
|
1130
1131
|
if suffix != ".json":
|
|
1131
1132
|
raise ValueError("metadata can only be saved as .json")
|
|
1132
|
-
path.write_text(
|
|
1133
|
+
path.write_text(
|
|
1134
|
+
json.dumps(self.metadata.to_dict(), indent=2, ensure_ascii=False),
|
|
1135
|
+
encoding="utf-8",
|
|
1136
|
+
)
|
|
1133
1137
|
return
|
|
1134
1138
|
|
|
1135
1139
|
# Unknown stem (e.g. "result") → full document export
|
|
1136
1140
|
if stem not in level_map:
|
|
1137
1141
|
if suffix != ".json":
|
|
1138
1142
|
raise ValueError(f"Unknown stem {stem!r}: use chunks/blocks/tables/charts/metadata, or a .json path for a full export")
|
|
1139
|
-
path.write_text(
|
|
1143
|
+
path.write_text(
|
|
1144
|
+
json.dumps(self.to_dict(), indent=2, ensure_ascii=False),
|
|
1145
|
+
encoding="utf-8",
|
|
1146
|
+
)
|
|
1140
1147
|
return
|
|
1141
1148
|
|
|
1142
1149
|
rows_fn = level_map[stem]
|
|
1143
1150
|
|
|
1144
1151
|
if suffix == ".json":
|
|
1145
|
-
path.write_text(
|
|
1152
|
+
path.write_text(
|
|
1153
|
+
json.dumps(rows_fn(), indent=2, ensure_ascii=False),
|
|
1154
|
+
encoding="utf-8",
|
|
1155
|
+
)
|
|
1146
1156
|
elif suffix == ".jsonl":
|
|
1147
1157
|
with path.open("w", encoding="utf-8") as f:
|
|
1148
1158
|
for row in rows_fn():
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docslicer
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: Answer questions from documents too large to fit in context, reading only the sections you need
|
|
5
5
|
Author-email: "Market Framer Inc." <jelle@docslicer.ai>
|
|
6
6
|
License-Expression: AGPL-3.0-only
|
|
7
7
|
Project-URL: Homepage, https://docslicer.ai
|
|
@@ -85,7 +85,7 @@ def test_export_charts_csv(pptx_result, tmp_path):
|
|
|
85
85
|
path = tmp_path / "charts.csv"
|
|
86
86
|
pptx_result.export_charts_csv(path)
|
|
87
87
|
assert path.exists()
|
|
88
|
-
lines = path.read_text().splitlines()
|
|
88
|
+
lines = path.read_text(encoding="utf-8").splitlines()
|
|
89
89
|
# header + one row per datapoint
|
|
90
90
|
assert len(lines) == 1 + sum(len(c.points) for c in pptx_result.charts)
|
|
91
91
|
|
|
@@ -65,7 +65,7 @@ def test_export_chunks_jsonl(pdf_result, tmp_path):
|
|
|
65
65
|
path = tmp_path / "chunks.jsonl"
|
|
66
66
|
pdf_result.export_chunks_jsonl(path)
|
|
67
67
|
assert path.exists()
|
|
68
|
-
lines = path.read_text().splitlines()
|
|
68
|
+
lines = path.read_text(encoding="utf-8").splitlines()
|
|
69
69
|
assert len(lines) == len(pdf_result.chunks)
|
|
70
70
|
assert json.loads(lines[0])["id"] == pdf_result.chunks[0].id
|
|
71
71
|
|
|
@@ -102,7 +102,7 @@ def test_hierarchy_save(pdf_result, tmp_path):
|
|
|
102
102
|
path = tmp_path / "hierarchy.json"
|
|
103
103
|
pdf_result.hierarchy.save(path)
|
|
104
104
|
assert path.exists()
|
|
105
|
-
data = json.loads(path.read_text())
|
|
105
|
+
data = json.loads(path.read_text(encoding="utf-8"))
|
|
106
106
|
assert isinstance(data, list)
|
|
107
107
|
|
|
108
108
|
|
|
@@ -110,7 +110,7 @@ def test_hierarchy_save_minimal(pdf_result, tmp_path):
|
|
|
110
110
|
path = tmp_path / "hierarchy_minimal.json"
|
|
111
111
|
pdf_result.hierarchy.save(path, minimal=True)
|
|
112
112
|
assert path.exists()
|
|
113
|
-
data = json.loads(path.read_text())
|
|
113
|
+
data = json.loads(path.read_text(encoding="utf-8"))
|
|
114
114
|
assert isinstance(data, list)
|
|
115
115
|
if data:
|
|
116
116
|
assert set(data[0].keys()) <= {"text", "children"}
|
|
@@ -120,7 +120,7 @@ def test_hierarchy_save_outline(pdf_result, tmp_path):
|
|
|
120
120
|
path = tmp_path / "outline.md"
|
|
121
121
|
pdf_result.hierarchy.save_outline(path)
|
|
122
122
|
assert path.exists()
|
|
123
|
-
content = path.read_text()
|
|
123
|
+
content = path.read_text(encoding="utf-8")
|
|
124
124
|
assert isinstance(content, str)
|
|
125
125
|
|
|
126
126
|
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Licensing
|
|
2
|
-
|
|
3
|
-
Docslicer is dual-licensed.
|
|
4
|
-
|
|
5
|
-
## Open source — AGPL v3.0
|
|
6
|
-
|
|
7
|
-
Docslicer is available under the GNU Affero General Public License v3.0
|
|
8
|
-
(see LICENSE). You are free to use, modify, and distribute it under the
|
|
9
|
-
AGPL, provided you comply with its terms — including making the complete
|
|
10
|
-
source of any application that uses Docslicer available to its users,
|
|
11
|
-
including over a network.
|
|
12
|
-
|
|
13
|
-
## Commercial license
|
|
14
|
-
|
|
15
|
-
If you cannot or do not want to comply with the AGPL, a commercial license
|
|
16
|
-
is available. You likely need one if you want to:
|
|
17
|
-
|
|
18
|
-
- embed Docslicer in a closed-source or proprietary product;
|
|
19
|
-
- offer Docslicer's functionality as part of a hosted or SaaS service
|
|
20
|
-
without releasing your source; or
|
|
21
|
-
- distribute Docslicer without AGPL obligations.
|
|
22
|
-
|
|
23
|
-
The commercial license removes the AGPL's copyleft requirements and can
|
|
24
|
-
include priority support, warranty, and IP indemnification.
|
|
25
|
-
|
|
26
|
-
Unless you hold a separate signed commercial agreement, your use of
|
|
27
|
-
Docslicer is governed by the AGPL.
|
|
28
|
-
|
|
29
|
-
Contact **jelle@docslicer.ai** for commercial terms.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/df_aggregation/registry_aggregator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/yaml_compilers/exhibit_patterns.py
RENAMED
|
File without changes
|
|
File without changes
|
{docslicer-0.2.2 → docslicer-0.2.3}/src/docslicer/_utils/io/yaml_compilers/page_label_patterns.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|