xrforge/manyfold/root/xrforge.rb

24 lines
537 B
Ruby
Raw Normal View History

2025-10-27 15:03:17 +01:00
Module xrforge
model_extensions = ['.glb', '.gltf', '.blend', '.usdz', '.obj', '.dae']
def log(message, filename, reset = false)
# Empty the log file if reset is true
if reset
File.open(filename, 'w') do |file|
timestamp = Time.now.strftime('%Y-%m-%d %H:%M')
file.write("#{timestamp}\n\n")
end
end
# Create the full log entry
# Append the log entry to the log file
File.open(filename, 'a') do |file|
file.write("#{message}\n")
end
puts("#{message}\n")
end
end