Skip to content

Commit 3296d62

Browse files
committed
add update doc
1 parent e2d30bf commit 3296d62

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ notifications:
1212
env:
1313
- secure: "u0lUaQ+BR5IH2bJNmGPZ8Yp5/iroJiHNkADN6lvMMqS9FQc8kcEe74UgsTjMdteQXRsDTtJVmwB7UFB83bwwcKoVYwrGAdOfBkWM702hTgmEIqKTkBkaVyUjkzR/VrnVCHCLhQMysAuHQyPrEPjLlvmKiJJ/OYfRg2QCd74ef1I="
1414
before_install: # Use this to prepare the system to install prerequisites or dependencies
15+
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
1516
# Define some config vars
1617
- export CI_SOURCE_PATH=$(pwd)
1718
- export REPOSITORY_NAME=${PWD##*/}
@@ -46,6 +47,12 @@ after_success:
4647
- if [ "$TRAVIS_BRANCH" == "master" ]; then git add -f .; fi
4748
- if [ "$TRAVIS_BRANCH" == "master" ]; then git commit -m "Build documents from $TRAVIS_COMMIT" . ; fi
4849
- if [ "$TRAVIS_BRANCH" == "master" ]; then git push -f --quiet https://[email protected]/$TRAVIS_REPO_SLUG.git gh-pages; fi
50+
# upload to euslisp-docs
51+
- if [ "$TRAVIS_BRANCH" == "master" ]; then git clone https://k-okada:[email protected]/jsk-ros-pkg/euslisp-docs.git /tmp/euslisp-docs; fi
52+
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd /tmp/euslisp-docs; git remote rm origin; git remote add origin https://k-okada:[email protected]/jsk-ros-pkg/euslisp-docs.git; fi
53+
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd ${CI_SOURCE_PATH}/doc; git clean -xfd; sed -i 's@rm -fr@#rm -fr@g' Makefile; sed -i 's@\euslisptrue@\euslispfalse@g' jmanual.tex; awk 'BEGIN{flg=1}; {if (/^\\ifeuslisp/) {flg=0}; if(flg>0)print; if (/^\\fi/) {flg=1} };' jmanual.tex > jmanual.tex.tmp; mv jmanual.tex.tmp jmanual.tex ; rm -fr html; make TMPDIR=/tmp; cp /tmp/*.tex ./; ${CI_SOURCE_PATH}/.upload-doc.sh; fi
54+
- if [ "$TRAVIS_BRANCH" == "master" ]; then mkdir -p /tmp/euslisp-docs/docs/jskeus; cd /tmp/euslisp-docs/docs; cp /tmp/html/*.{png,md} jskeus/; fi
55+
- if [ "$TRAVIS_BRANCH" == "master" ]; then git add jskeus/*.md; git commit -m "Update jskeus form https://github.com/$TRAVIS_REPO_SLUG/tree/$TRAVIS_COMMIT"; git push -fq origin master; fi
4956
after_failure:
5057
- echo "failure"
5158

.upload-doc.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
set -x ##
3+
ls -al ##
4+
rm -fr /tmp/html
5+
mkdir -p /tmp/html
6+
latex2html -dir /tmp/html/ -local_icons -auto_prefix -iso_language JP jmanual -split 1 -no_navigation
7+
# euslisp-docs, generate markdown from pandoc
8+
sudo apt-get install -qq -y pandoc
9+
cd /tmp/html
10+
ls -al ##
11+
for file in jmanual*.html; do
12+
name=`basename $file .html`.md
13+
cp $file $file.tmp
14+
sed -i 's@<BR>@@' $file.tmp
15+
sed -i 's@ALIGN="CENTER"@@' $file.tmp
16+
nkf --in-place -u $file.tmp
17+
pandoc -f html -t markdown -s $file.tmp -o $name
18+
sed -i 's@(\(.*\)\.html)@(\1)@g' $name
19+
rm $file.tmp
20+
done
21+
ls -al ##
22+
23+
# git clone https://github.com/jsk-ros-pkg/euslisp-docs /tmp/euslisp-docs
24+
# rm -fr /tmp/euslisp-docs/site
25+
# rm -fr /tmp/euslisp-docs/docs/euslisp/*
26+
# mkdir -p /tmp/euslisp-docs/docs/euslisp
27+
# mv *.md /tmp/euslisp-docs/docs/euslisp/
28+
# #cp *.png /tmp/euslisp-docs/docs/euslisp/
29+
# cd /tmp/euslisp-docs
30+
# git add docs/euslisp/*
31+
# git commit -m "Update euslisp form $TRAVIS_COMMIT"
32+
33+
34+

doc/jmanual.tex

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
%\documentstyle[art10,titlepage,makeidx,twoside,EPSF/epsf,mytabbing]{j-article}
22

3+
% euslisp
4+
\newif\ifeuslisp
5+
\euslisptrue
6+
37
%%% added 2004.12.14
48
\documentclass[]{jarticle}
59
\usepackage{makeidx,mytabbing,fancyheadings}
@@ -185,6 +189,8 @@
185189
\bibliographystyle{plain}
186190
\newpage
187191
\pagenumbering{arabic}
192+
193+
\ifeuslisp
188194
\part{EusLisp 基本}
189195
\markboth{EusLisp version \eusversion リファレンスマニュアル (Part I)}{はじめに}
190196
\input{jintro}
@@ -210,6 +216,7 @@ \part{EusLisp 拡張}
210216
\input{jgraphics}
211217
\input{jxwindow}
212218
\input{jxtoolkit}
219+
\fi
213220
%
214221

215222
\part{irteus 拡張}

0 commit comments

Comments
 (0)