Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
olena
Commits
98e25c56
Commit
98e25c56
authored
Apr 24, 2013
by
Guillaume Lazzara
Committed by
Roland Levillain
Jun 24, 2014
Browse files
demo/xml2doc/main.cc: Add --template-path option.
Signed-off-by:
Roland Levillain
<
roland@lrde.epita.fr
>
parent
eefb756c
Changes
2
Hide whitespace changes
Inline
Side-by-side
scribo/ChangeLog
View file @
98e25c56
2013-04-18 Guillaume Lazzara <z@lrde.epita.fr>
* demo/xml2doc/main.cc: Add --template-path option.
2014-06-20 Roland Levillain <roland@lrde.epita.fr>
Remove useless parts from the Scribo documentation machinery.
...
...
scribo/demo/xml2doc/main.cc
View file @
98e25c56
...
...
@@ -28,6 +28,8 @@
#include
"datarootdir.hh"
static
QString
template_path
;
void
check_xsltproc
()
{
...
...
@@ -42,7 +44,11 @@ void check_xsltproc()
QString
get_datarootdir
(
const
QString
&
file
)
{
QFile
f
(
SCRIBO_LOCAL_DATAROOTDIR
"/templates/"
+
file
);
QFile
f
(
template_path
+
"/templates/"
+
file
);
if
(
f
.
exists
())
return
template_path
+
"/templates/"
;
f
.
setFileName
(
SCRIBO_LOCAL_DATAROOTDIR
"/templates/"
+
file
);
if
(
f
.
exists
())
return
SCRIBO_LOCAL_DATAROOTDIR
"/templates/"
;
...
...
@@ -90,7 +96,7 @@ int svg_base64(const QString& xml, const QString& svg)
int
main
(
int
argc
,
char
**
argv
)
{
QString
man
=
\
"
xml_transform
\n
"
"
Usage: scribo-xml2doc [--template-path <dir>] [OPTIONS]
\n
"
"OPTIONS:
\n\n
"
"HTML output:
\n
"
...
...
@@ -138,8 +144,23 @@ int main(int argc, char **argv)
QString
option
(
argv
[
1
]);
if
(
argc
>
4
)
if
(
argc
==
5
||
argc
==
7
)
{
if
(
argc
==
7
)
{
if
(
"--template-path"
==
option
)
{
template_path
=
argv
[
2
];
argv
+=
2
;
option
=
QString
(
argv
[
1
]);
}
else
{
qDebug
()
<<
man
;
return
1
;
}
}
if
(
"--html-full"
==
option
)
{
check_xsltproc
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment