
    C1i                        % S r SSKJr  SSKrSSKrS<S jrSSSSSSSSS	S
SS.r\\\S-  4   \	S'   SSSSSSSS.r
\\\4   \	S'   0 SS_S
S_SS_SS_SS_SS_S S!_S"S#_S$S%_S&S'_SS(_S)S*_S+S,_S-S._S	S/_SS0_S1S2_S3S40Er\\\4   \	S5'   \ " S6 S75      5       rS\\\4   4S8 jrS9\\\4   SS4S: jr\S;:X  a  \" 5         gg)=zGenerate the AUTHORS.rst file from git commit history.

This module reads git commit logs and produces a formatted list of contributors
grouped by their contribution count, mapping email aliases and GitHub usernames.
    )	dataclassNreturnc                  .    [        5       n [        U 5        g)z,Generate and print the AUTHORS.rst content. N)get_git_contributorsprint_contributors)contributorss    ^/home/james-whalen/.local/lib/python3.13/site-packages/av-16.1.0.dist-info/licenses/AUTHORS.pymainr
      s     ()L|$    zgithub@mikeboers.comzdavoudialireza@gmail.comztcaswell@gmail.comxxr@megvii.comdaniel.b.allan@gmail.comzchaudominic2@gmail.com)zgit@mikeboers.comzmboers@keypics.comzmikeb@loftysky.comzmikeb@markmedia.cozwesternx@mikeboers.comzmark@mark-VirtualBox.(none)za.davoudi@aut.ac.irztcaswell@bnl.govzxxr3376@gmail.comzdallan@pha.jhu.eduz-61652821+laggykiller@users.noreply.github.comEMAIL_ALIASESzCasper van der Welz	Dan AllanzManuel Goacolouz	Mark ReidzMoritz KassnerzVidar Tonaas Fauskez	Xinran Xu)zcaspervdw@gmail.comr   zmgoacolou@cls.frmindmark@gmail.commoritzkassner@gmail.comvidartf@gmail.comr   CANONICAL_NAMESzbilly.shambrook@gmail.combillyshambrookdanielballanadavoudi	mikeboerszjeremy.laine@m4x.orgjlainezkalle.litterfeldt@gmail.comlitterfeldtr   markreidvfxr   mkassnerzrush@logic.czzradek-senfeldzself@brendanlong.combrendanlong	tacaswellzulrik.mikaelsson@magine.comrawlerr   vidartfzwillpatera@gmail.com
willpateraxxr3376laggykillerzwyattblue@auto-editor.com	WyattBluezCurtis@GreenKey.netdotysanGITHUB_USERNAMESc                       \ rS rSr% Sr\\S'   \\   \S'   Sr\S-  \S'   Sr	\
\S'   \S	\4S
 j5       rS\S	\4S jrSrg)ContributorE   zGRepresents a contributor with their email, names, and GitHub username. emailnamesNgithubr   commit_countr   c                 J    SR                  [        U R                  5      5      $ )zwReturn the formatted display name for the contributor.

Returns:
    Comma-separated sorted list of contributor names.
z, )joinsortedr)   )selfs    r	   display_nameContributor.display_nameN   s     yy

+,,r   bulletc           
          U R                   (       a9  U SU R                   SU R                   SU R                    SU R                    S3
$ U SU R                   SU R                   S3$ )zFormat the contributor line for RST output.

Args:
    bullet: The bullet character to use (- or *).

Returns:
    Formatted RST line with contributor info.
 z <z>; `@z <https://github.com/z>`_>)r*   r0   r(   )r/   r2   s     r	   format_lineContributor.format_lineX   ss     ;;(!D--.b =[[M!6t{{m3H 4,,-R

|1==r    )__name__
__module____qualname____firstlineno____doc__str__annotations__setr*   r+   intpropertyr0   r6   __static_attributes__r8   r   r	   r&   r&   E   sW    RJs8OFC$JL#-c - -># ># >r   r&   c                     0 n [         R                  " / SQSS9R                  5       nU H  nUR                  5       R	                  SS5      u  p4[
        R                  XD5      nU(       d  MC  XP;  a(  [        U[        5       [        R                  U5      S9X'   X   nUR                  R                  U5        U=R                  S-  sl        M     [        R                  5        H  u  pGX@;   d  M  U1X   l
        M     U $ )zParse git log and return contributors grouped by canonical email.

Returns:
    Dictionary mapping canonical emails to Contributor objects.
)gitlogz--format=%aN,%aET)text,   )r(   r)   r*   )
subprocesscheck_output
splitlinesstriprsplitr   getr&   r@   r$   r)   addr+   r   items)r   git_loglinenamer(   canonical_emailcontributorcanonical_names           r	   r   r   j   s     ,.L%%* jl 
 jjl))#q1'++E9.,7%e'++O<-L) #3d#  A% ! $ "1!6!6!8 )7(8L% "9 r   r   c                 V   [        SR                  SS5      5        [        U R                  5       S S9nSnSnU Hk  n[	        [
        R                  " UR                  5      5      nU(       a  X%:w  a  US-  n[        5         UnS	US
-     n[        UR                  U5      5        Mm     g)zzPrint contributors grouped by logarithmic order of commits.

Args:
    contributors: Dictionary of contributors to print.
zd        Contributors
        ============

        All contributors (by number of commits):
        z         c                 4    U R                   * U R                  4$ )N)r+   r(   )cs    r	   <lambda>$print_contributors.<locals>.<lambda>   s    0r   )keyNr   rI   z-*   )	printreplacer.   valuesrA   mathrF   r+   r6   )r   sorted_contributors
last_orderblock_indexrV   orderr2   s          r	   r   r      s     
 
 GJ#% !0
 "JK*DHH[5567*-1KG
 kAo&k%%f-. +r   __main__)r   N)r=   dataclassesr   rc   rJ   r
   r   dictr>   r?   r   r$   r&   r   r   r9   r8   r   r	   <module>rk      s   "  % 00004#'5,)45M(tCtO$ $ 0 +)%/.!#c3h $!1$$ 
$ K	$
 H$ "=$ -$ z$ _$ M$ +$ "8$ $ L$ i$  m!$"  #$$ 9%$ $sCx. , !> !> !>H#d3#34 #L"/T#{*:%; "/ "/J zF r   