pysfi 0.1.10__py3-none-any.whl → 0.1.11__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.
Files changed (47) hide show
  1. {pysfi-0.1.10.dist-info → pysfi-0.1.11.dist-info}/METADATA +7 -7
  2. pysfi-0.1.11.dist-info/RECORD +60 -0
  3. {pysfi-0.1.10.dist-info → pysfi-0.1.11.dist-info}/entry_points.txt +12 -2
  4. sfi/__init__.py +1 -1
  5. sfi/alarmclock/alarmclock.py +40 -40
  6. sfi/bumpversion/__init__.py +1 -1
  7. sfi/cleanbuild/cleanbuild.py +155 -0
  8. sfi/condasetup/condasetup.py +116 -0
  9. sfi/docscan/__init__.py +1 -1
  10. sfi/docscan/docscan_gui.py +1 -1
  11. sfi/docscan/lang/eng.py +152 -152
  12. sfi/docscan/lang/zhcn.py +170 -170
  13. sfi/filedate/filedate.py +185 -112
  14. sfi/gittool/__init__.py +2 -0
  15. sfi/gittool/gittool.py +401 -0
  16. sfi/llmclient/llmclient.py +592 -0
  17. sfi/llmquantize/llmquantize.py +480 -0
  18. sfi/llmserver/llmserver.py +335 -0
  19. sfi/makepython/makepython.py +2 -2
  20. sfi/pdfsplit/pdfsplit.py +4 -4
  21. sfi/pyarchive/pyarchive.py +418 -0
  22. sfi/pyembedinstall/pyembedinstall.py +629 -0
  23. sfi/pylibpack/pylibpack.py +813 -269
  24. sfi/pylibpack/rules/numpy.json +22 -0
  25. sfi/pylibpack/rules/pymupdf.json +10 -0
  26. sfi/pylibpack/rules/pyqt5.json +19 -0
  27. sfi/pylibpack/rules/pyside2.json +23 -0
  28. sfi/pylibpack/rules/scipy.json +23 -0
  29. sfi/pylibpack/rules/shiboken2.json +24 -0
  30. sfi/pyloadergen/pyloadergen.py +271 -572
  31. sfi/pypack/pypack.py +822 -471
  32. sfi/pyprojectparse/__init__.py +0 -0
  33. sfi/pyprojectparse/pyprojectparse.py +500 -0
  34. sfi/pysourcepack/pysourcepack.py +308 -369
  35. sfi/quizbase/__init__.py +0 -0
  36. sfi/quizbase/quizbase.py +828 -0
  37. sfi/quizbase/quizbase_gui.py +987 -0
  38. sfi/regexvalidate/__init__.py +0 -0
  39. sfi/regexvalidate/regex_help.html +284 -0
  40. sfi/regexvalidate/regexvalidate.py +468 -0
  41. sfi/taskkill/taskkill.py +0 -2
  42. pysfi-0.1.10.dist-info/RECORD +0 -39
  43. sfi/embedinstall/embedinstall.py +0 -478
  44. sfi/projectparse/projectparse.py +0 -152
  45. {pysfi-0.1.10.dist-info → pysfi-0.1.11.dist-info}/WHEEL +0 -0
  46. /sfi/{embedinstall → llmquantize}/__init__.py +0 -0
  47. /sfi/{projectparse → pyembedinstall}/__init__.py +0 -0
