Update travis.yml, parseBook.py & makeThumbs.py

pull/154/head
Yvan Sraka 7 years ago
parent f6370dd5eb
commit 6dc1bc5237

@ -2,7 +2,7 @@ language: python
python:
- 2.7
install:
- sudo apt-get install cmake xorg-dev libglu1-mesa-dev texlive-xetex texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended pandoc
- sudo apt-get install cmake xorg-dev libglu1-mesa-dev texlive-xetex texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended pandoc imagemagick
- # Install glfw
- git clone https://github.com/glfw/glfw.git ~/glfw
- cd ~/glfw

@ -14,3 +14,10 @@ for folder in folders:
shaderCommand = "glslViewer " + shaderPath + " " + \
" -s 0.5 -o " + shaderImage
returnCode = subprocess.call(shaderCommand, shell=True)
for filename in glob.glob(folder + '/*.gif'):
gifPath = filename;
gifName, gifExt = os.path.splitext(filename)
pngImage = gifName + ".png"
convertCommand = "convert " + gifPath + " " + pngImage
returnCode = subprocess.call(convertCommand, shell=True)

@ -41,6 +41,14 @@ def injectShaderBlocks( _folder, _text ):
print shaderCommand
returnCode = subprocess.call(shaderCommand, shell=True)
rta += "![]("+shaderImage+")\n"
elif line.find('.gif') >= 0:
gifPath = re.sub(r'\!\[.*\]\((.*\.gif)\)', r'\1', line.rstrip())
gifName, gifExt = os.path.splitext(gifPath)
pngImage = gifName + ".png"
convertCommand = "convert " + gifPath + " " + pngImage
print convertCommand
returnCode = subprocess.call(convertCommand, shell=True)
rta += re.sub(r'\!\[(.*)\]\((.*)\.gif\)', r'![\1](\2-0.png)', line) + '\n'
else:
rta += line+'\n'
return rta

Loading…
Cancel
Save