Skip to content

Commit

Permalink
Copy Google Assistant page + images from openhab-docs repo
Browse files Browse the repository at this point in the history
Add hot rewrite for wrong image relative path.

Related to openhab/openhab-docs#721.
Related to openhab/openhab-docs#690.

Signed-off-by: Yannick Schaus <[email protected]>
  • Loading branch information
ghys committed Jan 12, 2019
1 parent 6607cd2 commit e4f87c1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 91 deletions.
1 change: 1 addition & 0 deletions docs/ecosystem/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Those files are copied from openhab-docs by prepare-docs.rb
alexa
mycroft
google-assistant
Binary file not shown.
90 changes: 0 additions & 90 deletions docs/ecosystem/google-assistant/readme.md

This file was deleted.

7 changes: 6 additions & 1 deletion prepare-docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def process_file(indir, file, outdir, source)
line = line.gsub(" <token> ", ' &lt;token&gt; ') if file =~ /telegram/
line = line.gsub("<regular expression>", '\<regular expression\>')
line = line.gsub('src="images/', 'src="./images/') if outdir =~ /apps/
line = line.gsub('](/images/', '](./images/') if outdir =~ /google-assistant/

line = line.gsub(/\{:(style|target).*\}/, '') # Jekyll inline attributes syntax not supported

Expand Down Expand Up @@ -485,6 +486,7 @@ def process_file(indir, file, outdir, source)
# See below for the Alexa & Mycroft special cases
next if path =~ /alexa-skill/
next if path =~ /mycroft-skill/
next if path =~ /google-assistant/
addon = File.basename(path)
puts " -> #{addon}"
FileUtils.mkdir_p("addons/integrations/" + addon)
Expand All @@ -495,11 +497,14 @@ def process_file(indir, file, outdir, source)
end
}

# Handle those two separately - copy them in the "ecosystem" section
# Handle those three separately - copy them in the "ecosystem" section
FileUtils.mkdir_p("docs/ecosystem/alexa")
FileUtils.mkdir_p("docs/ecosystem/mycroft")
FileUtils.mkdir_p("docs/ecosystem/google-assistant")
process_file(".vuepress/openhab-docs/_addons_ios/alexa-skill", "readme.md", "docs/ecosystem/alexa", "https://github.com/openhab/openhab-alexa/blob/master/USAGE.md")
process_file(".vuepress/openhab-docs/_addons_ios/mycroft-skill", "readme.md", "docs/ecosystem/mycroft", "https://github.com/openhab/openhab-mycroft/blob/master/USAGE.md")
process_file(".vuepress/openhab-docs/_addons_ios/google-assistant", "readme.md", "docs/ecosystem/google-assistant", "https://github.com/openhab/openhab-google-assistant/blob/master/USAGE.md")
FileUtils.cp_r(".vuepress/openhab-docs/_addons_ios/google-assistant/images", "docs/ecosystem/google-assistant")



Expand Down

0 comments on commit e4f87c1

Please sign in to comment.