Compare commits

...

1 Commits
0.3.2 ... main

Author SHA1 Message Date
Jonathan Bernard
68692bdc83 Update for Nim 0.18 2018-04-02 14:48:18 -05:00
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
import cliutils, docopt, json, logging, os, nre, random, sequtils, import cliutils, docopt, json, logging, os, nre, random, sequtils,
times, timeutils times, timeutils
from posix import SIGTERM, SIGHUP, signal, kill from posix import SIGTERM, SIGHUP, signal, kill, Pid
import strutils except toUpper import strutils except toUpper
from unicode import toUpper from unicode import toUpper
@ -11,7 +11,7 @@ type
DPConfig = tuple[planDir, dateFmt, pidfile, logfile, errfile: string, DPConfig = tuple[planDir, dateFmt, pidfile, logfile, errfile: string,
notificationSecs: int] notificationSecs: int]
const VERSION = "0.3.2" const VERSION = "0.3.3"
const NOTE_TITLE = "Daily Notifier v" & VERSION const NOTE_TITLE = "Daily Notifier v" & VERSION
const timeFmt = "HH:mm" const timeFmt = "HH:mm"
@ -205,7 +205,7 @@ Options:
info "daily_notifier: not running" info "daily_notifier: not running"
quit(QuitSuccess) quit(QuitSuccess)
let pid = parseInt(readFile(cfg.pidfile).strip) let pid: Pid = cast[Pid] (parseInt(readFile(cfg.pidfile).strip))
info "daily_notifier: Killing process " & $pid info "daily_notifier: Killing process " & $pid
if args["stop"]: discard kill(pid, SIGTERM) if args["stop"]: discard kill(pid, SIGTERM)

View File

@ -1,6 +1,6 @@
# Package # Package
version = "0.3.2" version = "0.3.3"
author = "Jonathan Bernard" author = "Jonathan Bernard"
description = "Little programs that reads my daily plan and notifies me of upcoming events." description = "Little programs that reads my daily plan and notifies me of upcoming events."
license = "MIT" license = "MIT"
@ -8,5 +8,5 @@ bin = @["daily_notifier", "deploy_plans_via_ftp"]
# Dependencies # Dependencies
requires @["nim >= 0.15.0", "docopt", "timeutils", "tempfile", "cliutils"] requires @["nim >= 0.18.0", "docopt", "timeutils", "tempfile", "cliutils"]