-
Notifications
You must be signed in to change notification settings - Fork 7
Doc generation #4
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,12 @@ def process_data(node, mapping, platform) | |
|
||
def process_typedef(node, mapping, platform) | ||
process_return_type(node, mapping, platform) | ||
@data[platform]['argsstring'] = node.at_css('argsstring').content.to_s | ||
argsstring = node.at_css('argsstring') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there issues with this path as is? I haven't run into errors in this path in my local testing, but it's entirely possible I missed something. |
||
if argsstring == nil then | ||
@data[platform]['argsstring'] = "" | ||
else | ||
@data[platform]['argsstring'] = argsstring.content.to_s | ||
end | ||
process_parameter_list(node, mapping, platform) | ||
end | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,8 @@ def cleanup | |
def download_and_extract(zip, folder) | ||
open(zip) do | zf | | ||
Zip::File.open(zf.path) do | zipfile | | ||
print("extracted from ", zf.path) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: remove debug print |
||
print("\n") | ||
zipfile.each do | entry | | ||
path = File.join(folder, entry.name).sub('/doxygen_sdk/', '/') | ||
FileUtils.mkdir_p(File.dirname(path)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ def initialize(site, source) | |
@path = '/docs/pebblekit-android/' | ||
open(source) do | zf | | ||
Zip::File.open(zf.path) do | zipfile | | ||
entry = zipfile.glob('javadoc/overview-summary.html').first | ||
entry = zipfile.glob('javadoc/index.html').first | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks doc generation for Android in my local testing. What was the motivation for this change? |
||
summary = Nokogiri::HTML(entry.get_input_stream.read) | ||
process_summary(zipfile, summary) | ||
|
||
|
@@ -47,7 +47,8 @@ def language | |
|
||
def process_summary(zipfile, summary) | ||
summary.css('tbody tr').each do | row | | ||
name = row.at_css('td.colFirst').content | ||
print(row) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: remove debug print |
||
name = row.at_css('th.colFirst').content | ||
package = { | ||
name: name, | ||
url: "#{@path}#{name_to_url(name)}/", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ def generate_docs | |
# The order of these functions will determine the order of preference | ||
# when looking up symbols e.g. double backticks | ||
# DO NOT CHANGE THE ORDER UNLESS YOU KNOW WHAT YOU ARE DOING | ||
generate_docs_c | ||
# generate_docs_c | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason this has been disabled? We definitely want this one enabled - don't want to be using the preview docs. |
||
generate_docs_c_preview unless @site.data['docs']['c_preview'].nil? | ||
generate_docs_rocky_js | ||
generate_docs_pebblekit_js | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,48 @@ | ||
{% comment %} | ||
Copyright 2025 Google LLC | ||
Copyright 2025 Google LLC | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you avoid reformatting the header blocks if possible? Just to keep diffs clean. |
||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
{% endcomment %} | ||
|
||
<ul> | ||
{% for group in include.tree %} | ||
{% for group in include.tree %} | ||
{% if page.docs_language == 'pebblekit_ios' %} | ||
{% assign open = true %} | ||
{% assign open = true %} | ||
{% elsif include.group.path contains group.name %} | ||
{% assign open = true %} | ||
{% assign open = true %} | ||
{% else %} | ||
{% assign open = false %} | ||
{% assign open = false %} | ||
{% endif %} | ||
{% if group.children.size > 0 %} | ||
<li class="section-menu__item{% if open == true %} open{% if include.group.path.last == group.name %} active{% endif %}{% endif %}"> | ||
<li | ||
class="section-menu__item{% if open == true %} open{% if include.group.path.last == group.name %} active{% endif %}{% endif %}"> | ||
<a href="{{ group.url }}">{{ group.name }}</a> | ||
{% if group.children.size > 0 %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not convinced this is a necessary change - the only place I'm seeing it have an effect is in the Rocky docs, where it adds the timeout/interval functions to the sidebar. Those pages are very small though, and they're already documented on the Rocky docs index page, so I don't think that adds much value. |
||
<ul> | ||
{% for item in group.children %} | ||
<li class="section-menu__subitem{% if include.group.path contains item.name %} open{% if include.group.path.last == item.name %} active{% endif %}{% endif %}"> | ||
{% for item in group.children %} | ||
<li | ||
class="section-menu__subitem{% if include.group.path contains item.name %} open{% if include.group.path.last == item.name %} active{% endif %}{% endif %}"> | ||
<a href="{{ item.url }}"><span>{{ item.name }}</span></a> | ||
{% if item.children.size > 0 %} | ||
<ul> | ||
{% for child in item.children %} | ||
{% capture full_url %}{{ child.url }}index.html{% endcapture %} | ||
<li class="section-menu__subsubitem{% if page.url == full_url %} active{% endif %}"><a href="{{ child.url }}"><span>{{ child.name }}</span></a></li> | ||
<li class="section-menu__subsubitem{% if page.url == full_url %} active{% endif %}"><a | ||
href="{{ child.url }}"><span>{{ child.name }}</span></a></li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
{% endfor %} | ||
</ul> | ||
</li> | ||
{% endif %} | ||
|
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.
What uses this environment variable?
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.
tbh I don't remember 😅 I don't think it's used currently.