def run(self):
settings = SharedFunctions.get_package_settings()
if settings:
path = settings.get("docs_path", None)
if path and os.path.isdir(path):
scraped_api = scrape_api(path)
if scraped_api:
SharedFunctions.write_resource_file("The Subliming of Isaac.json", scraped_api)
completions = generate_completions(scraped_api,
settings.get("completions_scope", "source.lua"))
if completions:
SharedFunctions.write_resource_file("The Subliming of Isaac.sublime-completions",
completions)
sublime.status_message("Finished scraping Afterbirth+ API...")
else:
if not path:
SharedFunctions.error_message("'docs_path' setting is undefined.")
else:
SharedFunctions.error_message(
"The value of the 'docs_path' setting is not a path to an existing directory.")
评论列表
文章目录