Added VIM tools, and help pages to all scripts missing one
This commit is contained in:
16
README
Executable file
16
README
Executable file
@@ -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
|
||||
|
||||
1
bin/vimansi
Symbolic link
1
bin/vimansi
Symbolic link
@@ -0,0 +1 @@
|
||||
../vim/vimansi
|
||||
1
bin/vimbox
Symbolic link
1
bin/vimbox
Symbolic link
@@ -0,0 +1 @@
|
||||
../vim/vimbox
|
||||
@@ -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,
|
||||
|
||||
11
numberDL
11
numberDL
@@ -1,10 +1,13 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "use: $0 http://etc/ 01 .jpg 30 wget"
|
||||
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
|
||||
fi
|
||||
}
|
||||
[[ -z "$1" ]] && helpexit
|
||||
[[ "$1" = "-h" ]] && helpexit
|
||||
|
||||
jotai="$1"
|
||||
paate="$3"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
then echo Expecting doi code
|
||||
function helpexit() {
|
||||
echo Print out bibtex entry from a DOI.
|
||||
echo Give DOI code as the argument
|
||||
exit
|
||||
fi
|
||||
}
|
||||
[[ -z "$1" ]] && helpexit
|
||||
[[ "$1" = "-h" ]] && helpexit
|
||||
|
||||
curl -LH "Accept: text/bibliography; style=bibtex" "http://dx.doi.org/$1"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()<CR>
|
||||
map c2 :call CharDraw_lines()<CR>
|
||||
map c3 :call CharDraw_doublelines()<CR>
|
||||
@@ -9,7 +8,7 @@ map c4 :call CharDraw_arrows()<CR>
|
||||
map c5 :call CharDraw_extrachars()<CR>
|
||||
map c0 :call CharDraw_clear()<CR>
|
||||
|
||||
map cr :so ansi.vim<CR>
|
||||
" map cr :so ansi.vim<CR>
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ map cr :so chkl.vim<CR>
|
||||
function! Box_clear ()
|
||||
mapclear!
|
||||
map <space> :<C-U>call Flip_box()<CR>
|
||||
map a i[ ] <ESC>
|
||||
map a i[ ] <ESC>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
|
||||
|
||||
12
vim/vimansi
Executable file
12
vim/vimansi
Executable file
@@ -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" "$@"
|
||||
12
vim/vimbox
Executable file
12
vim/vimbox
Executable file
@@ -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" "$@"
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
6
vnc/vncs
6
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 \
|
||||
|
||||
@@ -85,6 +85,5 @@ def sizeof(num):
|
||||
return "%3.1f %s" % (num, x)
|
||||
num /= 1024.0
|
||||
|
||||
|
||||
opts=setup()
|
||||
generate_index(opts)
|
||||
|
||||
Reference in New Issue
Block a user