Villefort 0.1.1.5 → 0.1.1.6
raw patch · 8 files changed
+39/−13 lines, 8 filesdep −FindBinPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependencies removed: FindBin
API changes (from Hackage documentation)
+ Villefort.Summary: f :: [[String]] -> Int
Files
- README.md +31/−5
- Villefort.cabal +1/−2
- src/Villefort/Config.hs +0/−1
- src/Villefort/Database.hs +0/−1
- src/Villefort/Server.hs +0/−1
- src/Villefort/Stats.hs +2/−1
- src/Villefort/Summary.hs +4/−1
- src/Villefort/Todo.hs +1/−1
README.md view
@@ -1,12 +1,38 @@ # Villefort Villefort is a time managment system written in Haskell. -## Now with xmonad style configuration! -You can Configure --- the port --- daily tasks --- tasks to run on certain days of the week. +## Version 1.1.6 +Now has +-- accurate due rankings +-- total on today page +## 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 the two versions of Villefort + +Villefort-0.1.1.0/ +|-- data/ +| |-- date +| |-- day +| |-- todo.db +|-- templates/ +|-- js.js + +Villefort-0.1.1.1/ +|-- 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. + +## Configure your villefort create a custom main method in ~.villefort/villefort.hs example ```haskell
Villefort.cabal view
@@ -1,5 +1,5 @@ name: Villefort-version: 0.1.1.5+version: 0.1.1.6 synopsis: Villefort is a task manager and time tracker written in haskell. description: Villefort is a browser based time tracker. homepage: https://github.com/Chrisr850/Villefort#readme@@ -41,7 +41,6 @@ , HDBC-sqlite3 >= 2.3.3 && < 2.4 , split >= 0.2.3 && < 0.3 , time >= 1.6.0 && < 1.7- , FindBin >= 0.0.5 && < 0.1 , mtl >= 2.2.1 && < 2.3 , random , process
src/Villefort/Config.hs view
@@ -1,7 +1,6 @@ module Villefort.Config where import System.Process-import System.Environment.FindBin import Villefort.Definitions import Villefort.Database def = VConfig {
src/Villefort/Database.hs view
@@ -6,7 +6,6 @@ import Database.HDBC.Sqlite3 import Database.HDBC import Data.List.Split-import System.Environment.FindBin import System.Environment import Paths_Villefort import Villefort.Definitions
src/Villefort/Server.hs view
@@ -20,7 +20,6 @@ import System.Environment import Control.Monad import Control.Monad.Reader-import System.Environment.FindBin import System.Process import System.Directory import System.FilePath
src/Villefort/Stats.hs view
@@ -17,7 +17,8 @@ -- | Generate Table makeTable ::[String] -> [[String]] -> String-makeTable tableData stats = "<table class='table' style='width:100%'> " ++ "<thead class='thead-inverse'>" ++ ( makeRow tableData) ++ "</thead>" ++ (mconcat (map makeRow stats)) ++ "</table>"+makeTable tableData stats = "<table class='table' style='width:100%'> " ++ "<thead class='thead-inverse'>" ++ ( makeRow tableData) ++ "</thead>" ++ (mconcat (map makeRow stats)) ++ "</table>"+ -- | Generate stats genStats :: (MonadReader VConfig m, MonadIO m) => m String
src/Villefort/Summary.hs view
@@ -6,10 +6,13 @@ import Villefort.Stats import Villefort.Definitions +f :: [[String]] -> Int+f x = sum $ map (\x -> read $ x !! 1 :: Int) x getSummary :: (MonadReader VConfig m, MonadIO m) => m String getSummary = do dat <- getDone header <- liftIO $ getHeader- return ( header ++ (makeTable ["Subject","Time"] dat))+ return ( header ++ (makeTable ["Subject","Time"] $ dat ++ [["Total", show$ f dat]]))+ --2017-07-26
src/Villefort/Todo.hs view
@@ -26,7 +26,7 @@ qetTasks' :: (MonadReader VConfig m, MonadIO m) => m [Row] qetTasks' = do- x <- makeQuery' "select id, Title, Description, Due, Subject, sum(time),pred from todo where state=1 group by id order by id"+ x <- makeQuery' "select id, Title, Description, Due, Subject, sum(time),pred from todo where state=1 group by Due order by Due" return (map toRow x) convRow' :: [[SqlValue]] -> [[String]]