about summary refs log tree commit diff
path: root/scratch/groceries/export.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-06-27T13·06+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-06-27T13·06+0100
commit25a45fb222e42812132013b5ad8acc23ab04fb4c (patch)
treee72f14792f10a86ee1d0ea501b5a2d607bc39e55 /scratch/groceries/export.hs
parent362a31166d058b6ad6a7b44f8c52fe2436f0738e (diff)
Add export script for groceries
At this point, I may be taking this idea too far, but what the heck?
Diffstat (limited to 'scratch/groceries/export.hs')
-rw-r--r--scratch/groceries/export.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/scratch/groceries/export.hs b/scratch/groceries/export.hs
new file mode 100644
index 000000000000..5e2cce2237ee
--- /dev/null
+++ b/scratch/groceries/export.hs
@@ -0,0 +1,11 @@
+module Main where
+
+import Data.Function ((&))
+import qualified Data.List as L
+
+-- | Run this to export the grocery list.
+main :: IO ()
+main = do
+  x <- readFile "./list.txt"
+  x & lines & filter (not . L.isPrefixOf "- 0x") & unlines & putStrLn
+  pure ()