sfi/docscan/lang/eng.py CHANGED
@@ -1,152 +1,152 @@
1
- """English translation defaults for docscan GUI."""
2
-
3
- ENGLISH_DEFAULTS = {
4
- "window_title": "Document Scanner GUI",
5
- "input_config_tab": "Input Configuration",
6
- "scan_options_tab": "Scan Options",
7
- "input_directory": "Input Directory:",
8
- "browse": "Browse...",
9
- "rules_file": "Rules File:",
10
- "file_types": "File Types:",
11
- "use_pdf_ocr": "Use PDF OCR",
12
- "use_process_pool": "Use Process Pool (CPU-intensive)",
13
- "threads": "Threads:",
14
- "batch_size": "Batch Size:",
15
- "start_scan": "Start Scan",
16
- "pause": "Pause",
17
- "resume": "Resume",
18
- "stop": "Stop",
19
- "save_results": "Save Results",
20
- "clear_results": "Clear Results",
21
- "results": "Results",
22
- "files_scanned": "Files Scanned:",
23
- "files_with_matches": "Files with Matches:",
24
- "progress_log": "Progress Log:",
25
- "match_details": "Match Details:",
26
- "selected_match_context": "Selected Match Context:",
27
- "file": "File",
28
- "type": "Type",
29
- "matches": "Matches",
30
- "time": "Time (s)",
31
- "select_input_directory": "Select Input Directory",
32
- "select_rules_file": "Select Rules File",
33
- "json_files": "JSON Files (*.json)",
34
- "save_results_dialog": "Save Results",
35
- "default_results_filename": "scan_results_{datetime}.json",
36
- "error": "Error",
37
- "warning": "Warning",
38
- "success": "Success",
39
- "invalid_input_directory": "Invalid input directory",
40
- "no_valid_rules": "No valid rules found",
41
- "failed_to_load_rules": "Failed to load rules: {error}",
42
- "no_results_to_save": "No results to save",
43
- "failed_to_save_results": "Failed to save results: {error}",
44
- "scan_failed": "Scan failed: {error}",
45
- "starting_scan": "Starting scan...",
46
- "scan_complete": "Scan complete!",
47
- "pausing_scan": "Pausing scan...",
48
- "stopping_scan": "Stopping scan...",
49
- "scan_completed": "Scan completed",
50
- "scan_stopped": "Scan stopped",
51
- "found_matches_files": "Found matches in {count} files",
52
- "file_info": "File",
53
- "type_info": "Type",
54
- "size": "Size",
55
- "bytes": "bytes",
56
- "rule": "Rule",
57
- "description": "Description",
58
- "line": "Line {line}: {match}",
59
- "context": "Context:",
60
- "default_file_types": "pdf,docx,xlsx,pptx,txt,odt,rtf,epub,csv,xml,html,md,jpg,jpeg,png,gif,bmp,tiff",
61
- "default_rules_file": "rules.json",
62
- "results_saved_to": "Results saved to:\n{path}",
63
- "files_scanned_zero": "Files Scanned: 0",
64
- "files_with_matches_zero": "Files with Matches: 0",
65
- "language_settings": "Language Settings",
66
- "processing_options": "Processing Options",
67
- "performance_settings": "Performance Settings",
68
- "language_label": "Language:",
69
- "ocr_tooltip": "Enable OCR for scanned PDF files to extract text from images",
70
- "process_pool_tooltip": "Use multiple processes for CPU-intensive operations (may increase memory usage)",
71
- "threads_tooltip": "Number of worker threads (higher values may improve speed but use more CPU)",
72
- "batch_size_tooltip": "Number of files to process in each batch (larger batches may improve throughput)",
73
- "file_types_tooltip": "File types to scan (comma separated)",
74
- "file_menu": "&File",
75
- "settings_menu": "&Settings",
76
- "help_menu": "&Help",
77
- "preferences": "&Preferences...",
78
- "exit": "E&xit",
79
- "about": "&About",
80
- "about_title": "About Document Scanner",
81
- "about_text": "Document Scanner GUI\n\nVersion 1.0",
82
- "language": "Language",
83
- "open_results": "Open Results...",
84
- "open_results_file": "Open Scan Results",
85
- "loaded_results_from": "Loaded results from: {path}",
86
- "results_loaded_successfully": "Results loaded successfully from:\n{path}",
87
- "failed_to_load_results": "Failed to load results: {error}",
88
- # Command-line specific translations
89
- "document_scanner_description": "Scan documents and extract text, images, and metadata with certain rules.",
90
- "input_directory_help": "Input directory containing documents to scan",
91
- "rules_file_help": "Rules file (JSON)",
92
- "recursive_help": "Scan files recursively",
93
- "file_types_help": "File types to scan (comma-separated)",
94
- "use_pdf_ocr_help": "Use PDF OCR for image-based PDFs",
95
- "use_process_pool_help": "Use process pool instead of thread pool (better for CPU-intensive tasks)",
96
- "batch_size_help": "Number of files to process in each batch",
97
- "threads_help": "Number of threads for parallel scanning",
98
- "progress_help": "Show progress bar",
99
- "verbose_help": "Verbose output",
100
- "language_help": "Set language (en for English, zh for Chinese)",
101
- # Status and logging messages
102
- "scanning_directory": "Scanning directory: {directory}",
103
- "found_files_to_scan": "Found {count} files to scan",
104
- "scan_resumed": "Scan resumed",
105
- "scan_stopped_before_submitting_tasks": "Scan stopped by user before submitting all tasks",
106
- "scan_paused": "Scan paused",
107
- "scan_stopped_while_paused": "Scan stopped while paused",
108
- "scan_stopped_by_user_canceling_tasks": "Scan stopped by user, cancelling remaining tasks...",
109
- "task_timeout_scan_may_be_stopping": "Task timeout, scan may be stopping",
110
- "error_scanning_file": "Error scanning file: {error}",
111
- "progress_report": "Progress: {processed}/{total} files processed",
112
- "force_shutting_down_executor": "Force shutting down executor...",
113
- "scan_stopped_processed_files": "Scan stopped. Processed {processed} files",
114
- "scan_complete_found_matches": "Scan complete. Found matches in {matches_count} files",
115
- "found_matches_in_file": "Found matches in: {file_name}",
116
- "processed_file_info": "Processed {file_name} ({ext}) in {time:.3f}s - {matches_count} matches found",
117
- "could_not_extract_text_from_file": "Could not extract text from {file_path}: {error}",
118
- "pymupdf_failed_for_file": "PyMuPDF failed for {file_name}: {error}",
119
- "pypdf_also_failed_for_file": "pypdf also failed for {file_name}: {error}",
120
- "no_pdf_library_installed": "No PDF library installed (pymupdf or pypdf)",
121
- "pymupdf_not_installed": "PyMuPDF not installed",
122
- "no_pages_found_in_file": "No pages found in {file_path}",
123
- "no_metadata_found_in_file": "No metadata found in {file_path}",
124
- "pymupdf_error_trying_fallback": "PyMuPDF error on {file_path}: {error}, trying pypdf fallback",
125
- "pypdf_not_installed_skipping_extraction": "pypdf not installed, skipping PDF extraction",
126
- "error_extracting_pdf_with_pypdf": "Error extracting PDF with pypdf: {error}",
127
- "odfpy_not_installed_skipping_extraction": "odfpy not installed, skipping ODT extraction",
128
- "error_extracting_odt": "Error extracting ODT: {error}",
129
- "error_extracting_rtf": "Error extracting RTF: {error}",
130
- "ebooklib_not_installed_skipping_extraction": "ebooklib not installed, skipping EPUB extraction",
131
- "error_extracting_epub": "Error extracting EPUB: {error}",
132
- "error_extracting_csv": "Error extracting CSV: {error}",
133
- "error_extracting_xml": "Error extracting XML: {error}",
134
- "error_extracting_html": "Error extracting HTML: {error}",
135
- "error_extracting_markdown": "Error extracting Markdown: {error}",
136
- "python_docx_not_installed_skipping_extraction": "python-docx not installed, skipping DOCX extraction",
137
- "openpyxl_not_installed_skipping_extraction": "openpyxl not installed, skipping XLSX extraction",
138
- "python_pptx_not_installed_skipping_extraction": "python-pptx not installed, skipping PPTX extraction",
139
- "pillow_or_tesseract_not_installed_skipping_ocr": "PIL or pytesseract not installed, skipping image OCR",
140
- "could_not_perform_ocr_on_file": "Could not perform OCR on {file_path}: {error}",
141
- "input_directory_does_not_exist": "Input directory does not exist: {input_dir}",
142
- "using_rules_file": "Using rules file: {rules_file}",
143
- "invalid_json_in_rules_file": "Invalid JSON in rules file: {error}",
144
- "invalid_rules_format": "Invalid rules format. Expected a list or dict with 'rules' key",
145
- "no_valid_rules_found": "No valid rules found",
146
- "total_time_elapsed": "Total time elapsed: {time:.2f}s",
147
- "invalid_regex_pattern": "Invalid regex pattern '{pattern}': {error}",
148
- "rules_file_does_not_exist_alt": "Rules file does not exist: {rules_file}",
149
- "image_files_supported": "Image files supported (requires OCR)",
150
- "include_image_formats": "Include Image Formats",
151
- "include_image_formats_tooltip": "Include image formats (jpg, jpeg, png, gif, bmp, tiff) in scan",
152
- }
1
+ """English translation defaults for docscan GUI."""
2
+
3
+ ENGLISH_DEFAULTS = {
4
+ "window_title": "Document Scanner GUI",
5
+ "input_config_tab": "Input Configuration",
6
+ "scan_options_tab": "Scan Options",
7
+ "input_directory": "Input Directory:",
8
+ "browse": "Browse...",
9
+ "rules_file": "Rules File:",
10
+ "file_types": "File Types:",
11
+ "use_pdf_ocr": "Use PDF OCR",
12
+ "use_process_pool": "Use Process Pool (CPU-intensive)",
13
+ "threads": "Threads:",
14
+ "batch_size": "Batch Size:",
15
+ "start_scan": "Start Scan",
16
+ "pause": "Pause",
17
+ "resume": "Resume",
18
+ "stop": "Stop",
19
+ "save_results": "Save Results",
20
+ "clear_results": "Clear Results",
21
+ "results": "Results",
22
+ "files_scanned": "Files Scanned:",
23
+ "files_with_matches": "Files with Matches:",
24
+ "progress_log": "Progress Log:",
25
+ "match_details": "Match Details:",
26
+ "selected_match_context": "Selected Match Context:",
27
+ "file": "File",
28
+ "type": "Type",
29
+ "matches": "Matches",
30
+ "time": "Time (s)",
31
+ "select_input_directory": "Select Input Directory",
32
+ "select_rules_file": "Select Rules File",
33
+ "json_files": "JSON Files (*.json)",
34
+ "save_results_dialog": "Save Results",
35
+ "default_results_filename": "scan_results_{datetime}.json",
36
+ "error": "Error",
37
+ "warning": "Warning",
38
+ "success": "Success",
39
+ "invalid_input_directory": "Invalid input directory",
40
+ "no_valid_rules": "No valid rules found",
41
+ "failed_to_load_rules": "Failed to load rules: {error}",
42
+ "no_results_to_save": "No results to save",
43
+ "failed_to_save_results": "Failed to save results: {error}",
44
+ "scan_failed": "Scan failed: {error}",
45
+ "starting_scan": "Starting scan...",
46
+ "scan_complete": "Scan complete!",
47
+ "pausing_scan": "Pausing scan...",
48
+ "stopping_scan": "Stopping scan...",
49
+ "scan_completed": "Scan completed",
50
+ "scan_stopped": "Scan stopped",
51
+ "found_matches_files": "Found matches in {count} files",
52
+ "file_info": "File",
53
+ "type_info": "Type",
54
+ "size": "Size",
55
+ "bytes": "bytes",
56
+ "rule": "Rule",
57
+ "description": "Description",
58
+ "line": "Line {line}: {match}",
59
+ "context": "Context:",
60
+ "default_file_types": "pdf,docx,xlsx,pptx,txt,odt,rtf,epub,csv,xml,html,md,jpg,jpeg,png,gif,bmp,tiff",
61
+ "default_rules_file": "rules.json",
62
+ "results_saved_to": "Results saved to:\n{path}",
63
+ "files_scanned_zero": "Files Scanned: 0",
64
+ "files_with_matches_zero": "Files with Matches: 0",
65
+ "language_settings": "Language Settings",
66
+ "processing_options": "Processing Options",
67
+ "performance_settings": "Performance Settings",
68
+ "language_label": "Language:",
69
+ "ocr_tooltip": "Enable OCR for scanned PDF files to extract text from images",
70
+ "process_pool_tooltip": "Use multiple processes for CPU-intensive operations (may increase memory usage)",
71
+ "threads_tooltip": "Number of worker threads (higher values may improve speed but use more CPU)",
72
+ "batch_size_tooltip": "Number of files to process in each batch (larger batches may improve throughput)",
73
+ "file_types_tooltip": "File types to scan (comma separated)",
74
+ "file_menu": "&File",
75
+ "settings_menu": "&Settings",
76
+ "help_menu": "&Help",
77
+ "preferences": "&Preferences...",
78
+ "exit": "E&xit",
79
+ "about": "&About",
80
+ "about_title": "About Document Scanner",
81
+ "about_text": "Document Scanner GUI\n\nVersion 1.0",
82
+ "language": "Language",
83
+ "open_results": "Open Results...",
84
+ "open_results_file": "Open Scan Results",
85
+ "loaded_results_from": "Loaded results from: {path}",
86
+ "results_loaded_successfully": "Results loaded successfully from:\n{path}",
87
+ "failed_to_load_results": "Failed to load results: {error}",
88
+ # Command-line specific translations
89
+ "document_scanner_description": "Scan documents and extract text, images, and metadata with certain rules.",
90
+ "input_directory_help": "Input directory containing documents to scan",
91
+ "rules_file_help": "Rules file (JSON)",
92
+ "recursive_help": "Scan files recursively",
93
+ "file_types_help": "File types to scan (comma-separated)",
94
+ "use_pdf_ocr_help": "Use PDF OCR for image-based PDFs",
95
+ "use_process_pool_help": "Use process pool instead of thread pool (better for CPU-intensive tasks)",
96
+ "batch_size_help": "Number of files to process in each batch",
97
+ "threads_help": "Number of threads for parallel scanning",
98
+ "progress_help": "Show progress bar",
99
+ "verbose_help": "Verbose output",
100
+ "language_help": "Set language (en for English, zh for Chinese)",
101
+ # Status and logging messages
102
+ "scanning_directory": "Scanning directory: {directory}",
103
+ "found_files_to_scan": "Found {count} files to scan",
104
+ "scan_resumed": "Scan resumed",
105
+ "scan_stopped_before_submitting_tasks": "Scan stopped by user before submitting all tasks",
106
+ "scan_paused": "Scan paused",
107
+ "scan_stopped_while_paused": "Scan stopped while paused",
108
+ "scan_stopped_by_user_canceling_tasks": "Scan stopped by user, cancelling remaining tasks...",
109
+ "task_timeout_scan_may_be_stopping": "Task timeout, scan may be stopping",
110
+ "error_scanning_file": "Error scanning file: {error}",
111
+ "progress_report": "Progress: {processed}/{total} files processed",
112
+ "force_shutting_down_executor": "Force shutting down executor...",
113
+ "scan_stopped_processed_files": "Scan stopped. Processed {processed} files",
114
+ "scan_complete_found_matches": "Scan complete. Found matches in {matches_count} files",
115
+ "found_matches_in_file": "Found matches in: {file_name}",
116
+ "processed_file_info": "Processed {file_name} ({ext}) in {time:.3f}s - {matches_count} matches found",
117
+ "could_not_extract_text_from_file": "Could not extract text from {file_path}: {error}",
118
+ "pymupdf_failed_for_file": "PyMuPDF failed for {file_name}: {error}",
119
+ "pypdf_also_failed_for_file": "pypdf also failed for {file_name}: {error}",
120
+ "no_pdf_library_installed": "No PDF library installed (pymupdf or pypdf)",
121
+ "pymupdf_not_installed": "PyMuPDF not installed",
122
+ "no_pages_found_in_file": "No pages found in {file_path}",
123
+ "no_metadata_found_in_file": "No metadata found in {file_path}",
124
+ "pymupdf_error_trying_fallback": "PyMuPDF error on {file_path}: {error}, trying pypdf fallback",
125
+ "pypdf_not_installed_skipping_extraction": "pypdf not installed, skipping PDF extraction",
126
+ "error_extracting_pdf_with_pypdf": "Error extracting PDF with pypdf: {error}",
127
+ "odfpy_not_installed_skipping_extraction": "odfpy not installed, skipping ODT extraction",
128
+ "error_extracting_odt": "Error extracting ODT: {error}",
129
+ "error_extracting_rtf": "Error extracting RTF: {error}",
130
+ "ebooklib_not_installed_skipping_extraction": "ebooklib not installed, skipping EPUB extraction",
131
+ "error_extracting_epub": "Error extracting EPUB: {error}",
132
+ "error_extracting_csv": "Error extracting CSV: {error}",
133
+ "error_extracting_xml": "Error extracting XML: {error}",
134
+ "error_extracting_html": "Error extracting HTML: {error}",
135
+ "error_extracting_markdown": "Error extracting Markdown: {error}",
136
+ "python_docx_not_installed_skipping_extraction": "python-docx not installed, skipping DOCX extraction",
137
+ "openpyxl_not_installed_skipping_extraction": "openpyxl not installed, skipping XLSX extraction",
138
+ "python_pptx_not_installed_skipping_extraction": "python-pptx not installed, skipping PPTX extraction",
139
+ "pillow_or_tesseract_not_installed_skipping_ocr": "PIL or pytesseract not installed, skipping image OCR",
140
+ "could_not_perform_ocr_on_file": "Could not perform OCR on {file_path}: {error}",
141
+ "input_directory_does_not_exist": "Input directory does not exist: {input_dir}",
142
+ "using_rules_file": "Using rules file: {rules_file}",
143
+ "invalid_json_in_rules_file": "Invalid JSON in rules file: {error}",
144
+ "invalid_rules_format": "Invalid rules format. Expected a list or dict with 'rules' key",
145
+ "no_valid_rules_found": "No valid rules found",
146
+ "total_time_elapsed": "Total time elapsed: {time:.2f}s",
147
+ "invalid_regex_pattern": "Invalid regex pattern '{pattern}': {error}",
148
+ "rules_file_does_not_exist_alt": "Rules file does not exist: {rules_file}",
149
+ "image_files_supported": "Image files supported (requires OCR)",
150
+ "include_image_formats": "Include Image Formats",
151
+ "include_image_formats_tooltip": "Include image formats (jpg, jpeg, png, gif, bmp, tiff) in scan",
152
+ }