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

This commit is contained in:
Yvan Sraka 2017-08-16 16:07:51 +02:00
parent f6370dd5eb
commit 6dc1bc5237
3 changed files with 16 additions and 1 deletions

View File

@ -2,7 +2,7 @@ language: python
python: python:
- 2.7 - 2.7
install: 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 - # Install glfw
- git clone https://github.com/glfw/glfw.git ~/glfw - git clone https://github.com/glfw/glfw.git ~/glfw
- cd ~/glfw - cd ~/glfw

View File

@ -14,3 +14,10 @@ for folder in folders:
shaderCommand = "glslViewer " + shaderPath + " " + \ shaderCommand = "glslViewer " + shaderPath + " " + \
" -s 0.5 -o " + shaderImage " -s 0.5 -o " + shaderImage
returnCode = subprocess.call(shaderCommand, shell=True) 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)

View File

@ -41,6 +41,14 @@ def injectShaderBlocks( _folder, _text ):
print shaderCommand print shaderCommand
returnCode = subprocess.call(shaderCommand, shell=True) returnCode = subprocess.call(shaderCommand, shell=True)
rta += "![]("+shaderImage+")\n" 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: else:
rta += line+'\n' rta += line+'\n'
return rta return rta