about summary refs log tree commit diff
path: root/users/wpcarro/scratch/groceries
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-13T22·51+0300
committerVincent Ambo <mail@tazj.in>2021-12-13T23·15+0300
commit019f8fd2113df4c5247c3969c60fd4f0e08f91f7 (patch)
tree76a857f61aa88f62a30e854651e8439db77fd0ea /users/wpcarro/scratch/groceries
parent464bbcb15c09813172c79820bcf526bb10cf4208 (diff)
parent6123e976928ca3d8d93f0b2006b10b5f659eb74d (diff)
subtree(users/wpcarro): docking briefcase at '24f5a642' r/3226
git-subtree-dir: users/wpcarro
git-subtree-mainline: 464bbcb15c09813172c79820bcf526bb10cf4208
git-subtree-split: 24f5a642af3aa1627bbff977f0a101907a02c69f
Change-Id: I6105b3762b79126b3488359c95978cadb3efa789
Diffstat (limited to 'users/wpcarro/scratch/groceries')
-rw-r--r--users/wpcarro/scratch/groceries/.envrc2
-rw-r--r--users/wpcarro/scratch/groceries/export.hs22
-rw-r--r--users/wpcarro/scratch/groceries/list.org112
-rw-r--r--users/wpcarro/scratch/groceries/shell.nix5
4 files changed, 141 insertions, 0 deletions
diff --git a/users/wpcarro/scratch/groceries/.envrc b/users/wpcarro/scratch/groceries/.envrc
new file mode 100644
index 000000000000..a4a62da526d3
--- /dev/null
+++ b/users/wpcarro/scratch/groceries/.envrc
@@ -0,0 +1,2 @@
+source_up
+use_nix
diff --git a/users/wpcarro/scratch/groceries/export.hs b/users/wpcarro/scratch/groceries/export.hs
new file mode 100644
index 000000000000..ed43c9a3e887
--- /dev/null
+++ b/users/wpcarro/scratch/groceries/export.hs
@@ -0,0 +1,22 @@
+module Main where
+
+import qualified Data.List as L
+
+(|>) :: a -> (a -> b) -> b
+x |> f = f x
+
+-- | Ignore items with zero quantity (i.e. "0x") and comments (i.e. "#")
+isUndesirableOutput :: String -> Bool
+isUndesirableOutput x =
+  (L.isPrefixOf "- 0x" x) || (L.isPrefixOf "#" x)
+
+-- | Run this to export the grocery list.
+main :: IO ()
+main = do
+  content <- readFile "./list.org"
+  content
+    |> lines
+    |> filter (not . isUndesirableOutput)
+    |> unlines
+    |> putStrLn
+  pure ()
diff --git a/users/wpcarro/scratch/groceries/list.org b/users/wpcarro/scratch/groceries/list.org
new file mode 100644
index 000000000000..a823b2a8ebc3
--- /dev/null
+++ b/users/wpcarro/scratch/groceries/list.org
@@ -0,0 +1,112 @@
+# The sections are sorted such that the first section is likely the first area
+# in the grocery store you'll encounter.
+#
+# This version is written for Tesco Metro in London Bridge.
+* Beer
+- 0x beer (6x)
+* Bread
+- 0x GF bread
+- 0x flour
+- 0x GF flour
+* Produce
+- 0x brocoli
+- 0x green beans
+- 0x green asparagus
+- 2x spinach greens
+- 0x romaine lettuce head
+- 0x tomatoes
+- 0x zucchini
+- 0x lemons
+- 1x limes
+- 0x large carrot
+- 2x garlic
+- 1x green onions
+- 0x onions
+- 0x avocado
+- 0x basil plant
+- 0x jalapeno
+- 0x red pepper
+- 0x green pepper
+- 0x cherry tomatoes
+- 0x potato
+- 0x bag dry black beans
+- 1x Scotch Bonnet pepper
+* Spices
+- 0x onion powder
+- 0x garlic powder
+- 0x chicken bouillon
+- 0x oregano
+- 0x red pepper flakes
+- 0x basil plant
+- 0x cilantro plant
+* Meat
+- 0x sausages
+- 0x steak
+- 0x chicken breasts
+- 0x chicken legs
+- 0x lamb
+- 0x ground beef
+* Frozen
+- 0x Salmon
+- 0x white fish
+- 0x shrimp
+- 0x bag green beans
+- 1x bag peas
+- 0x bag corn
+* Dairy
+- 1x unsalted butter
+- 0x coconut milk
+- 2x egg cartons (12x each)
+- 2x sour cream
+- 0x cheddar cheese
+- 0x parmesan
+- 0x gouda
+- 0x random cheese
+* Pasta
+- 0x box of quinoa
+- 0x box of rice
+- 1x GF pasta
+- 0x tortellini / ravioli
+- 0x tomato sauce
+- 0x tomato paste
+- 0x can diced tomatoes
+- 0x pesto
+* Oil
+- 0x olive oil
+- 0x sesame oil
+- 0x avocado oil
+- 0x coconut oil
+- 0x white wine vinegar
+* Condiments
+- 0x red Tabasco
+- 0x green Tabasco
+- 0x habanero Tabasco
+- 0x BBQ sauce
+- 0x french mustard
+- 0x ketchup
+- 0x oyster sauce
+- 0x soy sauce
+- 0x Srirachi sauce
+* Nuts
+- 0x almonds
+- 0x walnuts
+- 0x peanuts
+- 0x cashews
+- 0x Brazil nuts
+- 0x mixed nuts
+- 0x peanuts
+- 2x peanut butter
+* Sugar
+- 0x Lindt chocolate
+* Asian
+- 0x red curry
+- 0x green curry
+- 0x coconut cream
+* Wine
+- 0x red wine
+- 0x white wine
+* Miscellaneous
+- 0x coffee beans
+- 0x tea
+- 0x AA batteries
+- 0x rubbing alcohol
diff --git a/users/wpcarro/scratch/groceries/shell.nix b/users/wpcarro/scratch/groceries/shell.nix
new file mode 100644
index 000000000000..4d5b412a0884
--- /dev/null
+++ b/users/wpcarro/scratch/groceries/shell.nix
@@ -0,0 +1,5 @@
+let
+  briefcase = import <briefcase> {};
+in briefcase.buildHaskell.shell {
+  deps = hpkgs: [];
+}