You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i found a way to make it work within my bash script.
move_generated_mapshot() {
local mapshot_save_path="${1}"# full path to mapshot generated contentlocal mapshot_directory_name="${2}"# desired name for "savegame"local factorio_save_file_name="${3}"# resulting filename from 'latest' save discoverylocal mapshot_json
printf"Moving generated mapshot to '%s'...\n""${mapshot_save_path}"
mkdir --parents "${mapshot_save_path}"
mv "${MAPSHOT_OUTPUT_DIRECTORY}/${factorio_save_file_name}"/*"${mapshot_save_path}"
find "${mapshot_save_path}" -mindepth 2 -maxdepth 2 -type f -name "mapshot.json"|whileread -r mapshot_json;do
jq --arg savename "${MAPSHOT_SAVE_NAME}"'.savename = $savename'"${mapshot_json}">"${mapshot_json}.tmp"&&
mv "${mapshot_json}.tmp""${mapshot_json}"done
}
move_generated_mapshot "factorio/script-output/mapshot/_autosave5""my-save-name""_autosave5"
factorio_save_file_name is the discovered latest save game. mapshot_save_path is a composition of different variables i use in my script for further processing. mapshot_directory_name is the name under which the generated mapshots are saved and displayed.
it would be helpful to override the "savename" in script-output.
i use bash to fetch the last changed save game and run mapshot cli on it.
this results in a bunch of autosaveX named mapshots.
i would love to see a parameter to override this and define a common folder for all mapshots.
The text was updated successfully, but these errors were encountered: