MyNixOS website logo
Description

Villefort is a task manager and time tracker.

Villefort is a web based time tracker built around a portable sqlite3 database.

Villefort

Villefort is a time management system written in Haskell.

Version 1.2.19

json api

added json api to get current active tasks and to time completed today.

alice$ curl localhost:3002/tasks
[{"subject":"cs","due":"2019-04-28","rid":177,"time":0,"title":"cs lab","dueIn":0,"description":""},{"subject":"bio","due":"2019-04-30","rid":176,"time":0,"title":"bio hw","dueIn":2,"description":""},{"subject":"probality","due":"2019-05-01","rid":178,"time":0,"title":"probability hw","dueIn":3,"description":""}]
alice$ curl localhost:3002/done
[{"subject":"bio","time":30,"title":"bio hw"}]

default config

Home screen

alt text

Add new todos

alt text

Stats page

alt text

usage: Villefort [options] 
  options:
    -r, --recompile     recompiles Villefort using a custom config file found in ~/.villefort/villefort.hs
    -h,                 prints this help manual

To install

  1. Install cabal (https://www.haskell.org/platform/)
  2. In terminal or command prompt run cabal install Villefort.
  3. and then cabal run Villefort.
  4. You will be able to see the home screen by typing localhost:3002 into your favorite browser.

Configure your villefort

create a custom main method in ~.villefort/villefort.hs. Below is an example.

module Main where

import Villefort.Server
import Villefort.Config
import Villefort.Definitions
import System.Random
import System.IO.Strict as S

main :: IO ()
main = villefort def {
  daily = [calendar ],
  weekly = defWeekly {
    monday = [push],
    wednesday = [push],
    friday = [push,
              scan]
 
    }
 }
 
--              description, heading, subject
calendar = pure ["","check calendar","admin"]
scan     = pure ["scan notes","scan","admin"] 

-- | generate increasing sets of push ups
push = do
  rawNum <- S.readFile "push"  -- readfile to get # push ups
  let num = read rawNum :: Double
  writeFile "push" (show (num+0.3))
  sets <- pushUps num
  return $ [show sets,"push ups","fit"]

pushUps level = do
  dubs <-  mapM gen $ replicate 5 level :: IO [Double]
  return $ map floor dubs
  where gen x =  randomRIO (x-(x/3),x+(x/3))
 

Use Villefort --recompile to recompile Villefort with your custom config. Recompilation requires ghc to be in your $PATH. The next time you run villefort it will run with your custom config. The default Config is found in Villefort.Config.

How to copy data between versions of Villefort.

All of Villefort's state is stored in todo.db to upgrade just install the new version and copy over the database. Remember to rebuild Villefort so that your custom build uses the new version of Villefort.

  1. Install the new version through cabal.
  2. Navigate to ~/.cabal .
  3. Navigate to share/ .
  4. Navigate into your architecture folder mine is x86_64-linux-ghc-7.10.3.
  5. You should now see different versions of Villefort.

Villefort-0.1.2.12/

    |-- data/
    |   |-- date
    |   |-- day
    |   |-- todo.db
    |-- templates/
    |-- js.js

Villefort-0.1.2.13/

	|-- data/
	|   |-- date
	|   |-- day
	|   |-- todo.db
	|-- templates/
	|-- js.js
Metadata

Version

0.1.2.19

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows