Add FORCE=1 flag to override series names in Styling Studio auto-import

I ran a bad version of this job yesterday, and set a lot of the new
styles to an incorrect "Prismatic" series name. This will help me fix
them!

There's still styles to manually fix, where TNT decided not to put the
full series name in the item name. (Presumably some of the names were
too long? Or maybe they just forgot?) But this is a better starting
point!
This commit is contained in:
Emi Matchu 2024-12-29 15:39:52 -08:00
parent 2f090f3924
commit 8502b780c2

View file

@ -61,11 +61,17 @@ namespace "neopets:import" do
record.series_name = new_series_name
puts "✅ [#{label}]: Series name is now #{new_series_name.inspect}"
elsif record.series_name != new_series_name
puts "⚠️ [#{label}: Series name may have changed, handle manually? " +
"#{record.series_name.inspect} -> #{new_series_name.inspect}"
if ENV['FORCE'] == '1'
puts "❗ [#{label}]: Series name forcibly changed: " +
"#{record.series_name.inspect} -> #{new_series_name.inspect}"
record.series_name = new_series_name
else
puts "⚠️ [#{label}]: Series name may have changed, handle manually? " +
"#{record.series_name.inspect} -> #{new_series_name.inspect}"
end
end
else
puts "⚠️ [#{label}: Unable to detect series name, handle manually? " +
puts "⚠️ [#{label}]: Unable to detect series name, handle manually? " +
"#{record.full_name.inspect} -> #{style[:name].inspect}"
end