diff --git a/README b/README new file mode 100755 index 0000000..8d5ba67 --- /dev/null +++ b/README @@ -0,0 +1,16 @@ +#!/bin/bash + +# Start me to print all the helps to +# all the commands within this repository + + +cd $( dirname $0 )/bin + +( +for e in *; do + echo -e "\n===== $e =====\n" + ./$e -h +done + +) | less + diff --git a/bin/vimansi b/bin/vimansi new file mode 120000 index 0000000..dd5eb18 --- /dev/null +++ b/bin/vimansi @@ -0,0 +1 @@ +../vim/vimansi \ No newline at end of file diff --git a/bin/vimbox b/bin/vimbox new file mode 120000 index 0000000..f1c0a6d --- /dev/null +++ b/bin/vimbox @@ -0,0 +1 @@ +../vim/vimbox \ No newline at end of file diff --git a/clockcurses.py b/clockcurses.py index f238f61..e1bf468 100755 --- a/clockcurses.py +++ b/clockcurses.py @@ -136,6 +136,8 @@ def main(): curses.endwin() usage='''Usage: %prog [options] + +Display a clockface ''' parser=OptionParser(usage=usage) parser.add_option("-s",action="store_true",dest="seconds",default=False, diff --git a/numberDL b/numberDL index 6d251bf..8535654 100755 --- a/numberDL +++ b/numberDL @@ -1,10 +1,13 @@ #!/bin/bash -if [ -z "$1" ] -then -echo "use: $0 http://etc/ 01 .jpg 30 wget" -echo "length of first number as a string defines padding" -exit -fi +function helpexit() { + echo "Print or download URLs with consecutive numbers" + echo "usage example, Download files: $0 http://etc/ 01 .jpg 30 wget" + echo "usage example, Print URLS: $0 http://etc/ 001 .jpg 30 echo" + echo "length of first number as a string defines padding" + exit +} +[[ -z "$1" ]] && helpexit +[[ "$1" = "-h" ]] && helpexit jotai="$1" paate="$3" diff --git a/reporting/doi2bib b/reporting/doi2bib index 2fff905..033d84c 100755 --- a/reporting/doi2bib +++ b/reporting/doi2bib @@ -1,8 +1,11 @@ #!/bin/bash -if [ -z "$1" ] -then echo Expecting doi code - exit -fi +function helpexit() { + echo Print out bibtex entry from a DOI. + echo Give DOI code as the argument + exit +} +[[ -z "$1" ]] && helpexit +[[ "$1" = "-h" ]] && helpexit curl -LH "Accept: text/bibliography; style=bibtex" "http://dx.doi.org/$1" diff --git a/reporting/markslider b/reporting/markslider index 3b57c6b..e278a7f 100755 --- a/reporting/markslider +++ b/reporting/markslider @@ -10,8 +10,13 @@ function exit_reset { setterm -cursor on exit } +function short_help() { + echo MarkSlider, the markdown syntax slideshow engine + echo Start without arguments to view the demo + exit +} [ -z "$1" ] && display_self -[ "$1" = "-h" ] && display_self +[ "$1" = "-h" ] && short_help [ -f "$1" ] || { echo Cannot find file: $1 diff --git a/vim/ansi.vim b/vim/ansi.vim index 9651e32..357168f 100644 --- a/vim/ansi.vim +++ b/vim/ansi.vim @@ -1,7 +1,6 @@ " http://www.lingua-systems.com/knowledge/unicode-mappings/cp850-to-unicode.html " http://www.obliquity.com/computer/html/unicode2500.html - map c1 :call CharDraw_blocks() map c2 :call CharDraw_lines() map c3 :call CharDraw_doublelines() @@ -9,7 +8,7 @@ map c4 :call CharDraw_arrows() map c5 :call CharDraw_extrachars() map c0 :call CharDraw_clear() -map cr :so ansi.vim +" map cr :so ansi.vim function! CharDraw_clear () mapclear! @@ -20,7 +19,6 @@ set laststatus=2 endfunction call CharDraw_clear() - function! CharDraw_blocks () mapclear! map! 1 ░ @@ -92,4 +90,3 @@ function! CharDraw_arrows () map! 8 ▲ set statusline=%f\ %=\ [▲▶▼◀◆]\(%v,%l)\ HEX:%B endfunction - diff --git a/vim/checklist.vim b/vim/checklist.vim index 9d1e216..f6c2044 100644 --- a/vim/checklist.vim +++ b/vim/checklist.vim @@ -4,14 +4,14 @@ map cr :so chkl.vim function! Box_clear () mapclear! map :call Flip_box() - map a i[ ] + map a i[ ] hhh set laststatus=2 set statusline=%f\ %=\ \[ChkLst\ spc,a]\ (%v,%l)\ HEX:%B endfunction call Box_clear() function! Flip_box () - s!^\(\s*\)\[ \]!\1[xXx]!e + s!\[ \]![xXx]!e s!^\(\s*\)\[x\]!\1[ ]!e s!\[xXx\]![x]!e endfunction diff --git a/vim/vimansi b/vim/vimansi new file mode 100755 index 0000000..effc27d --- /dev/null +++ b/vim/vimansi @@ -0,0 +1,12 @@ +#!/bin/bash + +function helpexit() { + echo Edit a file with ANSI editor mod of vim + echo All switches are passed on to vim. + exit +} +[[ -z "$1" ]] && helpexit +[[ "$1" = "-h" ]] && helpexit + +LIB=$( dirname $0 )/ansi.vim +vim -S "$LIB" "$@" diff --git a/vim/vimbox b/vim/vimbox new file mode 100755 index 0000000..da217b8 --- /dev/null +++ b/vim/vimbox @@ -0,0 +1,12 @@ +#!/bin/bash +function helpexit() { + echo Edit a file with check list mod of vim + echo "key 'a' adds a checkbox, space toggles the box" + echo All switches are passed on to vim. + exit +} +[[ -z "$1" ]] && helpexit +[[ "$1" = "-h" ]] && helpexit + +LIB=$( dirname $0 )/checklist.vim +vim -S "$LIB" "$@" diff --git a/vnc/vncdisp b/vnc/vncdisp index f9c4800..0bc1745 100755 --- a/vnc/vncdisp +++ b/vnc/vncdisp @@ -140,6 +140,10 @@ def initialize(): return entries def main(): + if (len(sys.argv)>1): + if (sys.argv[1]=="-h"): + print("Start within a VNC session to select different screen resolutions") + sys.exit(0) entries=initialize() print(entries) ch=getch() diff --git a/vnc/vnckill b/vnc/vnckill index b765f78..1a47186 100755 --- a/vnc/vnckill +++ b/vnc/vnckill @@ -1,5 +1,11 @@ #!/bin/bash +function helpexit() { + echo "Kill your current VNC session" + exit +} +[[ "$1" = "-h" ]] && helpexit + dn=$( echo $UID | sed 's/.*\(....\)$/\1/' ) vncserver -kill :$dn diff --git a/vnc/vncs b/vnc/vncs index bc88317..f35adfa 100755 --- a/vnc/vncs +++ b/vnc/vncs @@ -1,5 +1,11 @@ #!/bin/bash +function helpexit() { + echo "start a VNC session" + exit +} +[[ "$1" = "-h" ]] && helpexit + dn=$( echo $UID | sed 's/.*\(....\)$/\1/' ) vncserver :$dn -depth 24 \ diff --git a/web_serving/SimpleWebPage.py b/web_serving/SimpleWebPage.py index 637fa10..6a71489 100755 --- a/web_serving/SimpleWebPage.py +++ b/web_serving/SimpleWebPage.py @@ -85,6 +85,5 @@ def sizeof(num): return "%3.1f %s" % (num, x) num /= 1024.0 - opts=setup() generate_index(opts)