Add editing options
[ci skip]
This commit is contained in:
parent
6569a73c7c
commit
5938e9a346
16
manage
16
manage
@ -9,12 +9,14 @@ Usage: $0 <command> [options]
|
|||||||
Commands:
|
Commands:
|
||||||
help Show this help message and exit
|
help Show this help message and exit
|
||||||
new [name] Create a new song [with the specified name]
|
new [name] Create a new song [with the specified name]
|
||||||
edit <name> Edit song with $EDITOR (taken from the EDITOR env var)
|
edit <name> Edit song with a text editor
|
||||||
|
iedit <name> Interactive edit with PDF preview
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
$0 help
|
$0 help
|
||||||
$0 new [song-name]
|
$0 new [song-name]
|
||||||
$0 edit <song-name>
|
$0 edit <song-name>
|
||||||
|
$0 iedit <song-name>
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
@ -47,7 +49,17 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
edit)
|
edit)
|
||||||
if [ "$#" -eq 2 ]; then
|
if [ "$#" -eq 2 ]; then
|
||||||
$EDITOR "content/$2/$2.cho"
|
xdg-open "content/$2/$2.cho"
|
||||||
|
else
|
||||||
|
echo -e "Missing song name\n"
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
iedit)
|
||||||
|
if [ "$#" -eq 2 ]; then
|
||||||
|
touch "content/$2/$2.pdf"
|
||||||
|
xdg-open "content/$2/$2.pdf" &
|
||||||
|
xdg-open "content/$2/$2.cho"
|
||||||
else
|
else
|
||||||
echo -e "Missing song name\n"
|
echo -e "Missing song name\n"
|
||||||
usage
|
usage
|
||||||
|
13
readme.md
13
readme.md
@ -39,16 +39,3 @@ This is done by default during the deploy pipeline.
|
|||||||
The `manage` shell script lets you do basic song management and saves you some
|
The `manage` shell script lets you do basic song management and saves you some
|
||||||
manual labour. Simply run the script itself or invoke `help` to get a list of
|
manual labour. Simply run the script itself or invoke `help` to get a list of
|
||||||
all available commands.
|
all available commands.
|
||||||
|
|
||||||
```
|
|
||||||
./manage help
|
|
||||||
Usage: ./manage <command> [options]
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
help Show this help message and exit
|
|
||||||
new <name> Create a new song with the specified name
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
./manage help
|
|
||||||
./manage new [song-name]
|
|
||||||
```
|
|
||||||
|
Loading…
Reference in New Issue
Block a user