ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/Redgrave/RelativitySearchReport.py
Revision: 882
Committed: Wed May 7 17:01:15 2025 UTC (10 months, 2 weeks ago) by nino.borges
Content type: text/x-python
Original Path: Python/NinoCode/Active_prgs/Redgrave/ATT-RelativitySearchReport.py
File size: 1119 byte(s)
Log Message:
This very simple program will take a Relativity saved search information export and convert it to a more useful report that can be shared with others and contains
detail contained in the notes section of the search.  This assumes the best practice of notating what the search does in the Notes field.

File Contents

# User Rev Content
1 nino.borges 882 """
2    
3     ATT-RelativitySearchReport
4    
5     Created by:
6     Emanuel Borges
7     05.6.2025
8    
9     This very simple program will take a Relativity saved search information export and convert it to a more useful report that can be shared with others and contains
10     detail contained in the notes section of the search. This assumes the best practice of notating what the search does in the Notes field.
11    
12     """
13    
14    
15     import os, csv, pathlib
16    
17     version = "0.01"
18    
19    
20     if __name__ == '__main__':
21     rawReportFile = r"C:\Test_Dir\ATT\export_20250506_204016.csv"
22    
23     ## For Lighthouse
24     relativityInstancePath = 'https://relativity4.lighthouseglobal.com/Relativity/'
25    
26     ## For shiny
27     workspaceArtifactID = '1267840'
28    
29     with open(rawReportFile) as csvFile:
30     csvReader = csv.DictReader(csvFile,delimiter=',',quotechar='"')
31     for row in csvReader:
32     rowFolderName = os.path.split(os.path.split(row['Path'])[0])[-1]
33     print(f"{row['Artifact ID']} | {rowFolderName} | {row['Name']} | {row['Notes']} | {relativityInstancePath}go?id={workspaceArtifactID}-{row['Artifact ID']}" )
34