1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

WIP: Forgotten

This commit is contained in:
Tony Tkáčik 2016-04-26 11:02:52 +02:00
parent af0740386d
commit 8d287c3e66
6 changed files with 71 additions and 3 deletions

6
bashrc
View file

@ -143,3 +143,9 @@ PS1="$PS1\$(parse_git_branch)"
## Finalizing section
PS1="$PS1\$ ";
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/tony/.sdkman"
[[ -s "/home/tony/.sdkman/bin/sdkman-init.sh" ]] && source "/home/tony/.sdkman/bin/sdkman-init.sh"

8
bin/nux-note Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
DATE_FORMAT="%Y-%m-%d %H:%M"
NOTE_FILE=$1;
shift;
# FIXME: Add possibility to specify note aliases & help
echo $(date "+$DATE_FORMAT") $* ">> $NOTE_FILE";

View file

@ -3,7 +3,7 @@
##
## Creates cbz archive from supplied folder.
##
SELF=$0
FILENAME=$(basename $0)
show_help() {
echo $FILENAME
@ -42,8 +42,9 @@ while getopts "hp:s:d" opt; do
SUFFIX="$OPTARG";
;;
h)
show_help;exit 1;;
\?) show_help;exit 1;;
tdm-show-help $SELF;exit 1;;
\?)
tdm-show-help $SELF;exit 1;;
:) echo "Option -$OPTARG requires an argument." >&2 ; exit 1;;
esac
done

8
bin/tdm-note Normal file
View file

@ -0,0 +1,8 @@
#!/bin/sh
DATE_FORMAT="%Y-%m-%d %H:%M"
NOTE_FILE=$1;
shift;
# FIXME: Add possibility to specify note aliases & help
echo $(date "+$DATE_FORMAT") $* ">> $NOTE_FILE";

14
bin/tdm-show-help Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
##
## Creates cbz archive from supplied folder.
##
SCRIPT_PATH=$1
FILENAME=$(basename $1)
echo $FILENAME
grep "\#\#" $1 | cut -d\# -f3-
echo

31
bin/todoist Executable file
View file

@ -0,0 +1,31 @@
#!/bin/sh
# Source http://www.dib0.nl/code/524-add-todoist-item-from-the-commandline-in-linux-revised
# check commandline arguments
if [ $# -eq 0 ]
then
echo "No arguments."
echo "Usage addtodoist.sh <Username (e-mail)> <Password> <Title to do item> <Date/time: optional> <Project ID: optional>"
exit 1
fi
# Login and get the token
token=`wget -qO- --no-check-certificate "https://api.todoist.com/API/login?email=$1&password=$2"|awk -F'api_token":"' '{print $2}'|awk -F'"' '{print $1}'`
# Add the todo item
url="https://api.todoist.com/API/addItem?token=$token&content=$3&priority=1"
# Add the date if available
if [ ! -z "$4" ]
then
url=$url"&date_string=$4"
fi
# Add the project_id if available
if [ ! -z "$5" ]
then
url=$url"&project_id=$5"
fi
wget -qO- --no-check-certificate "$url" >/dev/null