Xvezda / vishop

:latin_cross: The unofficial VIM script publisher command line tool
https://pypi.org/project/vishop/
MIT License
2 stars 0 forks source link

How about use addon-info.json to store metadata? #8

Open Freed-Wu opened 1 year ago

Freed-Wu commented 1 year ago

google's vimdoc is a tool to generate doc/help.txt for vim plugin. It use addon-info.json to store metadata. This is an example:

{
  "name": "maktaba",
  "description": "Consistent Vimscript",
  "version": "1.16.0",
  "author": "Google",
  "repository": {"type": "git", "url": "git://github.com/google/maktaba"}
}

How about this plugin use same file to store metadata? It should be convenient for user to don't edit two json files.

Thanks!

For compatibility, vishop can detect vishop.json firstly, if vishop.json doesn't exist, detect or create addon-info.json:

{
  "name": "maktaba",
  "description": "Consistent Vimscript",
  "type": "utility"
  "required": "7.0",
  "version": "1.16.0",
  "author": "Google",
  "repository": {"type": "git", "url": "git://github.com/google/maktaba"}
}

And if name doesn't exists, vimdoc will use the current directory of addon-info.json as name. How about vishop do the same work?

Xvezda commented 1 year ago

@Freed-Wu Hi, thank you for your interest. I actually didn't know about addon-info.json and it would be make much sense to use addon-info.jsonas fallback or default metadata file. Thank you for your suggestion!