mirror of
https://github.com/KevinMidboe/brewPi.git
synced 2025-10-29 16:50:12 +00:00
Brew: Amundsen hazyday hero (#6)
* New brew: amundsen hazyday hero * Helper script for adding new brews
This commit is contained in:
24
add_brew.sh
Normal file
24
add_brew.sh
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
brewFile=src/brews.json
|
||||||
|
|
||||||
|
date=$(date +%s)
|
||||||
|
|
||||||
|
# Ask the user for login details
|
||||||
|
read -p 'Name: ' name
|
||||||
|
read -p 'Brewery: ' brewery
|
||||||
|
read -p 'Category: ' category
|
||||||
|
read -p 'By: ' by
|
||||||
|
read -p 'Abv: ' abv
|
||||||
|
read -p 'Description: ' description
|
||||||
|
read -p 'Image filename: ' image
|
||||||
|
read -p 'Recipe url: ' recipe
|
||||||
|
read -p 'Order page url: ' orderPage
|
||||||
|
read -p 'Untapped url: ' untapped
|
||||||
|
read -p 'Primary color: ' colorPrimary
|
||||||
|
|
||||||
|
brew="{\"beer\":{\"name\":\"$name\",\"brewery\":\"$brewery\",\"category\":\"$category\"},\"date\":\"$date\",\"by\":\"$by\",\"abv\":\"$abv\",\"description\":\"$description\",\"image\":\"$image\",\"recipe\":\"$recipe\",\"order_page\":\"$orderPage\",\"untapped\":\"$untapped\",\"color_primary\":\"$colorPrimary\",\"secondary_color\":\"$colorSecondary\"}"
|
||||||
|
|
||||||
|
echo $(cat $brewFile | jq ".brews |= [$brew] + .") > $brewFile
|
||||||
|
|
||||||
|
echo "Brew $name added to $brewFile successfully!"
|
||||||
@@ -1,4 +1,22 @@
|
|||||||
[
|
{
|
||||||
|
"brews": [
|
||||||
|
{
|
||||||
|
"beer": {
|
||||||
|
"name": "Hazyday Hero",
|
||||||
|
"brewery": "Amundsen",
|
||||||
|
"category": "Hazy Session IPA"
|
||||||
|
},
|
||||||
|
"date": "1687631876",
|
||||||
|
"by": ["Andreas", "Ingvild", "Kevin"],
|
||||||
|
"abv": "4.2",
|
||||||
|
"description": "Bright aromas of orange peel and assorted citrus dominate, with floral undertones. Light bodied, but round and smooth. Flavours of orange and grapefruit juice backed by sweet sherbet. A soft palate makes for an easy drinking session IPA.",
|
||||||
|
"image": "amundsen_hazyday-hero.jpg",
|
||||||
|
"recipe": "https://www.dropbox.com/s/a5xl975lhflvspn/Hazyday%20Hero%2025ltr.pdf?dl=0",
|
||||||
|
"order_page": "https://www.hopstore.no/products/amundsen-everyday-hero-25l-olsett",
|
||||||
|
"untapped": "https://untappd.com/b/amundsen-brewery-hazyday-hero/4780922",
|
||||||
|
"color_primary": "#7AC49F",
|
||||||
|
"secondary_color": "rgba(122, 196, 159, 0.2)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"beer": {
|
"beer": {
|
||||||
"name": "Kveldsbris",
|
"name": "Kveldsbris",
|
||||||
@@ -108,3 +126,4 @@
|
|||||||
"color_secondary": "rgba(108, 141, 158, 0.2)"
|
"color_secondary": "rgba(108, 141, 158, 0.2)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
let loadedTime: number = new Date().getTime();
|
let loadedTime: number = new Date().getTime();
|
||||||
let currentTime: number = new Date().getTime();
|
let currentTime: number = new Date().getTime();
|
||||||
let autoReload = false;
|
let autoReload = false;
|
||||||
const currentGoal = 4;
|
const currentGoal = 18.5;
|
||||||
|
|
||||||
function updateTime() {
|
function updateTime() {
|
||||||
currentTime = new Date().getTime();
|
currentTime = new Date().getTime();
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ import brews from '../../brews.json';
|
|||||||
import type { PageServerLoad } from './$types';
|
import type { PageServerLoad } from './$types';
|
||||||
|
|
||||||
export const load: PageServerLoad = async () => {
|
export const load: PageServerLoad = async () => {
|
||||||
return { brews };
|
return { brews: brews.brews };
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ async function fetchGraphData(brew) {
|
|||||||
|
|
||||||
export const load = (async ({ params }) => {
|
export const load = (async ({ params }) => {
|
||||||
const { date } = params;
|
const { date } = params;
|
||||||
const brew = brews.find((b) => b?.date === date);
|
const brew = brews.brews.find((b) => b?.date === date);
|
||||||
|
|
||||||
if (!brew) {
|
if (!brew) {
|
||||||
throw error(404, 'Brew not found');
|
throw error(404, 'Brew not found');
|
||||||
|
|||||||
BIN
static/images/amundsen_hazyday-hero.jpg
Normal file
BIN
static/images/amundsen_hazyday-hero.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 572 KiB |
Reference in New Issue
Block a user