forked from openhab/openhab-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-docs.rb
37 lines (29 loc) · 1.07 KB
/
prepare-docs.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This will clone https://github.com/openhab/openhab-docs
# and migrate content into the website with some changes
require "fileutils"
require "net/http"
require "uri"
require "rexml/document"
# require "nokogiri"
$docs_repo = "https://github.com/openhab/openhab-docs"
$docs_repo_root = $docs_repo + "/blob/main"
$docs_repo_branch = "final"
$esh_repo = "https://github.com/eclipse/smarthome"
$esh_repo_root = $esh_repo + "/blob/master/docs/documentation"
$version = nil
require_relative "./.vuepress/process_file.rb"
require_relative "./.vuepress/process_main_docs.rb"
require_relative "./.vuepress/add_placeholders.rb"
if (Dir.exists?("docs")) then
puts ">>> Removing processed docs"
FileUtils.rm_rf("docs")
end
if (Dir.exists?("addons/integrations")) then
puts ">>> Removing processed addons"
FileUtils.rm_rf("docs")
end
process_main_docs(".")
add_placeholder_pages()
# Regenerate the classic iconset docs
#puts ">>> Generating iconset"
#system("ruby generate_iconset_doc.rb #{docs_source_dir}/_addons_iconsets classic #{docs_source_dir}/_data docs/configuration/iconsets")