# Use an empty install section to avoid RTD from picking up a non-python
# requirements.txt file.
install: []
+
+build:
+ apt_packages:
+ - mscgen
SPHINX_BUILD = sphinx-build -q
html:
- $(top_srcdir)/doc/devguide/tools/generate-images.sh
sysconfdir=$(sysconfdir) \
localstatedir=$(localstatedir) \
version=$(PACKAGE_VERSION) \
$(top_srcdir)/doc/devguide _build/html
_build/latex/Suricata.pdf:
- $(top_srcdir)/doc/devguide/tools/generate-images.sh
sysconfdir=$(sysconfdir) \
localstatedir=$(localstatedir) \
version=$(PACKAGE_VERSION) \
import os
import shlex
import re
+import subprocess
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except:
html_theme = 'default'
- def setup(app):
- if hasattr(app, 'add_css_file'):
- app.add_css_file('css/suricata.css')
- else:
- app.add_stylesheet('css/suricata.css')
else:
html_context = {
'css_files': [
],
}
+def setup(app):
+ # Generate images.
+ subprocess.check_call("./tools/generate-images.sh")
+ if not on_rtd:
+ if hasattr(app, 'add_css_file'):
+ app.add_css_file('css/suricata.css')
+ else:
+ app.add_stylesheet('css/suricata.css')
+
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# Script to generate Sequence Diagram images with mscgen
#
+set -e
+
cd extending/app-layer/diagrams
for FILE in *.msc ; do
# call mscgen and convert each file in images dir
+ echo "Generating image for $FILE"
mscgen -T png -F Arial $FILE
# if command fails, lets inform about that
if [ $? -ne 0 ]; then