|
@@ -188,6 +188,7 @@ This handles git as needed, by first checking to see if the first argument is ~i
|
|
|
#+Name: add-book
|
|
|
#+BEGIN_SRC sh
|
|
|
function add-single {
|
|
|
+ if [[ $# -lt 7]] ; then
|
|
|
echo -n "Title: "
|
|
|
read TITLE
|
|
|
echo -n "Author: "
|
|
@@ -202,6 +203,22 @@ This handles git as needed, by first checking to see if the first argument is ~i
|
|
|
read ISBN
|
|
|
echo -n "Location: "
|
|
|
read LOCATION
|
|
|
+ else
|
|
|
+ TITLE=$1
|
|
|
+ shift
|
|
|
+ AUTHOR=$1
|
|
|
+ shift
|
|
|
+ LCCN=$1
|
|
|
+ shift
|
|
|
+ COPYRIGHT=$1
|
|
|
+ shift
|
|
|
+ PUBLISHER=$1
|
|
|
+ shift
|
|
|
+ ISBN=$1
|
|
|
+ shift
|
|
|
+ LOCATION=$1
|
|
|
+ shift
|
|
|
+ fi
|
|
|
recins -t Book \
|
|
|
-f Title -v "${TITLE}" \
|
|
|
-f Author -v "${AUTHOR}" \
|
|
@@ -438,7 +455,7 @@ This handles git as needed, by first checking to see if the first argument is ~i
|
|
|
exit
|
|
|
;;
|
|
|
add)
|
|
|
- add-single
|
|
|
+ add-single $@
|
|
|
exit
|
|
|
;;
|
|
|
git)
|