Ë
    ›¾js  ã            	       óV  — d dl mZ d dlmZmZ ddlmZmZ ddlm	Z	m
Z
mZmZ dZde	› d	e	› d
e› d�Zde› d�Zde› d�Zde› d�ZdZdZdZdZ ej,                  d«       e
 ej.                  «       ddd¬«       edddd¬«       edd d!d"¬«      fd#ed$ed%efd&„«       Zdd'œd#ed$ed%ed(d)fd*„Zy))+é    )ÚPath)ÚMarkdownRendererÚmsgé   )Úload_project_configÚworking_diré   )ÚPROJECT_FILEÚArgÚOptÚappz#https://github.com/explosion/weaselzThe [`z`](z�) defines the data assets required by the
project, as well as the available commands and workflows. For details, see the
[Weasel documentation](z).zdThe following commands are defined by the project. They
can be executed using [`weasel run [name]`](zZ/tree/main/docs/cli.md#rocket-run).
Commands are only re-run if their inputs have changed.zeThe following workflows are defined by the project. They
can be executed using [`weasel run [name]`](z‡/tree/main/docs/cli.md#rocket-run)
and will run the specified commands in order. Commands are only re-run if their
inputs have changed.zbThe following assets are defined by the project. They can
be fetched by running [`weasel assets`](zI/tree/main/docs/cli.md#open_file_folder-assets)
in the project directory.)ÚWEASELzSPACY PROJECTz9<!-- {tag}: AUTO-GENERATED DOCS START (do not remove) -->z7<!-- {tag}: AUTO-GENERATED DOCS END (do not remove) -->z<!-- {tag}: IGNORE -->Údocumentz>Path to cloned project. Defaults to current working directory.TF)ÚhelpÚexistsÚ	file_okayú-z--outputz-ozJPath to output Markdown file for output. Defaults to - for standard output)r   z
--no-emojiz-NEzDon't use emojiÚproject_dirÚoutput_fileÚno_emojic                 ó    — t        | ||¬«       y)al  
    Auto-generate a README.md for a project. If the content is saved to a file,
    hidden markers are added so you can add custom content before or after the
    auto-generated section and only the auto-generated docs will be replaced
    when you re-run the command.

    DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#closed_book-document
    ©r   N)Úproject_document)r   r   r   s      ú]/home/spazio/kingdom_calls/work5/transenv/lib/python3.12/site-packages/weasel/cli/document.pyÚproject_document_clir      s   € ô  �[ +¸ÖAó    r   ÚreturnNc          	      ó|
  ‡— t        |«      dk(  }t        | «      }t        |¬«      Š‰j                  t        j                  d¬«      «       |j                  d«      }|j                  d«      }‰j                  ‰j                  dd|rd	|› �nd
› �d«      «       |r‰j                  |«       ‰j                  ‰j                  dt        d«      «       ‰j                  t        «       |j                  dg «      }|D �cg c](  }‰j                  |d   «      |j                  dd
«      f‘Œ* }	}|	rZ‰j                  ‰j                  ddd«      «       ‰j                  t        «       ‰j                  ‰j                  |	ddg«      «       |j                  di «      j                  «       }
|
D ��cg c]0  \  }}‰j                  |«      dj                  ˆfd„|D «       «      f‘Œ2 }	}}|	rZ‰j                  ‰j                  ddd«      «       ‰j                  t        «       ‰j                  ‰j                  |	ddg«      «       |j                  dg «      }g }	|D ]¢  }|j                  d«      rdn|j                  d «      rd!nd"}|d#   }‰j                  |«      }|d"k(  r9t!        | «      5 }||z  j#                  «       r‰j%                  ||«      }d d d «       |	j'                  |||j                  dd
«      f«       Œ¤ |	rZ‰j                  ‰j                  dd$d%«      «       ‰j                  t(        «       ‰j                  ‰j                  |	g d&¢«      «       ‰j                  t*        j                  d¬«      «       |rt-        ‰j.                  «       y ‰j.                  }|j#                  «       �r|j1                  d'd(¬)«      5 }|j3                  «       }d d d «       t4        D ]2  }t6        j                  |¬«      v sŒt9        j:                  d*|«        y  d+}t4        D ]�  }t        j                  |¬«      t*        j                  |¬«      d,œ}|d-   v sŒ8|d.   |v sŒ@d/}t9        j<                  d0«       |j?                  |d-   «      d1   }|j?                  |d.   «      d   }|› |› |› �} n |st9        j:                  d2«       |j1                  d3d(¬)«      5 }|jA                  |«       d d d «       t9        jB                  d4|«       y c c}w c c}}w # 1 sw Y   �ŒKxY w# 1 sw Y   �ŒPxY w# 1 sw Y   ŒExY w)5Nr   r   r   )ÚtagÚtitleÚdescriptionr	   zWeasel Projectz: Ú u   ðŸª�r   u   ðŸ“‹ÚcommandsÚnamer   é   ÚCommandsu   â�¯ÚCommandÚDescriptionÚ	workflowsz &rarr; c              3   ó@   •K  — | ]  }‰j                  |«      –— Œ y ­w)N)Úcode)Ú.0ÚwÚmds     €r   ú	<genexpr>z#project_document.<locals>.<genexpr>I   s   øè ø€ Ò(A¸¨¯©°¯Ñ(Aùs   ƒÚ	Workflowsu   â�­ÚWorkflowÚStepsÚassetsÚgitÚGitÚurlÚURLÚLocalÚdestÚAssetsu   ðŸ—‚)ÚFileÚSourcer(   ÚrÚutf8)Úencodingz.Found ignore marker in existing file: skippingF)ÚstartÚendr@   rA   Tz7Found existing file: only replacing auto-generated docsr   zReplacing existing filer-   zSaved project documentation)"Ústrr   r   ÚaddÚMARKER_STARTÚformatÚgetr    r
   ÚINTRO_PROJECTr+   ÚINTRO_COMMANDSÚtableÚitemsÚjoinÚINTRO_WORKFLOWSr   r   ÚlinkÚappendÚINTRO_ASSETSÚ
