-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] option to override "savename" #60
Comments
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 content
local mapshot_directory_name="${2}" # desired name for "savegame"
local factorio_save_file_name="${3}" # resulting filename from 'latest' save discovery
local 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" |
while read -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"
|
Hah, I was going to mention how the existing path is built and modifiable with So the request is to allow to customize the savename within mapshot.json, which allows in turn for the UI to group them together as desired (as UI groups mapshot entries based on the savename in That sounds quite doable indeed; probably need something like:
There are 2 options to consider:
I think I have a preference for 1. even if it requires a change to the UI, as I find the name [I have no plan to work on that for now. I might do it as it is not much, but it is still unlikely] |
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: