
    ,
i	                     J    d dl Z d dlZd dlZd dlZd dlmZ d Zd Zd Zd Z	dS )    N)parsec                 P    |                      t          j        |                    S N)findjsonload)exprfs     C:\Users\Dell Inspiron 16\Desktop\tws\AgrotaPowerBi\back-agrota-powerbi\mcp-client-agrota\venv\Lib\site-packages\jsonpath_ng/bin/jsonpath.pyfind_matches_for_filer      s    99TYq\\"""    c                 ^    t          d                    d | D                                  d S )N
c                 B    g | ]}d                      |j                  S )z{0})formatvalue).0matchs     r   
<listcomp>z!print_matches.<locals>.<listcomp>   s&    DDD5U\\%+..DDDr   )printjoin)matchess    r   print_matchesr      s1    	$))DDGDDD
E
EFFFFFr   c            	      P   t          j        dt           j        d          }|                    dd           |                    ddd	d
           |                    | dd                    }t          |j                  }|j        }t          |          dk    r)t          t          |t          j                             d S |D ]]}t          j        |          D ]F}t          |          5 }t          t          ||                     d d d            n# 1 swxY w Y   G^d S )Nz@Search JSON files (or stdin) according to a JSONPath expression.a$  
        Quick JSONPath reference (see more at https://github.com/kennknowles/python-jsonpath-rw)

        atomics:
            $              - root object
            `this`         - current object

        operators:
            path1.path2    - same as xpath /
            path1|path2    - union
            path1..path2   - somewhere in between

        fields:
            fieldname       - field with name
            *               - any field
            [_start_?:_end_?] - array slice
            [*]             - any array index
    )descriptionformatter_classepilog
expressionzA JSONPath expression.)helpfilesfile*z)Files to search (if none, searches stdin))metavarnargsr      r   )argparseArgumentParserRawTextHelpFormatteradd_argument
parse_argsr   r   r    lenr   r   sysstdinglobopen)argvparserargsr	   glob_patternspatternfilenamer
   s           r   mainr6      s   $V 5	 	 	F0 +CDDD
sAlmmmT!""X&&D!!DJM
=Q+D#)<<===== % 	B 	BG Ig.. B B(^^ Bq!"7a"@"@AAAB B B B B B B B B B B B B B BB	B 	Bs   /DD Dc                  ,    t          t          j          d S r   )r6   r,   r0    r   r   entry_pointr9   C   s    #(OOOOr   )
r   r,   r.   r&   jsonpath_ngr   r   r   r6   r9   r8   r   r   <module>r;      s     



        # # #G G G)B )B )BV    r   