#!/usr/bin/env python ''' Extract plugin list from 'Gig Performer.settings': ================================================== Copy your 'Gig Performer.settings' file to the same location as GP2csv.py and run. 'GigPerformerPlugins.csv' will be written as CSV file /w comma-separator Import CSV to excel /w comma separator and text for column C (version). or just use the generated 'GigPerformerPlugins.xlsx' :-) Needs pandas and xlwt+openpyxl packages... BBB, 2021-NOV-21 ''' import pandas as pd import xml.etree.ElementTree as et import openpyxl xtree = et.parse("Gig Performer.settings") xroot = xtree.getroot() ''' Pick infos from the PLUGIN attribs: name="4U+ DynamicTiltEQ" format="AudioUnit" category="Effect" manufacturer="HOFA" version="1.0.7" file="AudioUnit:Effects/aufx,hff6,HOFA" uid="08154711" isInstrument="0" fileTime="0" infoUpdateTime="179dd49ca03" numInputs="4" numOutputs="2" isShell="0" isEnabled="1" useDelayedLoading="0"/> ''' df_cols = ["name", "version", "isEnabled", "format", "file"] rows = [] for node in xroot.iter('PLUGIN'): s_name = node.attrib.get("name") s_version = node.attrib.get ("version") s_isEnabled = node.attrib.get ("isEnabled") s_format = node.attrib.get ("format") s_file = node.attrib.get ("file") rows.append({"name": s_name, "version": s_version, "isEnabled": s_isEnabled, "format": s_format, "file": s_file}) out_df = pd.DataFrame(rows, columns=df_cols) # Writing dataframe to csv out_df.to_csv('GigPerformerPlugins.csv') out_df.to_excel('GigPerformerPlugins.xlsx', sheet_name='Plugins')