diff options
author | William Carroll <wpcarro@gmail.com> | 2020-06-27T13·06+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-06-27T13·06+0100 |
commit | 25a45fb222e42812132013b5ad8acc23ab04fb4c (patch) | |
tree | e72f14792f10a86ee1d0ea501b5a2d607bc39e55 | |
parent | 362a31166d058b6ad6a7b44f8c52fe2436f0738e (diff) |
Add export script for groceries
At this point, I may be taking this idea too far, but what the heck?
-rw-r--r-- | scratch/groceries.txt | 43 | ||||
-rw-r--r-- | scratch/groceries/export.hs | 11 | ||||
-rw-r--r-- | scratch/groceries/list.txt | 50 | ||||
-rw-r--r-- | scratch/groceries/shell.nix | 8 |
4 files changed, 69 insertions, 43 deletions
diff --git a/scratch/groceries.txt b/scratch/groceries.txt deleted file mode 100644 index 78cc90b9106a..000000000000 --- a/scratch/groceries.txt +++ /dev/null @@ -1,43 +0,0 @@ -- 1x coconut milk -- 5x tortellini -- 1x coconut oil -- 1x sour cream -- 1x jar Weiner Wurstel -- 1x Ketchup -- 1x Ketchup -- 2x red wine -- 3x white wine -- 1x bacon bits -- 2x brocoli -- 1x olive oil -- 3x egg cartons (10x each) -- 2x butter -- 1x flour -- 1x bratwurst (4x) -- 2x Tabasco -- 1x parmesan -- 1x almonds -- need more -- 1x walnuts -- 1x lettuce -- 1x fleischwurst -- 1x GF bread -- 1x gouda -- need more -- 1x tomatoes -- 1x shallots (10x) -- 1x garlic -- 1x ham for asparagus -- 1x pilsner beer (6x) -- 1x basil plant -- 1x bleu cheese -- 1x senf -- 1x zucchini -- 1x lemons (3x) -- need more -- 2x coffee -- 1x coffee filters -- 2x tomato sauce -- 2x avocado -- 1x pesto -- 1x linguini pasta -- 1x green beans -- 1x white asparagus (10x) -- 1x hollandaise sauce 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 () diff --git a/scratch/groceries/list.txt b/scratch/groceries/list.txt new file mode 100644 index 000000000000..0db547d95423 --- /dev/null +++ b/scratch/groceries/list.txt @@ -0,0 +1,50 @@ +- 0x coconut milk +- 4x tortellini / ravioli +- 0x coconut oil +- 1x sour cream +- 0x jar Weiner Wurstel +- 0x Ketchup +- 0x red wine +- 2x white wine +- 1x bacon bits +- 1x brocoli +- 1x spagel (10x) +- 1x green asparagus +- 0x olive oil +- 1x egg cartons (10x each) +- 0x butter +- 0x flour +- 1x bratwurst (4x) +- 0x Tabasco +- 1x parmesan +- 2x almonds +- 0x walnuts +- 1x lettuce +- 1x fleischwurst +- 0x GF bread +- 2x gouda +- 1x mystery cheese +- 1x tomatoes +- 0x shallots (10x) +- 0x garlic +- 0x ham for asparagus +- 1x beer (6x) +- 0x basil plant +- 0x senf +- 0x zucchini +- 3x lemons (3x) +- 0x coffee +- 0x coffee filters +- 0x tomato sauce +- 0x avocado +- 0x pesto +- 0x linguini pasta +- 0x green beans +- 0x hollandaise sauce +- 1x bug spray +- 1x 30 SPF sun screen +- 1x tiki torch +- 1x dish soap +- 1x paper towels (6x) +- 1x Brita +- 1x Lindt chocolate diff --git a/scratch/groceries/shell.nix b/scratch/groceries/shell.nix new file mode 100644 index 000000000000..c62b86e12832 --- /dev/null +++ b/scratch/groceries/shell.nix @@ -0,0 +1,8 @@ +let + pkgs = import <unstable> {}; +in pkgs.mkShell { + buildInputs = with pkgs; [ + (haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [ + ])) + ]; +} |