Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
detectors
athena
Commits
0b414229
Commit
0b414229
authored
3 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
Tweaked documentation tags and builder script
parent
fa94a63b
No related branches found
No related tags found
1 merge request
!137
Tweaked documentation tags and builder script
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/build_documentation
+15
-2
15 additions, 2 deletions
bin/build_documentation
compact/definitions.xml
+164
-180
164 additions, 180 deletions
compact/definitions.xml
with
179 additions
and
182 deletions
bin/build_documentation
+
15
−
2
View file @
0b414229
...
@@ -15,7 +15,7 @@ get_includes() {
...
@@ -15,7 +15,7 @@ get_includes() {
xmllint
--format
--xpath
'//include/@ref'
${
input_file
}
&> /dev/null
xmllint
--format
--xpath
'//include/@ref'
${
input_file
}
&> /dev/null
local
res
=
"
$?
"
local
res
=
"
$?
"
if
[
"
${
res
}
"
==
"0"
]
;
then
if
[
"
${
res
}
"
==
"0"
]
;
then
local
subincluded
=
$(
xmllint
--format
--xpath
'//include/@ref'
${
input_file
}
2> /dev/null |
sed
's/ref=\"//g'
|
sed
's/\"//g'
)
local
subincluded
=
$(
xmllint
--format
--xpath
'//include/@ref'
${
input_file
}
2> /dev/null |
sed
's/ref=\"//g'
|
sed
's/\"//g'
)
filelist
=
"
${
filelist
}
${
subincluded
}
"
filelist
=
"
${
filelist
}
${
subincluded
}
"
#echo "sub include $afile"
#echo "sub include $afile"
fi
fi
...
@@ -41,6 +41,12 @@ get_doc_levels() {
...
@@ -41,6 +41,12 @@ get_doc_levels() {
local
new_levels
=
$(
xmllint
--format
--xpath
'//documentation/@level'
$afile
2> /dev/null |
sed
's/level=\"/ /g'
|
sed
's/\"//g'
)
local
new_levels
=
$(
xmllint
--format
--xpath
'//documentation/@level'
$afile
2> /dev/null |
sed
's/level=\"/ /g'
|
sed
's/\"//g'
)
levels
=
"
${
levels
}
${
new_levels
}
"
levels
=
"
${
levels
}
${
new_levels
}
"
fi
fi
# see if there are tags without level attribute
xmllint
--format
--xpath
'//documentation[not(@level)]'
$afile
&> /dev/null
if
[
"
${
?
}
"
==
"0"
]
;
then
#echo "DERP"
levels
=
"
${
levels
}
100"
fi
done
done
echo
"
$levels
"
|
sed
's/ /\n/g'
|
sort
|
uniq
echo
"
$levels
"
|
sed
's/ /\n/g'
|
sort
|
uniq
}
}
...
@@ -56,7 +62,14 @@ for alevel in $(echo ${all_levels} | sed 's/ /\n/g' | sort -n | uniq ) ; do
...
@@ -56,7 +62,14 @@ for alevel in $(echo ${all_levels} | sed 's/ /\n/g' | sort -n | uniq ) ; do
#xmllint --format --xpath '//documentation[@level="'"$alevel"'"]/text()' $afile
#xmllint --format --xpath '//documentation[@level="'"$alevel"'"]/text()' $afile
level_doc
=
$(
xmllint
--format
--xpath
'//documentation[@level="'
$alevel
'"]'
${
afile
}
2> /dev/null
)
level_doc
=
$(
xmllint
--format
--xpath
'//documentation[@level="'
$alevel
'"]'
${
afile
}
2> /dev/null
)
if
[
"
$?
"
-eq
"0"
]
;
then
if
[
"
$?
"
-eq
"0"
]
;
then
xmllint
--format
--xpath
'//documentation[@level="'
$alevel
'"]/text()'
${
afile
}
|
sed
-re
's/<\/?\w+>//g'
|
sed
's/^[[:space:]]*#/#/g'
xmllint
--format
--xpath
'//documentation[@level="'
$alevel
'"]/text()'
${
afile
}
|
sed
-re
's/<\/?\w+>//g'
|
sed
's/^[[:space:]]*#/#/g'
fi
# sets the tags without attribute level to 100
xmllint
--format
--xpath
'//documentation[not(@level)]/text()'
${
afile
}
&> /dev/null
if
[
"
$?
"
-eq
"0"
]
;
then
if
[
"
$alevel
"
-eq
"100"
]
;
then
xmllint
--format
--xpath
'//documentation[not(@level)]/text()'
${
afile
}
|
sed
-re
's/<\/?\w+>//g'
|
sed
's/^[[:space:]]*#/#/g'
fi
fi
fi
done
done
done
done
...
...
This diff is collapsed.
Click to expand it.
compact/definitions.xml
+
164
−
180
View file @
0b414229
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment