diff --git a/.travis.yml b/.travis.yml index 3b29efe8b..a9e289c0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ notifications: env: - secure: "u0lUaQ+BR5IH2bJNmGPZ8Yp5/iroJiHNkADN6lvMMqS9FQc8kcEe74UgsTjMdteQXRsDTtJVmwB7UFB83bwwcKoVYwrGAdOfBkWM702hTgmEIqKTkBkaVyUjkzR/VrnVCHCLhQMysAuHQyPrEPjLlvmKiJJ/OYfRg2QCd74ef1I=" before_install: # Use this to prepare the system to install prerequisites or dependencies + - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config # Define some config vars - export CI_SOURCE_PATH=$(pwd) - export REPOSITORY_NAME=${PWD##*/} @@ -46,6 +47,12 @@ after_success: - if [ "$TRAVIS_BRANCH" == "master" ]; then git add -f .; fi - if [ "$TRAVIS_BRANCH" == "master" ]; then git commit -m "Build documents from $TRAVIS_COMMIT" . ; fi - if [ "$TRAVIS_BRANCH" == "master" ]; then git push -f --quiet https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages; fi +# upload to euslisp-docs + - if [ "$TRAVIS_BRANCH" == "master" ]; then git clone https://k-okada:$GH_TOKEN@github.com/jsk-ros-pkg/euslisp-docs.git /tmp/euslisp-docs; fi + - if [ "$TRAVIS_BRANCH" == "master" ]; then cd /tmp/euslisp-docs; git remote rm origin; git remote add origin https://k-okada:$GH_TOKEN@github.com/jsk-ros-pkg/euslisp-docs.git; fi + - 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(flg>0)print; if (/^\\ifeuslisp/) {flg=0}; 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 + - if [ "$TRAVIS_BRANCH" == "master" ]; then mkdir -p /tmp/euslisp-docs/docs/jskeus; cd /tmp/euslisp-docs/docs; cp /tmp/html/*.{png,md} jskeus/; fi + - 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 after_failure: - echo "failure" diff --git a/.upload-doc.sh b/.upload-doc.sh new file mode 100755 index 000000000..daa944636 --- /dev/null +++ b/.upload-doc.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -x ## +ls -al ## +rm -fr /tmp/html +mkdir -p /tmp/html +latex2html -dir /tmp/html/ -local_icons -auto_prefix -iso_language JP jmanual -split 1 -no_navigation +# euslisp-docs, generate markdown from pandoc +sudo apt-get install -qq -y pandoc +cd /tmp/html +ls -al ## +for file in jmanual*.html; do + name=`basename $file .html`.md + cp $file $file.tmp + sed -i 's@
@@' $file.tmp + sed -i 's@ALIGN="CENTER"@@' $file.tmp + nkf --in-place -u $file.tmp + pandoc -f html -t markdown -s $file.tmp -o $name + sed -i 's@(\(.*\)\.html)@(\1)@g' $name + rm $file.tmp +done +ls -al ## + +# git clone https://github.com/jsk-ros-pkg/euslisp-docs /tmp/euslisp-docs +# rm -fr /tmp/euslisp-docs/site +# rm -fr /tmp/euslisp-docs/docs/euslisp/* +# mkdir -p /tmp/euslisp-docs/docs/euslisp +# mv *.md /tmp/euslisp-docs/docs/euslisp/ +# #cp *.png /tmp/euslisp-docs/docs/euslisp/ +# cd /tmp/euslisp-docs +# git add docs/euslisp/* +# git commit -m "Update euslisp form $TRAVIS_COMMIT" + + + diff --git a/doc/jmanual.tex b/doc/jmanual.tex index e23d0aa22..619af7a4b 100644 --- a/doc/jmanual.tex +++ b/doc/jmanual.tex @@ -1,5 +1,9 @@ %\documentstyle[art10,titlepage,makeidx,twoside,EPSF/epsf,mytabbing]{j-article} +% euslisp +\newif\ifeuslisp +\euslisptrue + %%% added 2004.12.14 \documentclass[]{jarticle} \usepackage{makeidx,mytabbing,fancyheadings} @@ -185,6 +189,8 @@ \bibliographystyle{plain} \newpage \pagenumbering{arabic} + +\ifeuslisp \part{EusLisp 基本} \markboth{EusLisp version \eusversion リファレンスマニュアル (Part I)}{はじめに} \input{jintro} @@ -210,6 +216,7 @@ \part{EusLisp 拡張} \input{jgraphics} \input{jxwindow} \input{jxtoolkit} +\fi % \part{irteus 拡張}