Skip to content

Commit

Permalink
add update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed May 1, 2015
1 parent e2d30bf commit c8a78f1
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down Expand Up @@ -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://[email protected]/$TRAVIS_REPO_SLUG.git gh-pages; fi
# upload to euslisp-docs
- if [ "$TRAVIS_BRANCH" == "master" ]; then git clone https://k-okada:[email protected]/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:[email protected]/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"

34 changes: 34 additions & 0 deletions .upload-doc.sh
Original file line number Diff line number Diff line change
@@ -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@<BR>@@' $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"



7 changes: 7 additions & 0 deletions doc/jmanual.tex
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -185,6 +189,8 @@
\bibliographystyle{plain}
\newpage
\pagenumbering{arabic}

\ifeuslisp
\part{EusLisp 基本}
\markboth{EusLisp version \eusversion リファレンスマニュアル (Part I)}{はじめに}
\input{jintro}
Expand All @@ -210,6 +216,7 @@ \part{EusLisp 拡張}
\input{jgraphics}
\input{jxwindow}
\input{jxtoolkit}
\fi
%

\part{irteus 拡張}
Expand Down

0 comments on commit c8a78f1

Please sign in to comment.