The Villefort package

[ Tags: bsd3, library, program, web ] [ Propose Tags ]

Villefort is a browser based time tracker.

[Skip to Readme]


Dependencies base (>=4.7 && <5), bytestring, directory, filepath, HDBC (>=2.4.0 && <2.5), HDBC-sqlite3 (>=2.3.3 && <2.4), mtl (>=2.2.1 && <2.3), process, random, scotty (>=0.11.0 && <0.12), split (>=0.2.3 && <0.3), strict, text, time (>=1.6.0 && <1.7), transformers, unix, Villefort [details]
License BSD3
Copyright 2017 Chris Reuter
Author Chris Reuter
Category Web
Home page
Source repository head: git clone
Uploaded Mon Oct 23 01:25:27 UTC 2017 by ChrisReuter
Distributions NixOS:
Executables Villefort
Downloads 1024 total (101 in the last 30 days)
Rating 2.0 (1 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-10-23 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for Villefort-

[back to package description]


Villefort is a time managment system written in Haskell.

Version 1.2.1

  • generally cleaned up code base
  • made daily into the IO monad so it matches the weekly tasks default config

Home screen

alt text

Add new todos

alt text

Stats page

alt text

To install

  1. Install cabal (
  2. In terminal or command prompt run cabal install Villefort.
  3. and then cabal run Villefort.
  4. You will be able to see the homescreen 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
import Villefort.Definitions
import System.Random
import System.IO.Strict as S

main :: IO ()
main = villefort def {
  daily = [floss,
           calendar ],
  weekly = defWeekly {
    monday = [more,
    tuesday = [dailyRef],
    wednesday = [more,
    thursday  = [dailyRef],
    friday = [more,
    showDatabase = True

floss    = pure ["","floss","wellness"]
calendar = pure ["","check calendar","admin"]
scan     = pure ["scan class notes","scan","admin"] 
dailyRef = pure ["write a daily reflection on each class","reflect","admin"]

more = do
  z <- S.readFile  "/home/chris/.villefort/push"  -- readfile to get # push ups
  let num = read z :: Double
  writeFile "/home/chris/.villefort/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))

Then run Villefort --recompile the next time you run villefort it will run with your configuration. The default configuration is located here

How to copy data between versions of Villefort.

Install the new version through cabal Navigate to ~/.cabal Navigate to share/ Navigate into your architecture folder mines x86_64-linux-ghc-7.10.3 You should now see different versions of Villefort Villefort- |-- data/ | |-- date | |-- day | |-- todo.db |-- templates/ |-- js.js Villefort- |-- data/ | |-- date | |-- day | |-- todo.db |-- templates/ |-- js.js Just copy the data/todo.db from the old version into data/todo.db of the new version. Then remember to rebuild Villefort if you have a custom build. Villefort --recompile