Initialize VLC getters and metrics, fix some bugs in infra logic, needs to be refactored later on
This commit is contained in:
22
desktop_env/evaluators/metrics/gimp.py
Normal file
22
desktop_env/evaluators/metrics/gimp.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import os
|
||||
|
||||
|
||||
def get_gimp_export_path():
|
||||
# Path to GIMP's configuration file. This example assumes GIMP version 2.10.
|
||||
# You need to adjust the path according to the GIMP version and user's file system.
|
||||
gimp_config_file = os.path.expanduser("~/.config/GIMP/2.10/gimprc")
|
||||
|
||||
try:
|
||||
# Open and read the configuration file
|
||||
with open(gimp_config_file, 'r') as file:
|
||||
for line in file:
|
||||
# Search for the default export path setting
|
||||
if "default-export-path" in line:
|
||||
# Extract the current path from the line (assuming it's enclosed in quotes)
|
||||
current_path = line.split('"')[1]
|
||||
# Compare the current path with the expected path
|
||||
return current_path
|
||||
except FileNotFoundError:
|
||||
# Handle the case where the configuration file is not found
|
||||
print("GIMP configuration file not found")
|
||||
return False
|
||||
Reference in New Issue
Block a user