+
    ܌i3                     V    ^ RI Ht ^ RI H t  ^ RIHt ^ RIHt R
R R lltR tRR	 ltR# )    )	timedelta)datetime)Path)BASE_DIRNc                <    V ^8  d   QhR\         R\         R\         /# )   relative_pathbase_dirreturn)str)formats   "O/data/.openclaw/workspace/MediaPublishPlatform/sau_backend/utils/files_times.py__annotate__r   	   s!      S C 3     c                 R    \        \        4      V,          V ,          p\        V4      # N)r   r   r   )r	   r
   absolute_paths   && r   get_absolute_pathr   	   s     NX-=M}r   c                   V P                  RR4      p\        RV 24       \        VRRR7      ;_uu_ 4       pVP                  4       pRRR4       \        RX 24       VP	                  4       P                  R	4      p\        R
V 24       V^ ,          pV^,          P                  RR4      P                  R4      pWV3#   + '       g   i     L; i)um   
获取视频标题和 hashtag

Args:
  filename: 视频文件名

Returns:
  视频标题和 hashtag 列表
z.mp4z.txtztxt_filename: rzutf-8)encodingNz	content: 
zsplite_str: #  )replaceprintopenreadstripsplit)filenametxt_filenamefcontent
splite_strtitlehashtagss   &      r   get_title_and_hashtagsr)      s     ##FF3L	N<.
)* 
lC'	2	2a&&( 
3 
IgY
  &&t,J	L
%&qME!}$$S"-33C8H? 
3	2s   B??C	c           	     ,   V^ 8:  d   \        R4      hVf   . ROpV\        V4      8  d   \        R4      h. p\        P                  ! 4       p\	        V 4       F  pWq,          V,           ^,           pWq,          p	W),          p
\        WVP                  ,
          VP                  ) VP                  ) VP                  ) R7      pWk,           pVP                  V4       K  	  V'       d)   V Uu. uF  p\        VP                  4       4      NK  	  ppV# u upi )a  
Generate a schedule for video uploads, starting from the next day.

Args:
- total_videos: Total number of videos to be uploaded.
- videos_per_day: Number of videos to be uploaded each day.
- daily_times: Optional list of specific times of the day to publish the videos.
- timestamps: Boolean to decide whether to return timestamps or datetime objects.
- start_days: Start from after start_days.

Returns:
- A list of scheduling times for the videos, either as timestamps or datetime objects.
z+videos_per_day should be a positive integerz:videos_per_day should not exceed the length of daily_times)dayshoursminutessecondsmicroseconds)               )
ValueErrorlenr   nowranger   hourminutesecondmicrosecondappendint	timestamp)total_videosvideos_per_daydaily_times
timestamps
start_daysschedulecurrent_timevideodaydaily_video_indexr9   time_offsetr?   times   &&&&&         r   generate_schedule_time_next_dayrL   1   s    FGG)K((UVV H<<>L|$%
2Q6!2 -S|7H7H0HS_SfSfRf)5)<)<(<LLdLdKdf .		" % 6>?hdC()h?O @s   +"Dr   )   NFr   )	r   r   pathlibr   confr   r   r)   rL    r   r   <module>rQ      s!       D*r   