MARKER_ENDÚprintÚtextÚopenÚreadÚMARKER_TAGSÚMARKER_IGNOREr   ÚwarnÚinfoÚsplitÚwriteÚgood)r   r   r   Ú	is_stdoutÚconfigr    r!   ÚcmdsÚcmdÚdataÚwfsÚnÚstpr3   ÚaÚsourceÚ	dest_pathr9   ÚpÚcontentÚfÚexistingÚ
marker_tagÚmarker_tag_foundÚmarkersÚbeforeÚafterr.   s                              @r   r   r   2   s–  ø€ ô �KÓ  CÑ'€IÜ  Ó-€FÜ	 8Ô	,€BØ‡F�FŒ<×Ñ 8ÐÓ,Ô-Ø�J‰J�wÓ€EØ—*‘*˜]Ó+€KØ‡F�Fˆ2�8‰8�A˜¹¨"¨U¨G©À2Ð'FÐGÈÓPÔQÙØ
�‰ˆ{ÔØ‡F�Fˆ2�8‰8�A”| VÓ,Ô-Ø‡F�FŒ=Ôà�:‰:�j "Ó%€DØCGÖH¸CˆR�W‰W�S˜‘[Ó! 3§7¡7¨6°2Ó#6Ò7ÐH€DÐHÙØ
�‰ˆr�x‰x˜˜: uÓ-Ô.Ø
�‰Œ~ÔØ
�‰ˆr�x‰x˜˜y¨-Ð8Ó9Ô:à
�*‰*�[ "Ó
%×
+Ñ
+Ó
-€CØQT×UÁvÀqÈ#ˆR�W‰W�Q‹Z˜Ÿ™Ó(A¸SÔ(AÓAÒBÐU€DÑUÙØ
�‰ˆr�x‰x˜˜;¨Ó.Ô/Ø
�‰ŒÔØ
�‰ˆr�x‰x˜˜z¨7Ð3Ó4Ô5à�Z‰Z˜ "Ó%€FØ€DØò 	>ˆØŸ%™% œ,‘°Q·U±U¸5´\©EÀwˆØ�f‘Iˆ	Ø�w‰w�yÓ!ˆØ�WÒä˜[Ó)ð 4¨QØ˜	‘M×)Ñ)Ô+ØŸ7™7 4¨Ó3�D÷4ð 	�‰�T˜6 1§5¡5¨¸Ó#;Ð<Õ=ð	>ñ Ø
�‰ˆr�x‰x˜˜8 VÓ,Ô-Ø
�‰Œ|ÔØ
�‰ˆr�x‰x˜Ò?Ó@ÔAØ‡F�FŒ:×Ñ ÐÓ*Ô+áÜˆb�g‰g�à—'‘'ˆØ×ÑÕØ×!Ñ! #°Ð!Ó7ð $¸1ØŸ6™6›8�÷$ô *ò �
Ü ×'Ñ'¨JÐ'Ó7¸8ÒCÜ—H‘HØHÈ+ôñ ðð  %ÐÜ)ò �
ä)×0Ñ0°ZÐ0Ó@Ü%×,Ñ,°Ð,Ó<ñ�ð ˜7Ñ# xÒ/°G¸E±NÀhÒ4NØ'+Ð$Ü—H‘HÐVÔWØ%Ÿ^™^¨G°GÑ,<Ó=¸aÑ@�FØ$ŸN™N¨7°5©>Ó:¸1Ñ=�EØ!' ¨¨	°%°Ð9�GÙðñ $Ü—‘Ð2Ô3à×Ñ˜c¨FÐÓ3ð 	°qØ�G‰G�GÔ÷	ä�‰Ð.°Õ<ùòA Iùó V÷4ñ 4ú÷$ñ $ú÷4	ð 	ús0   Ã>-TÆ.5TÊ)&TÏT%ÓT2ÔT"	Ô%T/Ô2T;)Úpathlibr   Úwasabir   r   Úutilr   r   Úmainr
   r   r   r   ÚDOCS_URLrG   rH   rL   rO   rU   rD   rP   rV   ÚcommandÚcwdÚboolr   r   © r   r   ú<module>ry      sG  ðÝ ç (ç 3ß -Ó -à0€Ø˜<˜.¨¨L¨>ð :à �z ð'€ð-Ø-5¨Jð 77ð:€ð-Ø-5¨Jð 7ð€ð)Ø)1¨
ð 3ð€ð
 *€ØJ€ØF€
à(€ð €‡�ˆZÓñ ˜H˜DŸH™H›JÐ-mÐvzð  GLô  MÙ˜C ¨Tð  9Eô  FÙ˜ ¨eÐ:KÔLñ	BàðBð ðBð ò	Bó ðBð& ?DòP=ØðP=Ø$(ðP=Ø7;ðP=à	ôP=r   