aglaia 0.1.0a2__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.
Files changed (291) hide show
  1. aglaia-0.1.0a2/LICENSE +120 -0
  2. aglaia-0.1.0a2/PKG-INFO +473 -0
  3. aglaia-0.1.0a2/README.md +290 -0
  4. aglaia-0.1.0a2/aglaia/ImageBuffer.py +358 -0
  5. aglaia-0.1.0a2/aglaia/Status.py +23 -0
  6. aglaia-0.1.0a2/aglaia/__init__.py +1 -0
  7. aglaia-0.1.0a2/aglaia/__main__.py +29 -0
  8. aglaia-0.1.0a2/aglaia/app.py +1014 -0
  9. aglaia-0.1.0a2/aglaia/app_data/__init__.py +194 -0
  10. aglaia-0.1.0a2/aglaia/app_data/db.py +352 -0
  11. aglaia-0.1.0a2/aglaia/app_data/filetype_register.py +509 -0
  12. aglaia-0.1.0a2/aglaia/app_data/model-list.json +77 -0
  13. aglaia-0.1.0a2/aglaia/app_data/models.py +174 -0
  14. aglaia-0.1.0a2/aglaia/app_data/modes.py +92 -0
  15. aglaia-0.1.0a2/aglaia/app_data/plugins.py +153 -0
  16. aglaia-0.1.0a2/aglaia/app_data/secrets.py +186 -0
  17. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.icns +0 -0
  18. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.ico +0 -0
  19. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_128x128.png +0 -0
  20. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_128x128@2x.png +0 -0
  21. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_16x16.png +0 -0
  22. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_16x16@2x.png +0 -0
  23. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_256x256.png +0 -0
  24. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_256x256@2x.png +0 -0
  25. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_32x32.png +0 -0
  26. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_32x32@2x.png +0 -0
  27. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_512x512.png +0 -0
  28. aglaia-0.1.0a2/aglaia/assets/app/Aglaia.iconset/icon_512x512@2x.png +0 -0
  29. aglaia-0.1.0a2/aglaia/assets/app/AglaiaDoc.icns +0 -0
  30. aglaia-0.1.0a2/aglaia/assets/app/AglaiaDoc.ico +0 -0
  31. aglaia-0.1.0a2/aglaia/assets/brand/aglaia-dark.png +0 -0
  32. aglaia-0.1.0a2/aglaia/assets/brand/aglaia-light.png +0 -0
  33. aglaia-0.1.0a2/aglaia/assets/brand/aglaia2-1024.png +0 -0
  34. aglaia-0.1.0a2/aglaia/assets/brand/aglaia_bg.png +0 -0
  35. aglaia-0.1.0a2/aglaia/assets/brand/aglaia_bg_arrow.png +0 -0
  36. aglaia-0.1.0a2/aglaia/assets/brand/aglaia_usage.png +0 -0
  37. aglaia-0.1.0a2/aglaia/assets/calibration/calibration-chessboard_A4_7x10sq_25mm.pdf +68 -0
  38. aglaia-0.1.0a2/aglaia/assets/calibration/calibration-chessboard_Letter_7x10sq_25mm.pdf +68 -0
  39. aglaia-0.1.0a2/aglaia/assets/icons/apple.svg +1 -0
  40. aglaia-0.1.0a2/aglaia/assets/icons/archive-restore.svg +19 -0
  41. aglaia-0.1.0a2/aglaia/assets/icons/arrow-left.svg +16 -0
  42. aglaia-0.1.0a2/aglaia/assets/icons/arrow-right.svg +16 -0
  43. aglaia-0.1.0a2/aglaia/assets/icons/bug.svg +1 -0
  44. aglaia-0.1.0a2/aglaia/assets/icons/camera.svg +16 -0
  45. aglaia-0.1.0a2/aglaia/assets/icons/chart-gantt.svg +18 -0
  46. aglaia-0.1.0a2/aglaia/assets/icons/check.svg +15 -0
  47. aglaia-0.1.0a2/aglaia/assets/icons/chevron-down.svg +15 -0
  48. aglaia-0.1.0a2/aglaia/assets/icons/chevron-left.svg +15 -0
  49. aglaia-0.1.0a2/aglaia/assets/icons/chevron-right.svg +15 -0
  50. aglaia-0.1.0a2/aglaia/assets/icons/chevron-up.svg +15 -0
  51. aglaia-0.1.0a2/aglaia/assets/icons/circle-stop.svg +1 -0
  52. aglaia-0.1.0a2/aglaia/assets/icons/collections.svg +1 -0
  53. aglaia-0.1.0a2/aglaia/assets/icons/compression.svg +1 -0
  54. aglaia-0.1.0a2/aglaia/assets/icons/credit-card.svg +16 -0
  55. aglaia-0.1.0a2/aglaia/assets/icons/document.svg +182 -0
  56. aglaia-0.1.0a2/aglaia/assets/icons/download.svg +17 -0
  57. aglaia-0.1.0a2/aglaia/assets/icons/ellipsis.svg +17 -0
  58. aglaia-0.1.0a2/aglaia/assets/icons/export.svg +1 -0
  59. aglaia-0.1.0a2/aglaia/assets/icons/eye-off.svg +18 -0
  60. aglaia-0.1.0a2/aglaia/assets/icons/eye.svg +16 -0
  61. aglaia-0.1.0a2/aglaia/assets/icons/file-output.svg +18 -0
  62. aglaia-0.1.0a2/aglaia/assets/icons/file-scan.svg +20 -0
  63. aglaia-0.1.0a2/aglaia/assets/icons/file-text.svg +19 -0
  64. aglaia-0.1.0a2/aglaia/assets/icons/filetype-pdf.svg +1 -0
  65. aglaia-0.1.0a2/aglaia/assets/icons/flip-horizontal-2.svg +20 -0
  66. aglaia-0.1.0a2/aglaia/assets/icons/flip-horizontal.svg +20 -0
  67. aglaia-0.1.0a2/aglaia/assets/icons/flip-vertical-2.svg +20 -0
  68. aglaia-0.1.0a2/aglaia/assets/icons/flip-vertical.svg +20 -0
  69. aglaia-0.1.0a2/aglaia/assets/icons/folder-git-2.svg +19 -0
  70. aglaia-0.1.0a2/aglaia/assets/icons/folder-open.svg +15 -0
  71. aglaia-0.1.0a2/aglaia/assets/icons/folder-plus.svg +17 -0
  72. aglaia-0.1.0a2/aglaia/assets/icons/folder.svg +15 -0
  73. aglaia-0.1.0a2/aglaia/assets/icons/gallery-horizontal.svg +17 -0
  74. aglaia-0.1.0a2/aglaia/assets/icons/grip-vertical.svg +20 -0
  75. aglaia-0.1.0a2/aglaia/assets/icons/hand.svg +16 -0
  76. aglaia-0.1.0a2/aglaia/assets/icons/heart.svg +15 -0
  77. aglaia-0.1.0a2/aglaia/assets/icons/image.svg +17 -0
  78. aglaia-0.1.0a2/aglaia/assets/icons/images.svg +18 -0
  79. aglaia-0.1.0a2/aglaia/assets/icons/layout-grid.svg +18 -0
  80. aglaia-0.1.0a2/aglaia/assets/icons/link.svg +16 -0
  81. aglaia-0.1.0a2/aglaia/assets/icons/list.svg +20 -0
  82. aglaia-0.1.0a2/aglaia/assets/icons/logs.svg +23 -0
  83. aglaia-0.1.0a2/aglaia/assets/icons/markdown.svg +1 -0
  84. aglaia-0.1.0a2/aglaia/assets/icons/medal.svg +18 -0
  85. aglaia-0.1.0a2/aglaia/assets/icons/mic-off.svg +20 -0
  86. aglaia-0.1.0a2/aglaia/assets/icons/mic.svg +17 -0
  87. aglaia-0.1.0a2/aglaia/assets/icons/mistral.svg +1 -0
  88. aglaia-0.1.0a2/aglaia/assets/icons/more-horizontal.svg +17 -0
  89. aglaia-0.1.0a2/aglaia/assets/icons/ocr.svg +1 -0
  90. aglaia-0.1.0a2/aglaia/assets/icons/package.svg +1 -0
  91. aglaia-0.1.0a2/aglaia/assets/icons/panel-left-close.svg +17 -0
  92. aglaia-0.1.0a2/aglaia/assets/icons/panel-left-open.svg +17 -0
  93. aglaia-0.1.0a2/aglaia/assets/icons/panel-right-close.svg +17 -0
  94. aglaia-0.1.0a2/aglaia/assets/icons/panel-right-open.svg +17 -0
  95. aglaia-0.1.0a2/aglaia/assets/icons/pause.svg +16 -0
  96. aglaia-0.1.0a2/aglaia/assets/icons/pencil.svg +1 -0
  97. aglaia-0.1.0a2/aglaia/assets/icons/play.svg +15 -0
  98. aglaia-0.1.0a2/aglaia/assets/icons/plus.svg +16 -0
  99. aglaia-0.1.0a2/aglaia/assets/icons/rabbit.svg +17 -0
  100. aglaia-0.1.0a2/aglaia/assets/icons/refresh-cw.svg +18 -0
  101. aglaia-0.1.0a2/aglaia/assets/icons/rotate-ccw-square.svg +17 -0
  102. aglaia-0.1.0a2/aglaia/assets/icons/rotate-ccw.svg +16 -0
  103. aglaia-0.1.0a2/aglaia/assets/icons/rotate-cw-square.svg +17 -0
  104. aglaia-0.1.0a2/aglaia/assets/icons/rotate-cw.svg +16 -0
  105. aglaia-0.1.0a2/aglaia/assets/icons/ruler.svg +19 -0
  106. aglaia-0.1.0a2/aglaia/assets/icons/save.svg +17 -0
  107. aglaia-0.1.0a2/aglaia/assets/icons/scan-line.svg +19 -0
  108. aglaia-0.1.0a2/aglaia/assets/icons/scan-text.svg +1 -0
  109. aglaia-0.1.0a2/aglaia/assets/icons/search-alert.svg +6 -0
  110. aglaia-0.1.0a2/aglaia/assets/icons/search.svg +16 -0
  111. aglaia-0.1.0a2/aglaia/assets/icons/settings.svg +16 -0
  112. aglaia-0.1.0a2/aglaia/assets/icons/sliders-horizontal.svg +23 -0
  113. aglaia-0.1.0a2/aglaia/assets/icons/sliders.svg +23 -0
  114. aglaia-0.1.0a2/aglaia/assets/icons/square-chart-gantt.svg +18 -0
  115. aglaia-0.1.0a2/aglaia/assets/icons/square-x.svg +1 -0
  116. aglaia-0.1.0a2/aglaia/assets/icons/square.svg +15 -0
  117. aglaia-0.1.0a2/aglaia/assets/icons/star-filled.svg +15 -0
  118. aglaia-0.1.0a2/aglaia/assets/icons/star.svg +15 -0
  119. aglaia-0.1.0a2/aglaia/assets/icons/target.svg +17 -0
  120. aglaia-0.1.0a2/aglaia/assets/icons/trash-2.svg +19 -0
  121. aglaia-0.1.0a2/aglaia/assets/icons/trending-down.svg +16 -0
  122. aglaia-0.1.0a2/aglaia/assets/icons/turtle.svg +16 -0
  123. aglaia-0.1.0a2/aglaia/assets/icons/undo.svg +16 -0
  124. aglaia-0.1.0a2/aglaia/assets/icons/upload.svg +17 -0
  125. aglaia-0.1.0a2/aglaia/assets/icons/wrench-off.svg +17 -0
  126. aglaia-0.1.0a2/aglaia/assets/icons/wrench.svg +15 -0
  127. aglaia-0.1.0a2/aglaia/assets/icons/x.svg +16 -0
  128. aglaia-0.1.0a2/aglaia/assets/modes/book_curved_x2.png +0 -0
  129. aglaia-0.1.0a2/aglaia/assets/modes/book_curved_x2.svg +1 -0
  130. aglaia-0.1.0a2/aglaia/assets/modes/book_flat_x1_reject.png +0 -0
  131. aglaia-0.1.0a2/aglaia/assets/modes/book_flat_x1_reject.svg +1 -0
  132. aglaia-0.1.0a2/aglaia/assets/modes/book_flat_x2.png +0 -0
  133. aglaia-0.1.0a2/aglaia/assets/modes/book_flat_x2.svg +1 -0
  134. aglaia-0.1.0a2/aglaia/assets/modes/sheet_flat_x1.png +0 -0
  135. aglaia-0.1.0a2/aglaia/assets/modes/sheet_flat_x1.svg +1 -0
  136. aglaia-0.1.0a2/aglaia/assets.py +49 -0
  137. aglaia-0.1.0a2/aglaia/config/config_default.yaml +42 -0
  138. aglaia-0.1.0a2/aglaia/config/default.yml +40 -0
  139. aglaia-0.1.0a2/aglaia/config/pipelines/book_curved_x2.yaml +85 -0
  140. aglaia-0.1.0a2/aglaia/config/pipelines/book_flat_x1.yaml +65 -0
  141. aglaia-0.1.0a2/aglaia/config/pipelines/book_flat_x2.yaml +66 -0
  142. aglaia-0.1.0a2/aglaia/config/pipelines/sheet_flat_x1.yaml +64 -0
  143. aglaia-0.1.0a2/aglaia/gui/AboutDialog.py +197 -0
  144. aglaia-0.1.0a2/aglaia/gui/BugReportDialog.py +547 -0
  145. aglaia-0.1.0a2/aglaia/gui/CalibrationDialogs.py +848 -0
  146. aglaia-0.1.0a2/aglaia/gui/CameraEnum.py +100 -0
  147. aglaia-0.1.0a2/aglaia/gui/DebugViewerTab.py +496 -0
  148. aglaia-0.1.0a2/aglaia/gui/DpiCalibrationTab.py +341 -0
  149. aglaia-0.1.0a2/aglaia/gui/FlowLayout.py +267 -0
  150. aglaia-0.1.0a2/aglaia/gui/FreehandTab.py +220 -0
  151. aglaia-0.1.0a2/aglaia/gui/LanguageTagInput.py +238 -0
  152. aglaia-0.1.0a2/aglaia/gui/MainWindow.py +4464 -0
  153. aglaia-0.1.0a2/aglaia/gui/MistralJobsTab.py +145 -0
  154. aglaia-0.1.0a2/aglaia/gui/ModePicker.py +353 -0
  155. aglaia-0.1.0a2/aglaia/gui/ModelDownloaderTab.py +1171 -0
  156. aglaia-0.1.0a2/aglaia/gui/OnboardingWizard.py +670 -0
  157. aglaia-0.1.0a2/aglaia/gui/PageWarningDialog.py +146 -0
  158. aglaia-0.1.0a2/aglaia/gui/PipelineEditorWidget.py +1466 -0
  159. aglaia-0.1.0a2/aglaia/gui/PipelinePreviewPanel.py +851 -0
  160. aglaia-0.1.0a2/aglaia/gui/PipelineStepsOutline.py +134 -0
  161. aglaia-0.1.0a2/aglaia/gui/ScanItemWidget.py +1185 -0
  162. aglaia-0.1.0a2/aglaia/gui/ScansDpiTab.py +367 -0
  163. aglaia-0.1.0a2/aglaia/gui/ScansGalleryView.py +798 -0
  164. aglaia-0.1.0a2/aglaia/gui/ScansTableView.py +831 -0
  165. aglaia-0.1.0a2/aglaia/gui/SettingsTab.py +578 -0
  166. aglaia-0.1.0a2/aglaia/gui/StartupWindow.py +1100 -0
  167. aglaia-0.1.0a2/aglaia/gui/StatusBarWidget.py +1031 -0
  168. aglaia-0.1.0a2/aglaia/gui/Toast.py +128 -0
  169. aglaia-0.1.0a2/aglaia/gui/VoiceWorkerVosk.py +140 -0
  170. aglaia-0.1.0a2/aglaia/gui/WebcamThread.py +355 -0
  171. aglaia-0.1.0a2/aglaia/gui/ZoomCanvas.py +325 -0
  172. aglaia-0.1.0a2/aglaia/gui/__init__.py +9 -0
  173. aglaia-0.1.0a2/aglaia/gui/colors.py +342 -0
  174. aglaia-0.1.0a2/aglaia/gui/path_reveal.py +50 -0
  175. aglaia-0.1.0a2/aglaia/gui/plugin_trust.py +72 -0
  176. aglaia-0.1.0a2/aglaia/gui/sidebar/ActivityBar.py +371 -0
  177. aglaia-0.1.0a2/aglaia/gui/sidebar/SidebarPanel.py +177 -0
  178. aglaia-0.1.0a2/aglaia/gui/sidebar/__init__.py +14 -0
  179. aglaia-0.1.0a2/aglaia/gui/sidebar/tabs/CaptureTab.py +574 -0
  180. aglaia-0.1.0a2/aglaia/gui/sidebar/tabs/ExportTab.py +202 -0
  181. aglaia-0.1.0a2/aglaia/gui/sidebar/tabs/ImportTab.py +520 -0
  182. aglaia-0.1.0a2/aglaia/gui/sidebar/tabs/OcrTab.py +1411 -0
  183. aglaia-0.1.0a2/aglaia/gui/sidebar/tabs/PipelineTab.py +264 -0
  184. aglaia-0.1.0a2/aglaia/gui/sidebar/tabs/__init__.py +14 -0
  185. aglaia-0.1.0a2/aglaia/gui/sidebar/widgets/ComboBoxWithDescription.py +182 -0
  186. aglaia-0.1.0a2/aglaia/gui/sidebar/widgets/PipelineTimingView.py +415 -0
  187. aglaia-0.1.0a2/aglaia/gui/sidebar/widgets/RadioCardGroup.py +427 -0
  188. aglaia-0.1.0a2/aglaia/gui/sidebar/widgets/ToggleSwitch.py +187 -0
  189. aglaia-0.1.0a2/aglaia/gui/sidebar/widgets/__init__.py +13 -0
  190. aglaia-0.1.0a2/aglaia/gui/theme.py +665 -0
  191. aglaia-0.1.0a2/aglaia/gui/timeago.py +50 -0
  192. aglaia-0.1.0a2/aglaia/gui/voice_transcript.py +53 -0
  193. aglaia-0.1.0a2/aglaia/gui/widgets.py +203 -0
  194. aglaia-0.1.0a2/aglaia/i18n/__init__.py +104 -0
  195. aglaia-0.1.0a2/aglaia/i18n/aglaia_en_US.ts +3854 -0
  196. aglaia-0.1.0a2/aglaia/i18n/aglaia_fr_FR.ts +3868 -0
  197. aglaia-0.1.0a2/aglaia/i18n/qm/aglaia_en_US.qm +0 -0
  198. aglaia-0.1.0a2/aglaia/i18n/qm/aglaia_fr_FR.qm +0 -0
  199. aglaia-0.1.0a2/aglaia/processors/Binarizer.py +702 -0
  200. aglaia-0.1.0a2/aglaia/processors/DPIfixer.py +115 -0
  201. aglaia-0.1.0a2/aglaia/processors/MarginSetter.py +193 -0
  202. aglaia-0.1.0a2/aglaia/processors/PageDetector.py +613 -0
  203. aglaia-0.1.0a2/aglaia/processors/PageDewarper.py +1511 -0
  204. aglaia-0.1.0a2/aglaia/processors/SkewFinder.py +259 -0
  205. aglaia-0.1.0a2/aglaia/processors/TrapezoidalCorrection.py +790 -0
  206. aglaia-0.1.0a2/aglaia/processors/__init__.py +8 -0
  207. aglaia-0.1.0a2/aglaia/processors/abstraction.py +347 -0
  208. aglaia-0.1.0a2/aglaia/processors/geometry.py +1722 -0
  209. aglaia-0.1.0a2/aglaia/processors/layout_backends/__init__.py +9 -0
  210. aglaia-0.1.0a2/aglaia/processors/layout_backends/apple_vision.py +83 -0
  211. aglaia-0.1.0a2/aglaia/processors/layout_backends/base.py +31 -0
  212. aglaia-0.1.0a2/aglaia/processors/layout_backends/dbnet.py +199 -0
  213. aglaia-0.1.0a2/aglaia/processors/layout_backends/east.py +144 -0
  214. aglaia-0.1.0a2/aglaia/processors/layout_backends/factory.py +118 -0
  215. aglaia-0.1.0a2/aglaia/processors/layout_backends/heuristic.py +134 -0
  216. aglaia-0.1.0a2/aglaia/processors/option_specs.py +80 -0
  217. aglaia-0.1.0a2/aglaia/processors/page_dewarp_mlx.py +425 -0
  218. aglaia-0.1.0a2/aglaia/processors/page_dewarp_padded.py +459 -0
  219. aglaia-0.1.0a2/aglaia/processors/registry.py +253 -0
  220. aglaia-0.1.0a2/aglaia/processors/replay_transform.py +87 -0
  221. aglaia-0.1.0a2/aglaia/processors/sheet_models.py +576 -0
  222. aglaia-0.1.0a2/aglaia/processors/utils.py +63 -0
  223. aglaia-0.1.0a2/aglaia/storage/__init__.py +73 -0
  224. aglaia-0.1.0a2/aglaia/storage/db.py +184 -0
  225. aglaia-0.1.0a2/aglaia/storage/debug_chain.py +96 -0
  226. aglaia-0.1.0a2/aglaia/storage/debug_renderers.py +761 -0
  227. aglaia-0.1.0a2/aglaia/storage/persister.py +99 -0
  228. aglaia-0.1.0a2/aglaia/storage/repo.py +741 -0
  229. aglaia-0.1.0a2/aglaia/storage/schema/0001_initial.sql +129 -0
  230. aglaia-0.1.0a2/aglaia/storage/schema/0002_ocr.sql +29 -0
  231. aglaia-0.1.0a2/aglaia/storage/schema/0003_branch_trash.sql +12 -0
  232. aglaia-0.1.0a2/aglaia/storage/schema/0004_ocr_stale_flag.sql +11 -0
  233. aglaia-0.1.0a2/aglaia/storage/schema/0005_backfill_ocr_stale.sql +18 -0
  234. aglaia-0.1.0a2/aglaia/storage/schema/0006_node_image_nullable.sql +63 -0
  235. aglaia-0.1.0a2/aglaia/storage/schema/0007_rename_snap_scan.sql +44 -0
  236. aglaia-0.1.0a2/aglaia/storage/schema/0008_rename_step_layout_page.sql +19 -0
  237. aglaia-0.1.0a2/aglaia/storage/schema/0009_index_image_id.sql +12 -0
  238. aglaia-0.1.0a2/aglaia/storage/schema/0010_step_overrides.sql +34 -0
  239. aglaia-0.1.0a2/aglaia/storage/schema/0011_mistral_batch.sql +44 -0
  240. aglaia-0.1.0a2/aglaia/storage/schema/0012_mistral_batch_run_ids.sql +13 -0
  241. aglaia-0.1.0a2/aglaia/userdata/__init__.py +9 -0
  242. aglaia-0.1.0a2/aglaia/userdata/db.py +64 -0
  243. aglaia-0.1.0a2/aglaia/userdata/repo.py +102 -0
  244. aglaia-0.1.0a2/aglaia/version.py +60 -0
  245. aglaia-0.1.0a2/aglaia/workers/BlobNormalizer.py +229 -0
  246. aglaia-0.1.0a2/aglaia/workers/Calibrator.py +144 -0
  247. aglaia-0.1.0a2/aglaia/workers/CreditCardDPI.py +449 -0
  248. aglaia-0.1.0a2/aglaia/workers/ImportHelpers.py +518 -0
  249. aglaia-0.1.0a2/aglaia/workers/Initializer.py +583 -0
  250. aglaia-0.1.0a2/aglaia/workers/IntegratedProcessingChain.py +1007 -0
  251. aglaia-0.1.0a2/aglaia/workers/MistralBatchWorker.py +164 -0
  252. aglaia-0.1.0a2/aglaia/workers/OcrWorker.py +470 -0
  253. aglaia-0.1.0a2/aglaia/workers/PDFprocessor.py +226 -0
  254. aglaia-0.1.0a2/aglaia/workers/ProcessMonitor.py +175 -0
  255. aglaia-0.1.0a2/aglaia/workers/Replay.py +316 -0
  256. aglaia-0.1.0a2/aglaia/workers/SiftTracker.py +356 -0
  257. aglaia-0.1.0a2/aglaia/workers/chain_abstraction.py +32 -0
  258. aglaia-0.1.0a2/aglaia/workers/cli.py +491 -0
  259. aglaia-0.1.0a2/aglaia/workers/headless.py +523 -0
  260. aglaia-0.1.0a2/aglaia/workers/macos_mem.py +127 -0
  261. aglaia-0.1.0a2/aglaia/workers/md_export.py +1072 -0
  262. aglaia-0.1.0a2/aglaia/workers/ocr/__init__.py +34 -0
  263. aglaia-0.1.0a2/aglaia/workers/ocr/apple_caps.py +47 -0
  264. aglaia-0.1.0a2/aglaia/workers/ocr/apple_docs.py +653 -0
  265. aglaia-0.1.0a2/aglaia/workers/ocr/apple_vision.py +155 -0
  266. aglaia-0.1.0a2/aglaia/workers/ocr/auto_workers.py +198 -0
  267. aglaia-0.1.0a2/aglaia/workers/ocr/engine.py +272 -0
  268. aglaia-0.1.0a2/aglaia/workers/ocr/llm_refine.py +271 -0
  269. aglaia-0.1.0a2/aglaia/workers/ocr/mistral_batch.py +236 -0
  270. aglaia-0.1.0a2/aglaia/workers/ocr/mistral_cloud.py +387 -0
  271. aglaia-0.1.0a2/aglaia/workers/ocr/paddle_vl.py +723 -0
  272. aglaia-0.1.0a2/aglaia/workers/ocr/surya.py +485 -0
  273. aglaia-0.1.0a2/aglaia/workers/oplog.py +282 -0
  274. aglaia-0.1.0a2/aglaia/workers/pdf_export.py +407 -0
  275. aglaia-0.1.0a2/aglaia/workers/pdf_extract.py +84 -0
  276. aglaia-0.1.0a2/aglaia/workers/setup_cli.py +161 -0
  277. aglaia-0.1.0a2/aglaia/workers/slim_export.py +240 -0
  278. aglaia-0.1.0a2/aglaia.egg-info/PKG-INFO +473 -0
  279. aglaia-0.1.0a2/aglaia.egg-info/SOURCES.txt +289 -0
  280. aglaia-0.1.0a2/aglaia.egg-info/dependency_links.txt +1 -0
  281. aglaia-0.1.0a2/aglaia.egg-info/entry_points.txt +2 -0
  282. aglaia-0.1.0a2/aglaia.egg-info/requires.txt +71 -0
  283. aglaia-0.1.0a2/aglaia.egg-info/top_level.txt +2 -0
  284. aglaia-0.1.0a2/aglaia_jbig2/aglaia_jbig2/__init__.py +35 -0
  285. aglaia-0.1.0a2/pyproject.toml +188 -0
  286. aglaia-0.1.0a2/setup.cfg +4 -0
  287. aglaia-0.1.0a2/tests/test_imagebuffer_pickle.py +38 -0
  288. aglaia-0.1.0a2/tests/test_plugins.py +144 -0
  289. aglaia-0.1.0a2/tests/test_processing_chain.py +91 -0
  290. aglaia-0.1.0a2/tests/test_secrets.py +78 -0
  291. aglaia-0.1.0a2/tests/test_step_overrides.py +60 -0
