psyinfra / onyo

text-based inventory system on top of git
ISC License
3 stars 5 forks source link

Changing `onyo.assets.name-format` while having assets does not rename assets #595

Open nhjjr opened 6 months ago

nhjjr commented 6 months ago

When changing the keys that the asset filename is constructed of, the change is not applied to all assets. Furthermore, it now becomes impossible to edit assets using the old filename scheme.

For example, the .owned suffix was changed to .basegame (i.e., the onyo.asset.filename changed from {shortname} ({year}).{status} to {shortname} ({year}).{type}) resulting in:

❱ onyo edit "7-wonders (2010).owned" 
ERROR: No such asset: /home/niels/onyo/boardgames/7-wonders (2010).basegame
Cancel command (y) or continue editing asset (n)? n

It is furthermore not possible to set the filename by changing the type key:

❱ onyo set -k type=base -p "7-wonder (2010).owned" --rename                                                                                                                                                    1 !
ERROR: The following paths aren't assets:
/home/niels/onyo/boardgames/7-wonder (2010).owned
TobiasKadelka commented 6 months ago
aqw commented 1 month ago

onyo.assets.filename -> onyo.assets.name-format (#632 #572)