Skip to content
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

Create a usable CLI #1

Open
Summertime opened this issue Jul 25, 2024 · 0 comments
Open

Create a usable CLI #1

Summertime opened this issue Jul 25, 2024 · 0 comments

Comments

@Summertime
Copy link
Member

Summertime commented Jul 25, 2024

Preferably done as argparse with click being a massive maybe. Not needing anything else except the file magma itself would be great.

Conversions

magma chat decode - < chat > chat.json
magma chat encode - < chat.json > chat

magma data decode - < data > data.json
magma data encode - < data.json > data

magma explo decode - < explo > explo.json
magma explo encode - < explo.json > explo

magma npcChat decode - < npcChat > npcChat.json
magma npcChat encode - < npcChat.json > npcChat

magma world decode - < world > world.json
magma world encode - < world.json > world

Make TL file

magma chat|data|explo|npcChat|world collect \
  --empty=<lang> [(<lang> <jsonfile>) ...] \
  > collected.json

Apply TL file

magma chat|data|explo|npcChat|world patch \
  --from=<lang> --to=<lang> \
  old.json - \
  < collected.json \
  > new.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant