summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2017-05-31 15:35:05 +0200
committerFélix Sipma <felix.sipma@no-log.org>2017-05-31 15:35:05 +0200
commit2a1e14fd7b0ca68815a56037b6317ceaf650afa5 (patch)
tree0813d0dc1951d84a4708acedcadd351359622e30
parentcb64bf6838d53b6351070e73348660afb2eaa56f (diff)
add license information to vcard_uid_generator.hs
-rwxr-xr-xvcard_uid_generator.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcard_uid_generator.hs b/vcard_uid_generator.hs
index c2722b7..81a1e56 100755
--- a/vcard_uid_generator.hs
+++ b/vcard_uid_generator.hs
@@ -1,5 +1,11 @@
#!/usr/bin/env stack
-- stack --install-ghc runghc --package turtle
+{- vcard_uid_generator script
+ -
+ - Copyright 2017 Félix Sipma <felix.sipma@no-log.org>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
{-# LANGUAGE OverloadedStrings #-}
@@ -7,6 +13,7 @@ import Turtle
import qualified Control.Foldl as Fold
import Prelude hiding (FilePath)
+
parser :: Parser FilePath
parser = argPath "src" "source directory containing the VCARD files"
@@ -15,7 +22,7 @@ main = sh $ do
let contacts = inshell ("rg UID --files-without-match " <> format fp src) empty
file <- fromText . lineToText <$> contacts
lines <- fold (input file) Fold.list
- let (beginning, end) = splitAt 2 lines
+ let (beginning, end) = splitAt 2 lines -- arbitrary split file between lines 2 and 3
valrand <- rand
let b = select (beginning ++ [valrand] ++ end)
output file b