aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO3
-rw-r--r--Makefile6
-rw-r--r--PKGBUILD4
-rw-r--r--README.md14
-rw-r--r--rc4.c5
-rw-r--r--tick.14
6 files changed, 26 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ad99102e6bc9..0b2d4c5ead06 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,13 @@
pkgbase = tick
pkgdesc = Command line stock and cryptocurrency portfolio tracker.
- pkgver = 1.7.2
+ pkgver = 1.7.3
pkgrel = 1
url = https://github.com/aokellermann/tick
arch = x86_64
license = MIT
depends = curl
depends = json-c
+ depends = ncurses
provides = tick
conflicts = tick
source = git://github.com/aokellermann/tick
diff --git a/Makefile b/Makefile
index ffb7da6f136d..43e769318fe6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
CC = gcc
-CFLAGS = -g -Wall --std=c99 -D_FORTIFY_SOURCE=2 -O2
-OBJECTS = main.o api.o portfolio.o
-LIBS = -lcurl -ljson-c -lm
+CFLAGS = -g -Wall --std=c99 -D_FORTIFY_SOURCE=2 -O2 -Wshadow -Wpointer-arith
+OBJECTS = main.o api.o portfolio.o rc4.o
+LIBS = -lcurl -ljson-c -lm -lncurses
BIN = tick
DESTDIR = /usr
diff --git a/PKGBUILD b/PKGBUILD
index 41724ca628d8..61a2bcda21db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Maintainer: Antony Kellermann <aokellermann@gmail.com>
pkgname=tick
-pkgver=1.7.2
+pkgver=1.7.3
pkgrel=1
pkgdesc="Command line stock and cryptocurrency portfolio tracker."
arch=('x86_64')
url="https://github.com/aokellermann/${pkgname}"
license=('MIT')
-depends=('curl' 'json-c')
+depends=('curl' 'json-c' 'ncurses')
provides=("${pkgname}")
conflicts=("${pkgname}")
source=("git://github.com/aokellermann/${pkgname}")
diff --git a/README.md b/README.md
index d2a7cf6e00ff..38c73dc7a05d 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,16 @@ in JSON. To convert your existing portfolio, run
```bash
$ tick convert
```
+
+You may encrypt your portfolio using the RC4 algorithm
+```bash
+$ tick encrypt
+```
+and decrypt it with
+```bash
+$ tick decrypt
+```
+
Once installed, you may read the man page for more information.
#### License
@@ -71,7 +81,7 @@ license for more information.
* Different ways to sort "check all"
* Look for API to replace Morningstar for MUTF/OTCMKTS data, preferably with
intraday data
-* Encrypt data (rc4 from my github?)
* DEB/RPM package
* List whether stock/etf/mutual fund/crypto/etc. in portfolio for less API calls
-and portfolio distribution (tried to implement, but IEX API is unpredictable; wait for v2) \ No newline at end of file
+and portfolio distribution (tried to implement, but IEX API is unpredictable; wait for v2)
+* Make printouts pretty with ncurses?? \ No newline at end of file
diff --git a/rc4.c b/rc4.c
index 19cbb82fd216..1b9bcf8f4bde 100644
--- a/rc4.c
+++ b/rc4.c
@@ -10,14 +10,14 @@ char* rc4_getPassword() {
noecho(); // Doesn't echo chars when typed
unsigned int c, i;
do {
- printw("Enter Password: ");
+ printw("Enter Password (32 character max): ");
memset(pass, '\0', PASS_MAX + 1);
i = 0, c = 0;
while (c != '\n' && (c = (unsigned) getch())) {
if (c != BACKSPACE) {
pass[i] = (char) c;
i++;
- if (i > PASS_MAX) {
+ if (i > PASS_MAX) { // Breaks loop if more than max
c = '\n';
printw("\n");
}
@@ -25,6 +25,7 @@ char* rc4_getPassword() {
pass[i - 1] = '\0';
}
} while (i > PASS_MAX);
+ clear();
endwin();
return (char*) pass;
}
diff --git a/tick.1 b/tick.1
index fa70af8e0bcc..99fa8c76c205 100644
--- a/tick.1
+++ b/tick.1
@@ -35,6 +35,10 @@ thing as 'tick check all'.
If it exists, removes $HOME/.tick_portfolio.json and adds your current holding from the legacy portfolio, located at
$HOME/.tick_portfolio.
+.TP
+[encrypt/decrypt]
+Encrypts or decrypts your portfolio using the RC4 algorithm. Password must be 32 characters or less.
+
.SS
News: