← back to Rentv Sheet Enrich Refine

__pycache__/export_top.cpython-314.pyc

38 lines

+
9�~je
��Z�Rt^RIt^RIt^RIt^RIt^RIt]PP]PP]	44t
Rt]!]P4^8�d]!]P^,4M^�t]!]P4^8�d]P^,M]PP!]
R]R24t]P$!]!]PP!]
RR444t]!R]R,44t]R	,]R
,utt]!]4UUu/uFwrWbK		upptRtRtR
t]!]RRR7t.R"Ot ^t!]!]RRR7;_uu_4t"]PF!]"4t$]$PK] 4]F�t&]PN!]&]4t(]!]&R4R8XdK&]!]&R4'g]!]&R4'gKF]!^,
t!]$PK]!](]PR!]&]4]!]&R4]!]&R4]!]&R4]!]&4]!]&R4]!]&R4]!]&R4]!]&R4]!]&R4]!]&4]!]&R4]!]&R4]!]&R4.4]!]8�gK�M	RRR4]*!R ]!R!]24R#uuppi +'giL&;i)#u�
Export the top-N warmest RENTV leads as a ready-to-work CSV.

Reads the local snapshot (data/snapshot.json — the same source the live console
serves) so it never burns a Sheets read, scores every unique contact with the
shared warmth.py scorer, sorts hottest-first, and writes a lean outreach sheet
with a 'Why Warm' reason column.

Usage:  python3 export_top.py [N] [outfile.csv]
        (defaults: N=200, outfile=rentv_top<N>_to_work.csv)
NiW:�	rentv_topz_to_work.csv�dataz
snapshot.jsonc#�L"�TFqR,\8XgKVx�K	R#5i)�gidN)�
UNIQUE_GID)�.0�ts& �
export_top.py�	<genexpr>r
s���
=�l���h�*�&<�1�1�l�s�$�
$�tabs�headers�rowsc��\PV4pVe:V\V48d*W,e \W,4P	4#R#)N�)�idx�get�len�str�strip)�r�name�is&& r	�cellrs=������
�A�!"��1�s�1�v�:�!�$�BR�C���I�O�O��[�XZ�[�c�F�RFp\W4pV'gKVu#	R#)�Emailr)rzUpdated Email (found)zLikely Email (inferred)�r)r�f�vs&  r	�
best_emailr!s%��
J����J���1��H�K�rc�B�\VR4;'g
\VR4#)zLinkedIn (Contact)zLinkedIn (Company)r�rs&r	�
best_linkedinr")s ����'�(�I�I�D��4H�,I�Irc�8�\P!V\4#)N)�warmth�scorerr!s&r	�<lambda>r&-s��F�L�L��C�$8rT)�key�reverse�Contact Name�
Company/Venue�Position�Phone 1�Phone 2�Marketing/VP Name�Marketing/VP Position�Website�Source Tabs�
# Appearances�wr)�newlinezStatus (color)zSection / CategoryzWrote z
 leads -> )�Rank�WarmthzWhy Warmr)r*r+z
Best Emailr,r-�Statusr.r/�LinkedInr0r1r2)+�__doc__�csv�json�os�sysr$�path�dirname�abspath�__file__�HERErr�argv�int�N�join�OUT�load�open�snap�next�tab�Hr
�	enumeraterrrr"�sorted�scored�COLS�writtenr�writerr3�writerowrr%�sc�reason�print)r�hs00r	�<module>rYsy��
���
�	�w�w���r�w�w���x�0�1��
�
��C�H�H�
��)�C�������s������]�Q�&�c�h�h�q�k�B�G�G�L�L���1�#�\�?Z�,[���y�y��b�g�g�l�l�4���A�B�C��
�
=�d�6�l�
=�=��

�i�.�#�f�+���4�!�!��%����q�t��%��\�
�J�
��8�$�	G��X����	�#�s�B���1��
�
�1�
�A��J�J�t��
��
�\�\�!�S�
!����#�$�(<�<���Q��'�'�4��?�+C�+C���1���	�
�
��R����q�#�.���N�#�T�!�_�%=�t�A�z�?R��q�M�4��9�-�t�A�y�/A���$�%�t�A�/B�'C���+�,�m�A�.>���I���Q�
� 6��Q��8P�

�	��a�<��#� �,��w�i�z�#��'�(��c&�6 ��s&�0
J�/AJ�
J�BJ�8J�J*