Extract title name from metadata
albfan opened this issue · comments
I'm following
https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.HLE/Loaders/Npdm/Npdm.cs#L57
to extract name, but not sure what command to use after I extract nca from nsp file
nstool main.npdm
Any idea?
My mistake, this seems to be a corner case, control.nacp has all the info about title name.
Is there anything better than this:
LANG=Spanish
nstool control.nacp 2>/dev/null | grep $LANG -A1 | grep Name | head -n 1 | awk '{$1=""; gsub(/^[ \t]+/, "", $0); gsub(/[ \t]+$/, "", $0); print $0}'
Can we expand to query like
LANG=Spanish
nstool --type nacp control.nacp --query ".Title.$LANG"
or add yaml or json output to parse with yq
or jq
Currently there is no query function or alternative formatting as JSON or YAML.
It is my intention to add alternative formatting as JSON for file types such as NACP. But I'm busy with other projects currently. So I'm not sure when that feature will be available.
@jakcron Sure. Feel free to reopen this and ping if you consider to add that.
Indeed there're several tricks to get that and to avoid complete extract of files of Gb, so I implement that directly reusing existing code on Ryujinx/Ryujinx#2131 as this is for a Ryujinx feature