aglaia-0.1.0a2/LICENSE ADDED
@@ -0,0 +1,120 @@
1
+ # PolyForm Shield License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/shield/1.0.0>
4
+
5
+ ## Acceptance
6
+
7
+ In order to get any license under these terms, you must agree to them
8
+ as both strict obligations and conditions to all your licenses.
9
+
10
+ ## Copyright License
11
+
12
+ The licensor grants you a copyright license for the software to do
13
+ everything you might do with the software that would otherwise
14
+ infringe the licensor's copyright in it for any permitted purpose.
15
+ However, you may only distribute the software according to
16
+ [Distribution License](#distribution-license) and make changes or new
17
+ works based on the software according to
18
+ [Changes and New Works License](#changes-and-new-works-license).
19
+
20
+ ## Distribution License
21
+
22
+ The licensor grants you an additional copyright license to distribute
23
+ copies of the software. Your license to distribute covers distributing
24
+ the software with changes and new works permitted by
25
+ [Changes and New Works License](#changes-and-new-works-license).
26
+
27
+ ## Notices
28
+
29
+ You must ensure that anyone who gets a copy of any part of the
30
+ software from you also gets a copy of these terms or the URL for them
31
+ above, as well as copies of any plain-text lines beginning with
32
+ `Required Notice:` that the licensor provided with the software. For
33
+ example:
34
+
35
+ > Required Notice: Copyright Yann Barbotin (https://aglaia.bibli.cc)
36
+
37
+ ## Changes and New Works License
38
+
39
+ The licensor grants you an additional copyright license to make
40
+ changes and new works based on the software for any permitted purpose.
41
+
42
+ ## Patent License
43
+
44
+ The licensor grants you a patent license for the software that covers
45
+ patent claims the licensor can license, or becomes able to license,
46
+ that you would infringe by using the software.
47
+
48
+ ## Noncompete
49
+
50
+ Any purpose is a permitted purpose, except for providing to others any
51
+ product that competes with the software.
52
+
53
+ If you use this software to market a product as a substitute for the
54
+ functionality or value of the software, it competes with the software.
55
+ A product may compete regardless how it is designed or deployed. For
56
+ example, a product may compete even if it provides its functionality
57
+ via any kind of interface (including services, libraries or plug-ins),
58
+ even if it is ported to a different platforms or programming
59
+ languages, and even if it is provided free of charge.
60
+
61
+ ## Fair Use
62
+
63
+ You may have "fair use" rights for the software under the law. These
64
+ terms do not limit them.
65
+
66
+ ## No Other Rights
67
+
68
+ These terms do not allow you to sublicense or transfer any of your
69
+ licenses to anyone else, or prevent the licensor from granting
70
+ licenses to anyone else. These terms do not imply any other licenses.
71
+
72
+ ## Patent Defense
73
+
74
+ If you make any written claim that the software infringes or
75
+ contributes to infringement of any patent, your patent license for the
76
+ software granted under these terms ends immediately. If your company
77
+ makes such a claim, your patent license ends immediately for work on
78
+ behalf of your company.
79
+
80
+ ## Violations
81
+
82
+ The first time you are notified in writing that you have violated any
83
+ of these terms, or done anything with the software not covered by your
84
+ licenses, your licenses can nonetheless continue if you come into full
85
+ compliance with these terms, and take practical steps to correct past
86
+ violations, within 32 days of receiving notice. Otherwise, all your
87
+ licenses end immediately.
88
+
89
+ ## No Liability
90
+
91
+ ***As far as the law allows, the software comes as is, without any
92
+ warranty or condition, and the licensor will not be liable to you for
93
+ any damages arising out of these terms or the use or nature of the
94
+ software, under any kind of legal claim.***
95
+
96
+ ## Definitions
97
+
98
+ The **licensor** is the individual or entity offering these terms, and
99
+ the **software** is the software the licensor makes available under
100
+ these terms.
101
+
102
+ **You** refers to the individual or entity agreeing to these terms.
103
+
104
+ **Your company** is any legal entity, sole proprietorship, or other
105
+ kind of organization that you work for, plus all organizations that
106
+ have control over, are under the control of, or are under common
107
+ control with that organization. **Control** means ownership of
108
+ substantially all the assets of an entity, or the power to direct its
109
+ management and policies by vote, contract, or otherwise. Control can
110
+ be direct or indirect.
111
+
112
+ **Your licenses** are all the licenses granted to you for the software
113
+ under these terms.
114
+
115
+ **Use** means anything you do with the software requiring one of your
116
+ licenses.
117
+
118
+ ---
119
+
120
+ Required Notice: Copyright Yann Barbotin (https://aglaia.bibli.cc)
@@ -0,0 +1,473 @@
1
+ Metadata-Version: 2.4
2
+ Name: aglaia
3
+ Version: 0.1.0a2
4
+ Summary: Webcam book scanner for macOS — capture, dewarp, binarize, OCR to searchable PDF/Markdown.
5
+ License: # PolyForm Shield License 1.0.0
6
+
7
+ <https://polyformproject.org/licenses/shield/1.0.0>
8
+
9
+ ## Acceptance
10
+
11
+ In order to get any license under these terms, you must agree to them
12
+ as both strict obligations and conditions to all your licenses.
13
+
14
+ ## Copyright License
15
+
16
+ The licensor grants you a copyright license for the software to do
17
+ everything you might do with the software that would otherwise
18
+ infringe the licensor's copyright in it for any permitted purpose.
19
+ However, you may only distribute the software according to
20
+ [Distribution License](#distribution-license) and make changes or new
21
+ works based on the software according to
22
+ [Changes and New Works License](#changes-and-new-works-license).
23
+
24
+ ## Distribution License
25
+
26
+ The licensor grants you an additional copyright license to distribute
27
+ copies of the software. Your license to distribute covers distributing
28
+ the software with changes and new works permitted by
29
+ [Changes and New Works License](#changes-and-new-works-license).
30
+
31
+ ## Notices
32
+
33
+ You must ensure that anyone who gets a copy of any part of the
34
+ software from you also gets a copy of these terms or the URL for them
35
+ above, as well as copies of any plain-text lines beginning with
36
+ `Required Notice:` that the licensor provided with the software. For
37
+ example:
38
+
39
+ > Required Notice: Copyright Yann Barbotin (https://aglaia.bibli.cc)
40
+
41
+ ## Changes and New Works License
42
+
43
+ The licensor grants you an additional copyright license to make
44
+ changes and new works based on the software for any permitted purpose.
45
+
46
+ ## Patent License
47
+
48
+ The licensor grants you a patent license for the software that covers
49
+ patent claims the licensor can license, or becomes able to license,
50
+ that you would infringe by using the software.
51
+
52
+ ## Noncompete
53
+
54
+ Any purpose is a permitted purpose, except for providing to others any
55
+ product that competes with the software.
56
+
57
+ If you use this software to market a product as a substitute for the
58
+ functionality or value of the software, it competes with the software.
59
+ A product may compete regardless how it is designed or deployed. For
60
+ example, a product may compete even if it provides its functionality
61
+ via any kind of interface (including services, libraries or plug-ins),
62
+ even if it is ported to a different platforms or programming
63
+ languages, and even if it is provided free of charge.
64
+
65
+ ## Fair Use
66
+
67
+ You may have "fair use" rights for the software under the law. These
68
+ terms do not limit them.
69
+
70
+ ## No Other Rights
71
+
72
+ These terms do not allow you to sublicense or transfer any of your
73
+ licenses to anyone else, or prevent the licensor from granting
74
+ licenses to anyone else. These terms do not imply any other licenses.
75
+
76
+ ## Patent Defense
77
+
78
+ If you make any written claim that the software infringes or
79
+ contributes to infringement of any patent, your patent license for the
80
+ software granted under these terms ends immediately. If your company
81
+ makes such a claim, your patent license ends immediately for work on
82
+ behalf of your company.
83
+
84
+ ## Violations
85
+
86
+ The first time you are notified in writing that you have violated any
87
+ of these terms, or done anything with the software not covered by your
88
+ licenses, your licenses can nonetheless continue if you come into full
89
+ compliance with these terms, and take practical steps to correct past
90
+ violations, within 32 days of receiving notice. Otherwise, all your
91
+ licenses end immediately.
92
+
93
+ ## No Liability
94
+
95
+ ***As far as the law allows, the software comes as is, without any
96
+ warranty or condition, and the licensor will not be liable to you for
97
+ any damages arising out of these terms or the use or nature of the
98
+ software, under any kind of legal claim.***
99
+
100
+ ## Definitions
101
+
102
+ The **licensor** is the individual or entity offering these terms, and
103
+ the **software** is the software the licensor makes available under
104
+ these terms.
105
+
106
+ **You** refers to the individual or entity agreeing to these terms.
107
+
108
+ **Your company** is any legal entity, sole proprietorship, or other
109
+ kind of organization that you work for, plus all organizations that
110
+ have control over, are under the control of, or are under common
111
+ control with that organization. **Control** means ownership of
112
+ substantially all the assets of an entity, or the power to direct its
113
+ management and policies by vote, contract, or otherwise. Control can
114
+ be direct or indirect.
115
+
116
+ **Your licenses** are all the licenses granted to you for the software
117
+ under these terms.
118
+
119
+ **Use** means anything you do with the software requiring one of your
120
+ licenses.
121
+
122
+ ---
123
+
124
+ Required Notice: Copyright Yann Barbotin (https://aglaia.bibli.cc)
125
+
126
+ Requires-Python: <3.13,>=3.12
127
+ Description-Content-Type: text/markdown
128
+ License-File: LICENSE
129
+ Requires-Dist: doxapy>=0.9.4
130
+ Requires-Dist: jax>=0.9.0
131
+ Requires-Dist: jaxlib>=0.9.0
132
+ Requires-Dist: ml-dtypes>=0.5.4
133
+ Requires-Dist: numpy<2.1.0,>=1.26.0
134
+ Requires-Dist: opencv-python-headless>=4.8.0
135
+ Requires-Dist: page-dewarp>=0.2.7
136
+ Requires-Dist: pikepdf>=10.0.0
137
+ Requires-Dist: pillow>=10.0.0
138
+ Requires-Dist: platformdirs>=4.3.0
139
+ Requires-Dist: psutil>=7.2.2
140
+ Requires-Dist: pypdfium2>=4.30.0
141
+ Requires-Dist: python-slugify>=8.0.0
142
+ Requires-Dist: pyyaml>=6.0.0
143
+ Requires-Dist: questionary>=2.1.1
144
+ Requires-Dist: rich>=13.0.0
145
+ Requires-Dist: scipy>=1.11.0
146
+ Provides-Extra: surya
147
+ Requires-Dist: surya-ocr>=0.20.0; extra == "surya"
148
+ Requires-Dist: torch<3,>=2.7.0; extra == "surya"
149
+ Provides-Extra: paddle
150
+ Requires-Dist: paddleocr[doc-parser]>=3.6.0; extra == "paddle"
151
+ Requires-Dist: paddlepaddle>=3.2.1; extra == "paddle"
152
+ Requires-Dist: mlx-vlm>=0.6.0; extra == "paddle"
153
+ Provides-Extra: gui
154
+ Requires-Dist: pyside6-essentials>=6.7.0; extra == "gui"
155
+ Requires-Dist: pyqtdarktheme>=2.1.0; extra == "gui"
156
+ Provides-Extra: voice
157
+ Requires-Dist: vosk>=0.3.45; sys_platform != "darwin" and extra == "voice"
158
+ Requires-Dist: vosk==0.3.44; sys_platform == "darwin" and extra == "voice"
159
+ Requires-Dist: sounddevice>=0.4.6; extra == "voice"
160
+ Provides-Extra: macos
161
+ Requires-Dist: pyobjc-framework-avfoundation>=10.0; extra == "macos"
162
+ Requires-Dist: pyobjc-framework-cocoa>=10.0; extra == "macos"
163
+ Requires-Dist: pyobjc-framework-speech>=10.0; extra == "macos"
164
+ Requires-Dist: pyobjc-framework-vision>=10.0; extra == "macos"
165
+ Requires-Dist: mlx>=0.20; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "macos"
166
+ Provides-Extra: dev
167
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
168
+ Requires-Dist: reportlab>=4.0.0; extra == "dev"
169
+ Provides-Extra: package
170
+ Requires-Dist: pyinstaller>=6.10.0; extra == "package"
171
+ Provides-Extra: cuda
172
+ Requires-Dist: jax[cuda12]>=0.9.0; extra == "cuda"
173
+ Provides-Extra: jbig2
174
+ Requires-Dist: aglaia_jbig2; extra == "jbig2"
175
+ Provides-Extra: cloud
176
+ Requires-Dist: mistralai>=1.0.0; extra == "cloud"
177
+ Requires-Dist: keyring>=24.0.0; extra == "cloud"
178
+ Provides-Extra: keyring-bitwarden
179
+ Requires-Dist: bitwarden-keyring>=0.3.1; extra == "keyring-bitwarden"
180
+ Provides-Extra: keyring-1password
181
+ Requires-Dist: onepassword-keyring>=0.1.1; extra == "keyring-1password"
182
+ Dynamic: license-file
183
+
184
+ <a id="readme-top"></a>
185
+
186
+ <!-- PROJECT SHIELDS -->
187
+ [![Release][release-shield]][release-url]
188
+ [![CI][ci-shield]][ci-url]
189
+ [![Issues][issues-shield]][issues-url]
190
+ [![Python 3.12][python-shield]][python-url]
191
+ [![Platforms][platforms-shield]][release-url]
192
+ [![Made in France][france-shield]][france-url]
193
+ [![License: PolyForm Shield][license-shield]][license-url]
194
+
195
+ <!-- PROJECT HEADER -->
196
+ <br />
197
+ <div align="center">
198
+ <picture>
199
+ <source media="(prefers-color-scheme: dark)" srcset="./aglaia/assets/brand/aglaia-dark.png" />
200
+ <img alt="Aglaïa" src="./aglaia/assets/brand/aglaia-light.png" width="380" />
201
+ </picture>
202
+
203
+ <p align="center">
204
+ Turn a webcam and a stack of pages into clean, deskewed, dewarped,
205
+ searchable PDFs — locally, on your machine.
206
+ <br />
207
+ <a href="https://aglaia.bibli.cc/docs"><strong>Explore the docs »</strong></a>
208
+ <br />
209
+ <br />
210
+ <a href="https://aglaia.bibli.cc">Website</a>
211
+ ·
212
+ <a href="https://github.com/yb85/aglaia/releases/latest">Download</a>
213
+ ·
214
+ <a href="https://github.com/yb85/aglaia/issues/new?labels=bug">Report Bug</a>
215
+ ·
216
+ <a href="https://github.com/yb85/aglaia/issues/new?labels=enhancement">Request Feature</a>
217
+ </p>
218
+ </div>
219
+
220
+ > [!WARNING]
221
+ > **Alpha software — it will crash.** Aglaïa is under active development and
222
+ > still in testing. It is fairly well tested on **macOS**, but **not yet** on
223
+ > **Linux** or **Windows** — expect bugs and rough edges there. Keep your
224
+ > originals; don't rely on it for anything irreplaceable. Bug reports welcome.
225
+
226
+ <!-- TABLE OF CONTENTS -->
227
+ <details>
228
+ <summary>Table of Contents</summary>
229
+ <ol>
230
+ <li>
231
+ <a href="#about-the-project">About The Project</a>
232
+ <ul><li><a href="#built-with">Built With</a></li></ul>
233
+ </li>
234
+ <li>
235
+ <a href="#getting-started">Getting Started</a>
236
+ <ul>
237
+ <li><a href="#download">Download</a></li>
238
+ <li><a href="#install-from-the-command-line">Install from the command line</a></li>
239
+ </ul>
240
+ </li>
241
+ <li><a href="#usage">Usage</a></li>
242
+ <li><a href="#how-it-works">How It Works</a></li>
243
+ <li><a href="#roadmap">Roadmap</a></li>
244
+ <li><a href="#contributing">Contributing</a></li>
245
+ <li><a href="#license">License</a></li>
246
+ <li><a href="#contact">Contact</a></li>
247
+ <li><a href="#acknowledgments">Acknowledgments</a></li>
248
+ </ol>
249
+ </details>
250
+
251
+ <!-- ABOUT THE PROJECT -->
252
+ ## About The Project
253
+
254
+ The goal of this project is to provide a simple, comprehensive, extendable, tool for end-to-end book scanning.
255
+
256
+ Book scanning is usually done using custom rigs — *eg* [Custom rigs on diybookscanner.org](https://www.diybookscanner.org/en/designs.html)
257
+
258
+ This is a fine way of doing things which has many advantages : you control the perspective, the geometry, the illumination, …
259
+ **BUT** it is not portable and requires a quite substancial time and resources investment.
260
+
261
+ At the other end of the spectrum you have ugly phone pictures, and a myriad of "Free Scanner" aps on the iOS appStore which all repackage the simple homography and detection primitives of the Apple Vision SDK : if you are not scanning flat sheets of paper you are out of luck
262
+
263
+ **Aglaia** wants to do the following : **Provide a comprehensive solution to book scanning**, *ie* allow to use **physical books** and **the tools you have** (a laptop and a phone, maybe a camera) **in any situation** you could be (at your desk, on bench outside, at the libray…) to produce **high-quality digital materials** suitable for :
264
+ - archiving, indexing and printing : **clean, OCRed PDFs**
265
+ - feeding knowledgebases and AI research tools : **well structured Markdown files**
266
+
267
+ The slider section on the project website demonstrates this purpose :
268
+ ![3 different scanning situations](./docs/assets/sliders_readme.png)
269
+
270
+
271
+ **Aglaïa**'s purpose is similar to **Scantailor**'s, but it tries to reduce the friction with better import (images, pdf or capture), exports (pdf with OCR, markdown, ...), built-in OCR, extendability through custom pipelines, exporters and plugins and more modern algorithms.
272
+
273
+ ### What the default pipeline will do to a standard book ?
274
+
275
+ In a few word Aglaïa will produce precisely cut binarized text pages with perspective and page curvature correction. On a modern laptop it can process roughly 1 page / sec.
276
+
277
+ To achieve it, it relies on :
278
+
279
+ - a coarse scan-based deskewing followed by a robust and precise page extraction using lightweight ML text recognition models
280
+ - a finer page based deskewing followed by a robust binarization which can tolerate very unequal illumination and handle border constraints
281
+ - keystone and page curvature correction. This is the most computationally demanding part, handed out to JAX/CUDA or JAX/MLX libraries if available
282
+ - a final replay to intelligently compose the coordinate and morphological transforms to avoid successive interpolation artifacts, especially severe on bilevel images
283
+
284
+ ![Operator composition (Smart replay) prevents re-interpolation artifacts](./docs/assets/replay.png)
285
+
286
+
287
+
288
+ > [!NOTE]
289
+ > **Cross-platform.** Native GUI builds ship for **macOS** (signed/notarized
290
+ > DMG, Apple Silicon), **Windows** (installer) and **Linux** (AppImage), plus
291
+ > `pip install aglaia` on any platform. On macOS, Apple Vision powers page
292
+ > detection and on-device OCR; off macOS, Aglaïa falls back to EAST/DBnet for
293
+ > layout and to Surya / PaddleOCR-VL / Mistral for OCR. Voice control (Vosk)
294
+ > is offline and cross-platform.
295
+
296
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
297
+
298
+ ### How much does it costs ?
299
+
300
+ It's free. [Donations are appreciated](https://ko-fi.com/yb_85) to help cover developpement costs (signing and notarization, AI coding tool)
301
+
302
+
303
+ ### Built With
304
+
305
+ * [![Python][python-shield]][python-url] managed with [uv](https://docs.astral.sh/uv/)
306
+ * **PySide6** — cross-platform desktop GUI
307
+ * **OpenCV · NumPy · SciPy · Pillow** — image processing
308
+ * **page-dewarp + JAX / MLX** — cubic-sheet page dewarp (MLX on Apple Silicon). The original project has been highly modified and extended
309
+ * **doxapy** — binarization (Wolf / Sauvola)
310
+ * **pikepdf · pypdfium2** — PDF I/O
311
+ * **Apple Vision · Speech** (pyobjc, macOS) — OCR, layout, with EAST/DBnet fallbacks
312
+ * **Surya · PaddleOCR-VL · Mistral Document AI** — cross-platform OCR engines
313
+ * **Vosk** — offline voice control (cross-platform)
314
+ * **SQLite (FTS5)** — project + full-text store
315
+
316
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
317
+
318
+ <!-- GETTING STARTED -->
319
+ ## Getting Started
320
+
321
+ ### Download
322
+
323
+ Grab the latest build for your platform — the release CI publishes
324
+ fixed-name "latest" artifacts, so these links never go stale:
325
+
326
+ | Platform | Download | Notes |
327
+ |---|---|---|
328
+ | **macOS** (Apple Silicon) | [`Aglaia-macos-arm64.dmg`](https://github.com/yb85/aglaia/releases/latest/download/Aglaia-macos-arm64.dmg) | Signed + notarized. Open and drag to Applications. |
329
+ | **Windows** (x64) | [`Aglaia-windows-x64-setup.exe`](https://github.com/yb85/aglaia/releases/latest/download/Aglaia-windows-x64-setup.exe) | Installer; registers the `.agl` file type. **Not code-signed** — SmartScreen will warn; click **More info → Run anyway**. Verify with [`SHA256SUMS-windows.txt`](https://github.com/yb85/aglaia/releases/latest/download/SHA256SUMS-windows.txt). |
330
+ | **Linux** (x86_64) | [`Aglaia-x86_64.AppImage`](https://github.com/yb85/aglaia/releases/latest/download/Aglaia-x86_64.AppImage) | `chmod +x`, then run. Needs FUSE (`fuse2`). |
331
+
332
+ ### Install from the command line
333
+
334
+ CLI-only or scripted setups (any platform) install via **uv** or **pip**:
335
+
336
+ ```sh
337
+ # from PyPI — installs the `aglaia` command
338
+ pip install aglaia # lean base: headless pipeline, no Qt
339
+ pip install "aglaia[gui]" # Windows / Linux GUI (Qt)
340
+ pip install "aglaia[gui,macos]" # macOS GUI: Vision, Speech, MLX dewarp
341
+ ```
342
+
343
+ ```sh
344
+ # or build from source with the extras you want
345
+ git clone https://github.com/yb85/aglaia.git && cd aglaia
346
+ uv sync --extra gui --extra macos # macOS GUI
347
+ uv sync --extra gui # Windows / Linux GUI
348
+ uv sync # headless: CLI pipeline, no Qt
349
+ ```
350
+
351
+ Optional extras: `--extra surya` / `--extra paddle` (OCR engines),
352
+ `--extra voice` (Vosk), `--extra cloud` (Mistral), `--extra cuda` (NVIDIA
353
+ GPU dewarp on Linux).
354
+
355
+ **First run (CLI-only installs):** run the one-time setup to pick and download
356
+ the offline models, seed the default pipelines, and bootstrap the config:
357
+
358
+ ```sh
359
+ aglaia --setup # interactive: choose models (DBnet, EAST, Surya…), download, configure
360
+ ```
361
+
362
+ This is the terminal equivalent of the GUI's first-run wizard. A headless batch
363
+ run refuses to start until the install is configured (`--setup` or the GUI).
364
+ The GUI installs run the wizard automatically on first launch.
365
+
366
+ >[!WARNING] Build with the right options
367
+ > The `--extra` options are mandatory to interface models and backends with python. If you download the models or install cuda drivers on your computer but forget to include teh relevant extra options, they won't be used
368
+ >
369
+
370
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
371
+
372
+ <!-- USAGE -->
373
+ ## Usage
374
+
375
+ ```sh
376
+ # Capture GUI (webcam + processing chain + voice control)
377
+ uv run aglaia ~/scans/my-book # or just `aglaia …` once installed
378
+
379
+ # Headless CLI batch — same chain, no Qt
380
+ uv run aglaia ~/scans/my-book.agl --headless -p aglaia/config/pipelines/book_curved_x2.yaml
381
+ ```
382
+
383
+ Key flags: `--setup` (first-run config), `-c/--config`, `-p/--pipeline`,
384
+ `--workers`, `--export`, `--ocr`, `--input-dpi`, `--headless`,
385
+ `--camera-id`. The import panel accepts multiple images and PDFs (per-page
386
+ extract or render). Page detection defaults to **DBnet** (`auto` resolves
387
+ DBnet → Apple Vision on macOS → EAST); `aglaia --setup` and the in-app
388
+ downloader fetch the models, or drop them into `./model/` / `./models/`.
389
+
390
+ _For the full guide, see the [documentation](https://aglaia.bibli.cc/docs)._
391
+
392
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
393
+
394
+ <!-- HOW IT WORKS -->
395
+ ## How It Works
396
+
397
+ ```
398
+ capture → DPI fix → deskew → layout detect → keystone → dewarp → binarize → OCR → export
399
+ ```
400
+
401
+ Every step is a pluggable processor defined in a YAML pipeline. Add your
402
+ own by dropping `aglaia/processors/<NewProc>.py` (the registry auto-discovers
403
+ it) — or, at runtime, drop a `.py` into `<APP_DATA>/plugins/` and approve
404
+ it in the trust prompt. See
405
+ [Architecture](https://aglaia.bibli.cc/docs/reference/architecture) and
406
+ [Processors](https://aglaia.bibli.cc/docs/reference/processors).
407
+
408
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
409
+
410
+ <!-- CONTRIBUTING -->
411
+ ## Contributing
412
+
413
+ Work is tracked via GitHub issues + milestones — one issue per discrete
414
+ unit of work. Before non-trivial work, open an issue. Branch names
415
+ reference it (`feat/123-slug`); PRs close via `Closes #N`.
416
+
417
+ 1. Fork the project
418
+ 2. Create your branch (`git checkout -b feat/123-amazing-feature`)
419
+ 3. Make changes; keep `ruff`, `mypy --strict`, and `pytest` green
420
+ 4. Commit (`git commit -m 'feat: add amazing feature'`)
421
+ 5. Push and open a Pull Request
422
+
423
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
424
+
425
+ <!-- LICENSE -->
426
+ ## License
427
+
428
+ Source-available under the **[PolyForm Shield License 1.0.0](https://polyformproject.org/licenses/shield/1.0.0/)**
429
+ — see [`LICENSE`](LICENSE).
430
+
431
+ >[!WARNING] This is not strictly-speaking "open-source" !
432
+ >
433
+ > the reason is not to make it one day a commercial product, but to avoid trivial SaaS repackaging which hurts the developpment of free Apps.
434
+ >
435
+
436
+ You may use, modify, and redistribute the software for **any purpose
437
+ except building a product that competes with it**. Otherwise free.
438
+
439
+ Repackaging it and removing the donation link is direct competition.
440
+
441
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
442
+
443
+ <!-- CONTACT -->
444
+ ## Contact
445
+
446
+ aglaia@bibli.cc
447
+
448
+ Project: [github.com/yb85/aglaia](https://github.com/yb85/aglaia) ·
449
+ Website: [aglaia.bibli.cc](https://aglaia.bibli.cc)
450
+
451
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
452
+
453
+ <!-- ACKNOWLEDGMENTS -->
454
+ ## Acknowledgments
455
+
456
+ See [ABOUT page](./ABOUT.md).
457
+
458
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
459
+
460
+ <!-- MARKDOWN LINKS & IMAGES -->
461
+ [release-shield]: https://img.shields.io/github/v/release/yb85/aglaia?style=for-the-badge
462
+ [release-url]: https://github.com/yb85/aglaia/releases/latest
463
+ [ci-shield]: https://img.shields.io/github/actions/workflow/status/yb85/aglaia/ci.yml?style=for-the-badge&label=CI
464
+ [ci-url]: https://github.com/yb85/aglaia/actions/workflows/ci.yml
465
+ [issues-shield]: https://img.shields.io/github/issues/yb85/aglaia?style=for-the-badge
466
+ [issues-url]: https://github.com/yb85/aglaia/issues
467
+ [python-shield]: https://img.shields.io/badge/python-3.12-3776AB?style=for-the-badge&logo=python&logoColor=white
468
+ [python-url]: https://www.python.org/
469
+ [platforms-shield]: https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-555?style=for-the-badge
470
+ [france-shield]: https://img.shields.io/badge/Made%20in-France%20%F0%9F%87%AB%F0%9F%87%B7-777?style=for-the-badge
471
+ [france-url]: https://github.com/yb85/aglaia
472
+ [license-shield]: https://img.shields.io/badge/license-PolyForm%20Shield%201.0.0-orange?style=for-the-badge
473
+ [license-url]: https://polyformproject.org/licenses/shield/1.0.0/