diff --git a/.gitignore b/.gitignore index 1597996..5720659 100644 --- a/.gitignore +++ b/.gitignore @@ -30,5 +30,6 @@ bin/* www/public/ www/data/ +www/static/install.sh docs/demo.gif diff --git a/Makefile b/Makefile index f416e7d..329b10a 100644 --- a/Makefile +++ b/Makefile @@ -48,12 +48,11 @@ release-darwin: bin/pomo-$(VERSION)-darwin-amd64 bin/pomo-$(VERSION)-darwin-amd6 release: release-linux release-darwin -docs: readme - cd www && hugo -d ../docs - -readme: www/data/readme.json +docs: www/data/readme.json + cd www && cp ../install.sh static/ && hugo -d ../docs www/data/readme.json: www/data README.md cat README.md | python -c 'import json,sys; print(json.dumps({"content": sys.stdin.read()}))' > $@ + www/data bin: mkdir -p $@ diff --git a/README.md b/README.md index b047194..f593d90 100644 --- a/README.md +++ b/README.md @@ -20,32 +20,18 @@ The Pomodoro Technique is simple and effective: Binaries are available for Linux and OSX platforms in the [releases section](https://github.com/kevinschoon/pomo/releases) on github. -#### Linux +### Installer Script -``` -curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-linux-amd64 -# Optionally verify file integrity -echo 97be4ccf66c4ae4e3e154f87b9bb0bf2 pomo | md5sum -c - -chmod +x pomo -./pomo -v -# Copy pomo to somewhere on your $PATH -``` - -#### OSX - -``` -curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-darwin-amd64 -# Optionally verify file integrity -[[ $(md5 -r pomo) != "55d77a30dfd6f66c95e19dd83c7ec95c pomo" ]] && echo "invalid hash!" -chmod +x pomo -./pomo -v -# Copy pomo to somewhere on your $PATH +A bash script to download and verify the latest release for Linux and OSX platforms can be run +with the following command: +```bash +curl -L -s https://kevinschoon.github.io/pomo/install.sh | bash /dev/stdin ``` ### Source - ``` + ```bash go get github.com/kevinschoon/pomo pomo -v ``` @@ -54,12 +40,12 @@ chmod +x pomo Once `pomo` is installed you need to initialize it's database. -``` +``` bash pomo init ``` Start a 4 pomodoro session at 25 minute intervals: -``` +```bash pomo start -t my-project "write some codes" ``` @@ -72,7 +58,7 @@ Pomo has a few configuration options which can be read from a JSON file in Pomo' You can map colors to specific tags in the `colors` field. Example: -``` +```json { "colors": { "my-project": "hiyellow", @@ -93,7 +79,7 @@ making it easy to script and embed it's output in various Linux status bars. You can create a module with the `custom/script` type and embed Pomo's status output in your Polybar: -``` +```ini [module/pomo] type = custom/script interval = 1 @@ -104,7 +90,6 @@ exec = pomo status ## Roadmap * Generate charts/burn down - * System tray notification/icon * ?? ## Credits diff --git a/docs/index.html b/docs/index.html index 1f3c0a4..61eadc4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -146,30 +146,17 @@

Binaries are available for Linux and OSX platforms in the releases section on github.

-

Linux

+

Installer Script

-
curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-linux-amd64
-# Optionally verify file integrity
-echo 97be4ccf66c4ae4e3e154f87b9bb0bf2  pomo | md5sum -c -
-chmod +x pomo
-./pomo -v
-# Copy pomo to somewhere on your $PATH
-
- -

OSX

- -
curl -L -o pomo https://github.com/kevinschoon/pomo/releases/download/0.6.0/pomo-0.6.0-darwin-amd64
-# Optionally verify file integrity
-[[ $(md5 -r pomo) != "55d77a30dfd6f66c95e19dd83c7ec95c pomo" ]] && echo "invalid hash!"
-chmod +x pomo
-./pomo -v
-# Copy pomo to somewhere on your $PATH
+

A bash script to download and verify the latest release for Linux and OSX platforms can be run +with the following command:

+
curl -L -s https://kevinschoon.github.io/pomo/install.sh | bash /dev/stdin
 

Source

-
 go get github.com/kevinschoon/pomo
+
 go get github.com/kevinschoon/pomo
  pomo -v
 
@@ -177,12 +164,12 @@ chmod +x pomo

Once pomo is installed you need to initialize it’s database.

-
pomo init
+
pomo init
 

Start a 4 pomodoro session at 25 minute intervals:

-
pomo start -t my-project "write some codes"
+
pomo start -t my-project "write some codes"
 

Configuration

@@ -195,7 +182,7 @@ chmod +x pomo

Example:

-
{
+
{
     "colors": {
         "my-project": "hiyellow",
         "another-project": "green"
@@ -215,7 +202,7 @@ making it easy to script and embed it’s output in various Linux status bar
 

You can create a module with the custom/script type and embed Pomo’s status output in your Polybar:

-
[module/pomo]
+
[module/pomo]
 type = custom/script
 interval = 1
 exec = pomo status
@@ -225,7 +212,6 @@ exec = pomo status
 
 
  • Generate charts/burn down
  • -
  • System tray notification/icon
  • ??
diff --git a/docs/install.sh b/docs/install.sh new file mode 100755 index 0000000..9dba7d6 --- /dev/null +++ b/docs/install.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +POMO_VERSION="0.7.0" +OSX_MD5="4aa452e021d07bbb2c7c3a15839fe5df" +LINUX_MD5="84551ab258902e62d9d8e14368bfdf4b" +OSX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-darwin-amd64" +LINUX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-linux-amd64" + +install_pomo() { + echo "Installing Pomo..." + if [[ "$OSTYPE" == darwin* ]] ; then { + curl -L -o pomo "$OSX_TARBALL" && \ + [[ $(md5 -r pomo) == "$OSX_MD5" ]] && \ + chmod +x pomo && \ + ./pomo -v + } elif [[ "$OSTYPE" == linux* ]] ; then { + curl -L -o pomo "$LINUX_TARBALL" && \ + echo "$LINUX_MD5 pomo" | md5sum -c - && \ + chmod +x pomo && \ + ./pomo -v + } else { + echo "cannot detect OS type" + return 1 + } + fi + echo "Pomo $POMO_VERSION installed, copy ./pomo to somewhere on your path." +} + +install_pomo diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..9dba7d6 --- /dev/null +++ b/install.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +POMO_VERSION="0.7.0" +OSX_MD5="4aa452e021d07bbb2c7c3a15839fe5df" +LINUX_MD5="84551ab258902e62d9d8e14368bfdf4b" +OSX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-darwin-amd64" +LINUX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-linux-amd64" + +install_pomo() { + echo "Installing Pomo..." + if [[ "$OSTYPE" == darwin* ]] ; then { + curl -L -o pomo "$OSX_TARBALL" && \ + [[ $(md5 -r pomo) == "$OSX_MD5" ]] && \ + chmod +x pomo && \ + ./pomo -v + } elif [[ "$OSTYPE" == linux* ]] ; then { + curl -L -o pomo "$LINUX_TARBALL" && \ + echo "$LINUX_MD5 pomo" | md5sum -c - && \ + chmod +x pomo && \ + ./pomo -v + } else { + echo "cannot detect OS type" + return 1 + } + fi + echo "Pomo $POMO_VERSION installed, copy ./pomo to somewhere on your path." +} + +install_pomo