ó
    q0j�  ã                  ó†   • S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSK	J
r
Jr  SSKJr  SSKJr  S	 r\S
:X  a  \" 5         gg)aÙ  Set-of-Mark extraction review HTML: per table, a before/after side by side.

Left ("before"): the page cropped around the table with its Set-of-Mark
bounding box (the model's som_region) drawn on it. Right ("after"): the final
corrected markdown. No intermediary raw camelot grid.

Runs the Set-of-Mark engine live (the default extractor) to get the tables,
then hands them to quber.review for rendering -- the same renderer the
`quber extract --review` flag uses. Run from the project root with the project
venv active.

Usage: python gen_html.py <out.html> <backend> <pdf> [<pdf> ...]
  backend: api (real LLM correction) or mock (no-LLM, raw grid markdown).
The output is responsive: on screens <=900px the two columns stack.
é    )ÚannotationsN)ÚPath)Úcast)ÚBackendÚget_llm_client)ÚSetOfMarkExtractor)Úrender_review_htmlc            	     óÀ  • [         R                  S   [         R                  S   p[         R                  SS   Vs/ s H  n[        U5      PM     nn[        S[	        [        [        U5      5      S9n/ nU HL  n UR                  U5      n[        SUR                   S[        U5       S	35        UR                  Xg45        MN     [        U[        U 5      5        [        S
U  S[        U 5      R!                  5       R"                  S-   S35        g s  snf ! [         a;  n[        R                  " 5         [        SUR                   SU 35         S nAMá  S nAff = f)Né   é   é   éÈ   )ÚdpiÚllmzFAILED z: zOK z tableszwrote z (i   z KB))ÚsysÚargvr   r   r   r   r   Úextract_tables_syncÚ	ExceptionÚ	tracebackÚ	print_excÚprintÚstemÚlenÚappendr	   ÚstatÚst_size)	ÚoutÚbackendÚpÚpdfsÚ	extractorÚitemsÚpdfÚtablesÚexcs	            Ú4.claude/skills/extraction-review/scripts/gen_html.pyÚmainr'      s#  € Ü—8‘8˜A‘;¤§¡¨¡ˆÜ ŸX™X a b™\Ó*š\˜ŒD�ŽG™\€DÐ*ä" s´¼tÄGÈWÓ?UÓ0VÑW€Ià€EÛˆð	Ø×2Ñ2°3Ó7ˆFô
 	��C—H‘H�:˜R¤ F£˜}¨GÐ4Ô5Ø�‰�c�]Ö#ñ ô �uœd 3›iÔ(Ü	ˆF�3�%�rœ$˜s›)Ÿ.™.Ó*×2Ñ2°dÑ:Ð;¸4Ð
@ÕAùò! +øô ó 	Ü×ÒÔ!Ü�G˜CŸH™H˜: R¨ uÐ-Ô.Ýûð	ús   »DÁ;DÄ
EÄ"0EÅEÚ__main__)Ú__doc__Ú
__future__r   r   r   Úpathlibr   Útypingr   Úquber.agents.llm_clientr   r   Úquber.core.extractorsr   Úquber.reviewr	   r'   Ú__name__© ó    r&   Ú<module>r3      s>   ðñõ  #ã 
Û Ý Ý ç ;Ý 4Ý +òBð* ˆzÓÙ…Fð r2   