BCML icon indicating copy to clipboard operation
BCML copied to clipboard

Feature Request: Command line features for BCML

Open jordanbtucker opened this issue 3 years ago • 8 comments

I like to use scripts in my workflow when creating mods. For example, I use sarc to pack and unpack files, and aamp to convert between YAML and parameter archive files. These are both command line utilities that I can easily include in a script to automate tasks and batch process files.

It would be really nice to be able to use bcml to automatically create BNP files from the command line rather than have to open the app and use the GUI. This is made especially cumbersome by the fact that BCML doesn't remember the last used values, so I have to type them in each time, leaving room for human error.

Something like these examples would be great:

# create a BNP from the command line
bcml create-bnp --root ./chocobo-mastercycle --name 'Chocobo Master Cycle' \
  --image https://example.com/cbms/ss.png --url https://example.com/cbms \
  --version 1.0.0 --description 'Replaces the Master Cycle Zero with a chocobo' \
  --out ./chocobo-mastercycle-v1_0_0.bnp
# using short parameter names
bcml create-bnp -r ./chocobo-mastercycle -n 'Chocobo Master Cycle' \
  -i https://example.com/cbms/ss.png -u https://example.com/cbms \
  -v 1.0.0 -d 'Replaces the Master Cycle Zero with a chocobo' \
  -o ./chocobo-mastercycle-v1_0_0.bnp
# convert a BNP to a standalone mod archive
bcml standalone --in ./chocobo-mastercycle-v1_0_0.bnp --out ./chocobo-mastercycle-v1_0_0.zip

jordanbtucker avatar Jun 01 '21 02:06 jordanbtucker

BCML 1.x had a CLI and it was removed because no one ever used it. It would be possible, without much difficulty, to script this in Python, however.

NiceneNerd avatar Jun 10 '21 18:06 NiceneNerd

Well, I may be the minority, but I would be willing to write a tutorial on using the CLI to increase awareness and buy-in.

jordanbtucker avatar Jun 10 '21 19:06 jordanbtucker

@jordanbtucker https://github.com/linktlh/bnptool might be of interest to you. It's a simple CLI interface for bcml for creating bnps.

linktlh avatar Sep 01 '21 12:09 linktlh

@linktlh It's so beautiful! Did you build it based on this feature request, or did you come up with it independently? It's exactly what I wanted.

jordanbtucker avatar Sep 01 '21 16:09 jordanbtucker

A little bit of both. I had seen your request a while ago, forgot about it, made bnptool for my own personal use as well as a friend talked about it, then found your issue again later.

linktlh avatar Sep 01 '21 17:09 linktlh

@NiceneNerd, feel free to close this issue if you don't think you're going to implement this feature in BCML. bnptool works great for me.

jordanbtucker avatar Sep 01 '21 20:09 jordanbtucker

Oh, wow, that's a cool solution. I might reconsider CLI when I decide how/when/if to proceed with the BCML 4 rewrite, so I'll leave this on hold in the meantime.

NiceneNerd avatar Sep 01 '21 21:09 NiceneNerd

This would be really nice. I have save directory that is a git repo, so I can just change branches to go between vanilla, ROTP, and Second Wind. Would be great to be able to make a script that 1) change the save branch, 2) changes the enabled mods, 3) launches the game through bcml.

cbartondock avatar Aug 29 '22 13:08 cbartondock

Closing this out, as "BCML 4" is an entirely different program, and CLI will not be added to BCML

GingerAvalanche avatar Dec 30 '22 09:12 GingerAvalanche

@GingerAvalanche can you elaborate on how BCML 4 is completely different? Is there a road map or other docs?

jordanbtucker avatar Dec 30 '22 16:12 jordanbtucker

The plan to do BCML 4 was scrapped in favor of a completely new replacement that basically redoes absolutely everything from the ground up. Repo is here, with more info and docs incoming as the beta release approaches: https://github.com/NiceneNerd/ukmm

NiceneNerd avatar Dec 30 '22 16:12 NiceneNerd