Mercurial > index.cgi > dotfiles
comparison .bash_aliases @ 210:25e7a79f5ba0
Better update to TOhtml
author | Steve Huston <huston@astro.princeton.edu> |
---|---|
date | Wed, 06 Jan 2021 12:08:28 -0500 |
parents | 78b05f62ebbc |
children | c35da750af7a |
comparison
equal
deleted
inserted
replaced
209:d7f327fd082f | 210:25e7a79f5ba0 |
---|---|
195 fi; | 195 fi; |
196 popd | 196 popd |
197 } | 197 } |
198 | 198 |
199 TOhtml() { | 199 TOhtml() { |
200 OUTDIR=`mktemp -d TOHTML.XXXXXX` | 200 OUTDIR=${1:-`mktemp -d TOHTML.XXXXXX`} |
201 ROOT=`hg root` | |
202 | |
203 echo "<HTML><HEAD><TITLE>My dotfiles</TITLE></HEAD><BODY><UL>" > $OUTDIR/index.html | |
204 | |
201 for F in `hg locate` ; do | 205 for F in `hg locate` ; do |
202 if [ -d $F ] ; then | |
203 continue | |
204 fi | |
205 | 206 |
206 # Files to ignore from the list | 207 # Files to ignore from the list |
207 case $F in | 208 case $F in |
208 .vim/ftdetect/puppet.vim | \ | 209 .vim/*) |
209 .vim/ftplugin/puppet.vim | \ | |
210 .vim/indent/puppet.vim | \ | |
211 .vim/plugin/gnupg.vim | \ | |
212 .vim/syntax/puppet.vim | \ | |
213 .vim/syntax/syslog.vim | \ | |
214 .vim/syntax/yum.vim \ | |
215 ) | |
216 continue | 210 continue |
217 ;; | 211 ;; |
218 *) | 212 *) |
219 ;; | 213 ;; |
220 esac | 214 esac |
221 | 215 |
222 OUT=`echo $F | sed -e 's/^\.//' -e 's,.*/,,'` | 216 D=`echo $F | grep "/" | sed 's/\/[^\/]*$//'` |
223 vim -e +TOhtml "+w ${OUTDIR}/${OUT}.html" +qa\! $F | 217 if [ $D ] ; then |
218 mkdir -p $OUTDIR/$D | |
219 fi | |
220 | |
221 vim -n -e +TOhtml "+w ${OUTDIR}/${F}.html" +qa\! $ROOT/$F | |
222 echo "<LI><A href=${F}.html>$F</LI>" >> $OUTDIR/index.html | |
224 done | 223 done |
224 echo "</UL></BODY></HTML>" >> $OUTDIR/index.html | |
225 echo Files stored in $OUTDIR | 225 echo Files stored in $OUTDIR |
226 } | 226 } |
227 | 227 |
228 hgs() { | 228 hgs() { |
229 # We assume here that if the host is a Mac, we're going to open the | 229 # We assume here that if the host is a Mac, we're going to open the |