
    `\jf                        d dl Z d dlZd dlZd dlmZmZ d dlmZ  ee                                          j	        d         Z
e
dz  Ze
dz  Ze
dz  Ze
dz  Ze
d	z  Ze
d
z  Zd Zedk    r ej         e                       dS dS )    N)datetimetimezone)Path   zscript/validate-story.pyzscript/validate-originality.pyzstory/promotion-report.jsonzstory/originality-report.jsonzscript/project-manifest.jsonzscript/production-plan.jsonc            	         t           t          fD ]F} t          j        t          j        t          |           gt                    }|j        r	|j        c S Gt          j
        t                                                    }t          j
        t                                                    }t          j
        t                                                    }t          j
        t                                                    }|                    d          }|                    d          dus0|                    d          dus|                    d          |k    rdS |                    d          |                    dd	                              d
          k    s|                    d          durdS t%          j        t(          j                                                  }|                    d||d         |d         |d           |                    dd||d         |d           d|d         d<   d|d         d<   t                              t          j        |dd          dz              t                              t          j        |dd          dz              t5          t          j        d||d         |d         dd                     dS )N)cwdspoken_sha256verifiedTsource_canon_sha256r   outline_sha256outline_hash zsha256:reuse_previous_projectsFstory_promoted_ready_for_ttstotal_wordsestimated_minutes_at_baseline)statuscanon_sha256story_wordsstory_estimated_minutespromoted_atstory_promotedzstory/spoken-narration.txt)r   canon_authority
canon_hashstory_word_count
updated_at	completedstepsstorypendingtts   )ensure_asciiindent
)promotedr   wordsestimated_minutes)r#   r   )	VALIDATORORIGINALITY
subprocessrunsys
executablestrPROJECT
returncodejsonloadsREPORT	read_textORIGMANIFESTPLANgetremoveprefixr   nowr   utc	isoformatupdate
write_textdumpsprint)	validatorrreportorigmanifestplancanonr;   s           script/promote-story.pymainrJ      sq   [) & &YNCN3y>>2w???!\%%%%%
6##%%&&DJt~~7G7G,H,HtRVR\]e]o]o]q]qRrRrx|  yC  DH  DR  DR  DT  DT  yU  yUsw  \b  \f  \f  gv  \w  \w  V[
JJz$&&$((:*>*>d*J*JdhhWlNmNmotNtNt|}|}HH^B ? ? L LY W WWW[_[c[cd}[~[~  GL  \L  \L  TU  TU\(,))++DKKB`pu  EK  LY  EZ  u{  |[  u\  kn  9o  9o  -p  -p  -p  qy  q@  q@  K[  nJ  X]  qw  xE  qF  TW  AX  AX  qY  qY  qY  u@  Zb  cj  Zk  ls  Zt  Zc  AI  JQ  AR  SX  AY  dh  ds  ds  tx  t~  C  QV  ^_  t`  t`  t`  ae  te  df  df  df  go  gz  gz  {  {E	  F	N	  \	a	  i	j	  {k	  {k	  {k	  l	p	  {p	  gq	  gq	  gq	  r	w	  x	|	  x	B
  O
S
  c
h
  q
w
  x
E  q
F  [a  bA  [B  C
C  C
C  QV  x	W  x	W  x	W  r	X  r	X  r	X  `a  `a    __main__)r2   r+   r-   r   r   pathlibr   __file__resolveparentsr0   r)   r*   r4   r6   r7   r8   rJ   __name__exit rK   rI   <module>rT      sD               & & & & & & & &      X  (+g>X6XIel  nN  fNYd  V]  ^{  V{  OU  AH  Ih  Ah  |@  ry  zX  rX  iq  ^e  fC  ^C  Y]a a a Z(((((rK   