-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use Doxygen tagfile for apiref shortcode #5387
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
base: next
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
| curl -s -S https://api-docs.esphome.io/tags.xml | script/format_api_tags.py > data/apirefs/current.json | ||
| curl -s -S https://api-docs-beta.esphome.io/tags.xml | script/format_api_tags.py > data/apirefs/beta.json | ||
| curl -s -S https://api-docs-dev.esphome.io/tags.xml | script/format_api_tags.py > data/apirefs/next.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This won't work until esphome/esphome#10794 lands and is deployed everywhere, so for now I have been applying that locally, running doxygen, and changing this to something like:
| curl -s -S https://api-docs.esphome.io/tags.xml | script/format_api_tags.py > data/apirefs/current.json | |
| curl -s -S https://api-docs-beta.esphome.io/tags.xml | script/format_api_tags.py > data/apirefs/beta.json | |
| curl -s -S https://api-docs-dev.esphome.io/tags.xml | script/format_api_tags.py > data/apirefs/next.json | |
| cat /path/to/esphome/esphome/api-docs/tags.xml | script/format_api_tags.py > data/apirefs/current.json | |
| cp data/apirefs/current.json data/apirefs/beta.json | |
| cp data/apirefs/current.json data/apirefs/next.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.
Base branch has been corrected - dismissing previous review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a feature matched with a PR in https://github.com/esphome/esphome, please target your PR to the next branch and rebase.
Base branch has been corrected - dismissing previous review.
|
It seems like any mention of |
Description:
The current
apirefshortcode is based on string manipulation, essentially:/(file name without path)_with__.with_8:with_1_<lowercase>This works for most filenames, but if some files have the same name in different directories, that is included as well (see thread).
Since there isn't a way to generate these URLs consistently, this function uses the tagfile generated by
GENERATE_TAGFILE(esphome/esphome#10794), converts that into an easily consumable map offile/struct/etc. name->Doxygen URLThis also includes mappings for the above values excluding
esphome::,esphome/,esphome/core/andesphome/components/so the shorter names can be used (e.g.sensor::Sensorinstead ofesphome::sensor::Sensor, orselect/select.hinstead ofcomponents/select/select.horesphome/components/select/select.h).Related issue (if applicable): fixes #5215
Pull request in esphome with YAML changes (if applicable):
Checklist:
I am merging into
nextbecause this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
currentbecause this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.Link added in
/components/index.rstwhen creating new documents for new components or cookbook.