Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(manage-tag): import and export subcommands #181

Open
kyranet opened this issue Jan 13, 2024 · 1 comment
Open

feat(manage-tag): import and export subcommands #181

kyranet opened this issue Jan 13, 2024 · 1 comment
Labels

Comments

@kyranet
Copy link
Member

kyranet commented Jan 13, 2024

#17 in #suggestions.

The export format should match that of the accepted import format. Simply dumps all tags into a generated TOML file. Which format (BTF, JSON, YAML, TOML...) is still not decided yet. cc: @favna

The import subcommand however, is more complex:

  • It needs to validate the data schema beforehand:
    • Make sure all required fields exist and default those that don't exist (e.g. a future update that adds more fields in Teryl).
    • Make sure there are no duplicates between names and aliases in the imported file.
  • It needs to handle conflicts, and as such, it needs modes:
    • Overwrite tags with the same name and updates aliases that point to other tags (mode: Overwrite).
    • Overwrite tags with the same name, updates aliases that point to other tags, and deletes old aliases (mode: Replace).
    • Overwrite tags with the same name, doesn't import aliases (mode: Update).
    • Throw an error on conflict (mode: ?).
  • It needs to handle the tag and alias limits and their donator limits:
    • 50 tags by default, 100 tags starting at T3, 200 tags starting at T10, they're available in Ring's internal API.
    • Tags have a maximum of 10 aliases no matter the tier.
@favna
Copy link
Member

favna commented Jan 13, 2024

I have never heard of BTF and JSON isn't very simple user friendly editable so I'd say either YAML or TOML. Of those TOML is the only one that isn't indent specific and we should assume that simple users don't know to mind their indenting so TOML it is.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants