← back to Rentv Sheet Enrich

__pycache__/write_by_contact.cpython-314.pyc

47 lines

+
��j4���Rt^RIt^RIt^RIt^RIt^RIt]PP^]PP]	44^RI
t
]!]P^,4t
]P!]!]P^,44t]P"P%4P'4tRt]
P,!4t]
P0!]4R,Uu/uF"pVR,R,VR,R,bK$	up]
,t]
P4!]]4t]!R]!]!^]!]4444^4t ]] ,t!Rt"]"!R	4t#]"!R
4t$]"!R4t%]"!R4t&]"!R
4t'](!R])!]!44^R7t*]*^,t+.t,]%f#]+t%],P[R] R]+RR/4]+^,
t+]&f#]+t&],P[R] R]+RR/4]+^,
t+]'f#]+t'],P[R] R]+RR
/4]+^,
t+],'d]
P\!]]
],4Rt//t0]!] ^,]!]44Fbt1]!]/!]1]$44]!]/!]1]#443t2]2^,'g]2^,'gKA]0Pg]2.4P[]14Kd	Rt4.t5^t6.t7.t8]EF�t9]!]9PuRR44]!]9PuRR443t;]0Pu];4t<]<'g~]0P{4UUUUu.uF\wwrpV'gKV];^,8XgK"];^,'gK3];^,V9gV];^,9gKQVFpVNK	K^	uppppt<]<'gC]7P[]9PuRR4R,]9PuRR4,4EK]6^,
t6]4!]94t>]>'go]9PuR4;'gRP4'd@]8P[]9PuRR4R,]9PuRR4,4]<F�t@]>'d*]9PuR4;'gRP4MRtA]9PuR4;'gRP4tB]A'df]/!]@]%4'gW]5P[R]@R]%RR]AP�RR4,RR/4]/!]@]'4'g]5P[R]@R]'R]/4]B'gK�]/!]@]&4'dK�]5P[R]@R]&R]B/4EK	EK�	]
P\!]]
]54tD]E!]P�!R]
R ]6R!]!]74R"]!]84R#]DPuR$^4/44R#uupiuuppppi)%u�
write_by_contact.py <gid> <results.json>

PER-CONTACT writer — row-shift immune, matched on (company + contact-name) so each
person's data lands on THEIR row (not smeared across every contact at the company like
the company-only write_by_name.py). Each result item = {company, name, contact_li?, email?}.
Only fills empty cells; contact_li becomes =HYPERLINK; email -> "Updated Email (found)".
Reports matched / unmatched / cells.
Nc�b�\P!RRT;'gRP44#)z	[^a-z0-9]�)�re�sub�lower)�ss&�write_by_contact.py�normr	s!��B�F�F�<��a�g�g�2�_�_�->�?�
?��sheets�
properties�sheetId�titlec#�"�TF=p\\V,4F wr#VP4R8XgKVx�K"	K?	R#5i)�Contact NameN)�	enumerate�rows�strip)�.0�i�j�vs&   r�	<genexpr>rs?���J�.�� ��a��)�t�q�Q�W�W�Y�.�-H�
�1�)�
�.�s
�2A�Ac�\a�\V3Rl\\\444R4#)c3�<"�TF>q\\48d\V,MRP4S8XgK:Vx�K@	R#5i)rN)�len�hdrr)rr�labels& �rr�hidx.<locals>.<genexpr>s3����n��A�3�s�8�|�S��V�Y[�<b�<b�<d�hm�<m�a�a��s
�7A	�
A	N)�next�rangerr)rsfr�hidxr!s����n��s�3�x��n�pt�u�ur
rz
Company/VenuezLinkedIn (Contact)zUpdated Email (found)uLinkedIn (Contact) — foundc#�Z"�TF!wrVP4'gKVx�K#	R#5i)N)r)rrrs&  rrr"s���;�~�t�q�������~�s�+�
+)�default�row0�col0�valuec���VeRV\\48d>V\\V,48d#\V,V,P4#RP4#)Nr)rrr)�rrs&&r�cellr)(sG��a�m��C��I�
�!�c�RV�WX�RY�l�JZ��Q���
�i�i�k�k�`b�i�i�k�kr
c��VPR4;'gRP4P4pVR8XdR#R#)�slug_sourcer�inferredFT)�getrr)�it�srcs& r�_li_okr08s8��
�6�6�-� �&�&�B�
-�
-�
/�
5�
5�
7�C�
�j���r
�companyr�namez @ �
contact_li�emailz=HYPERLINK("%s")�"�formulaT�gid�matched�	unmatched�rejected_inferred�
cells_written�totalUpdatedCells)G�__doc__�sys�os�jsonr�datetime�path�insert�dirname�__file__�lib�int�argv�GID�load�open�results�date�today�	isoformat�TODAYr	�access_token�tok�get_metar�read_tabrrr �minr�hrrr!�NAME�CO�LIC�EM�FND�maxr�	rightmost�nxt�newh�append�
batch_fillr)�idxr(�k�
setdefaultr0�cellsr8r9r:r.r-�key�targets�items�
li_allowedr�r0�li�em�replace�res�print�dumps)r�co�nm�rsr(s00000r�<module>rts3���#�"�"�������2�7�7�?�?�8�,�-�
�	�#�(�(�1�+���$�)�)�D����!��,=�">���
�
����'�'�)��?�	������,�,�s�#�H�-�	/�-�Q�
�<���	#�Q�|�_�W�%=�	=�-�	/�/2�	4��
�|�|�C����	�J�e�C��3�t�9�-�.�J�KL�N��
�2�h��u��N���$��"7�R�
�� ��t�,C�'D�"��)�*��
�;�y��~�;�Q�G�	�y�[\�}��	���;�c��4�;�;���F�C��J^�'_�`�be�ij�bj�be��;�c��4�;�;���F�C��Ja�'b�c�eh�lm�em�eh��;�c��4�;�;���F�C��Jh�'i�j�lo�st�lt�lo������S�$�	'�k�	��	�r�A�v�s�4�y�	!�A�	
�d�1�b�k�	�D��a���/�0�A���t�t�q��t�t����q�"��$�$�Q�'�
"��	��a�G�R��R�):�
�B�����y�"�%�&��R�V�V�F�B�-?�(@�
A�C��g�g�c�l�G��),����e����"�2����3�q�6�\��.1�!�f�f��:=�a�&�B�,�"�PS�TU�PV�,��ac�\]��ac���e�����������+�e�3�b�f�f�Y��6K�K�L�h��q�L�G����J��2�6�6�,�/�5�5�2�<�<�>�>�� � ������!3�e�!;�b�f�f�Y�PR�>S�!S�T���5?�b�f�f�\�"�(�(�b�
/�
/�
1�R���f�f�W�o�#�#��
*�
*�
,��
�d�2�s�m�m��L�L�&�"�f�c�7�<N�QS�Q[�Q[�\_�ac�Qd�<d�fo�qu�v�w���C�=�=����f�b�&�#�w��F�G�
�2�d�2�r�l�l��L�L�&�"�f�b�'�2�>�?���*
�n�n�S�#�u�%���d�j�j�%��i��+�s�9�~�%�s�+<�'=�!�3�7�7�+>��#B�D�E�F��E	/��`es$�)(V<�%W�9W�	W�W�8W