documentation

This commit is contained in:
Hayden 2020-12-24 19:32:49 -09:00
parent beed8576c2
commit e5304f0589
24 changed files with 119 additions and 132 deletions

View file

@ -1,78 +0,0 @@
# Mealie Development Notes
[toc]
## Feature List (TODOs)
### Frontend Tasks
- [x] Fix Menu Links
- [ ] 404 Page
- [x] Refactor API / Split Code
- [ ] Form Validation
- [x] Admin
- [x] Backups
- [x] Themes
- [ ] Recipe Viewer
- [ ] notes Hidden/Not Hidden
- [ ] Total Time Indicator
- [ ] BakeTime
- [x] Proper Response Handling
- [x] Recipe Created URL Feedback
- [x] Recipe Deleted
- [x] Backup Creation
- [x] Backup Deleted
- [x] Meal Plan
- [x] Empty Response Bug
- [x] Breakup Vue Componenets for Reusability
- [x] Meal Cards
- [x] Editor Button
- [x] Recipe Editor
- [x] New Recipe File Upload
- [x] Bulk Import for Ingredients / Instructions
- [x] Meal Plan
- [x] Creator
- [x] UI
- [x] Requests / Response
- [x] Timeline
- [x] View
- [x] Delete
- [x] Edit Existing
- [x] Random Meal Generator
- [x] Whats For Dinner Page
- [x] Current Meal Plan
- [ ] Include Lunch / Dinner / Breaksfast Categories Option
- [x] Admin Settings
- [x] Site Settings
- [x] Webhooks
- [x] Dark Mode - Cookies
- [x] Color Themes - Cookies
### Backend Tasks
- [x] Proper Response Handling
- [ ] Backup Options
- [ ] Force Update
- [ ] Rebuild
- [ ] Meal Planner
- [x] Scheduler
- [x] Webhooks
- [ ] Recipe Data
- [ ] Better Scraper
- [ ] Image Minification
- [ ] Scraper Data Validation
- [ ] Category Management
- Lunch / Dinner / Breakfast <- Meal Generation
- Dessert / Side / Appetizer / Bread / Drinks /
## v1.0 Roadmad
Frontend
- [ ] Login / Logout Navigation
- [ ] Initial Page
- [ ] Logic / Function Calls
Backend
- [ ] User Setup
- [ ] Authentication
- [ ] Default Admin/Superuser Account
- [ ] User Accounts
- [ ] Edit / Delete Lock

View file

@ -1,7 +1,7 @@
# Meal Planner
## Working with Meal Plans
In Mealie you can create a mealplan based off the calendar inputs on the meal planner page. There is no limit to how long or how short a meal plan is. You may also create duplicate meal plans for the same date range. After selecting your date range, click on the card for each day and seach through recipes to find your choice. After selecting a recipe for all meals save the plan.
In Mealie you can create a mealplan based off the calendar inputs on the meal planner page. There is no limit to how long or how short a meal plan is. You may also create duplicate meal plans for the same date range. After selecting your date range, click on the card for each day and seach through recipes to find your choice. After selecting a recipe for all meals save the plan. You can also randomly generate meal plans.
To edit the meal in a meal plan simply select the edit button on the card in the timeline. Similiarly, to delete a mealplan click the delete button on the card in the timeline. Currently there is no support to change the date range in a meal plan.

View file

@ -1,10 +1,15 @@
# Admin Panel
# Site Settings Panel
!!! danger
As this is still a **BETA** It is reccomended that you backup your data often and store in more than one place. Adhear to backup best practies with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup)
### Theme Settings
![](img/admin-theme.png)
## Theme Settings
Color themes can be created and set from the UI in the settings page. You can select an existing color theme or create a new one. On creation of a new color theme random colors will first be generated, then you can select and save as you'd like. By default the "default" theme will be loaded for all new users visiting the site. All created color themes are avaiable to all users of the site. Seperate color themes can be set for both Light and Dark modes.
![](gifs/theme-demo.gif)
!!! note
Theme data is stored in cookies in the browser. Calling "Save Theme" will refresh the cookie with the selected theme as well save the theme to the database.
## Backup and Export
@ -17,10 +22,6 @@ To import a backup it must be in your backups folder. If it is in the backup fol
![](img/admin-backup.png)
## Meal Planner Webhooks
In the webhooks section you can find a list of all your endpoint URLs that are used as part of the meal planner
Meal planner webhooks are post requests sent from Mealie to an external endpoint. The body of the message is the Recipe JSON of the scheduled meal. If no meal is schedule, no request is sent. The webhook functionality can be enabled or disabled as well as scheduled. Note that you must "Save Webhooks" prior to any changes taking affect serverside.
![](img/admin-webhooks.png)
## SFTP Settings - Target Release 1.0
## User Settings - Target Release 1.0

View file

@ -0,0 +1,55 @@
# Development Road Map
Feature placement is not set in stone. This is much more of a guideline than anything else.
## v1.0 Roadmad
### Frontend
- [ ] Login / Logout Navigation
* [ ] Initial Page
* [ ] Logic / Function Calls
* [ ] Password Reset
### Backend
- [ ] User Setup
* [ ] Authentication
* [ ] Default Admin/Superuser Account
* [ ] Password Reset
* [ ] User Accounts
* [ ] Edit / Delete
## v0.2.0
### Front End
- [ ] Recipe Editor
* [ ] Basic Form Validation
- [ ] Recipe Viewer
* [ ] Print Page View - Like King Arthur Website
* [ ] Notes Hidden/Not Hidden
* [ ] Total Time Indicator
* [ ] Bake Time
### Backend
## v0.1.0 - Initial Release
## Frontend Tasks
- [ ] General
* [ ] Recipe Category Handling
- [x] Meal Plan
* [ ] Include Lunch / Dinner / Breaksfast Categories Option
### Backend Tasks
- [ ] Backup Options
* [ ] Force Update
* [ ] Rebuild
- [ ] Recipe Data
* [ ] Better Scraper
* [ ] Image Minification
* [ ] Scraper Data Validation
- [ ] Category Management
* [ ] Lunch / Dinner / Breakfast <- Meal Generation
* [ ] Dessert / Side / Appetizer / Bread / Drinks /

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -6,8 +6,11 @@ theme:
features:
- navigation.instant
markdown_extensions:
- def_list
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.tasklist:
custom_checkbox: true
- admonition
extra_css:
- stylesheets/custom.css

View file

@ -20,11 +20,11 @@
</v-dialog>
<v-speed-dial v-model="fab" fixed right bottom open-on-hover>
<template v-slot:activator>
<v-btn v-model="fab" color="secondary" dark fab @click="navCreate">
<v-btn v-model="fab" color="accent" dark fab @click="navCreate">
<v-icon> mdi-plus </v-icon>
</v-btn>
</template>
<v-btn fab dark small color="success" @click="addRecipe = true">
<v-btn fab dark small color="primary" @click="addRecipe = true">
<v-icon>mdi-link</v-icon>
</v-btn>
</v-speed-dial>

View file

@ -1,6 +1,8 @@
<template>
<v-card :loading="backupLoading" class="mt-3">
<v-card-title class="card-title"> Backup and Exports </v-card-title>
<v-card-title class="secondary white--text">
Backup and Exports
</v-card-title>
<v-card-text>
<p>
Backups are exported in standard JSON format along with all the images

View file

@ -1,6 +1,6 @@
<template>
<v-card>
<v-card-title class="card-title mt-1"> Theme Settings </v-card-title>
<v-card-title class="secondary white--text"> Theme Settings </v-card-title>
<v-card-text>
<p>
Select a theme from the dropdown or create a new theme. Note that the
@ -44,15 +44,15 @@
<v-col>
<ColorPicker button-text="Primary" v-model="activeTheme.primary" />
</v-col>
<v-col>
<ColorPicker button-text="Accent" v-model="activeTheme.accent" />
</v-col>
<v-col>
<ColorPicker
button-text="Secondary"
v-model="activeTheme.secondary"
/>
</v-col>
<v-col>
<ColorPicker button-text="Accent" v-model="activeTheme.accent" />
</v-col>
<v-col>
<ColorPicker button-text="Success" v-model="activeTheme.success" />
</v-col>

View file

@ -1,6 +1,8 @@
<template>
<v-card>
<v-card-title class="card-title mt-1"> Meal Planner Webhooks </v-card-title>
<v-card-title class="secondary white--text mt-1">
Meal Planner Webhooks
</v-card-title>
<v-card-text>
<p>
The URLs listed below will recieve webhooks containing the recipe data

View file

@ -1,6 +1,6 @@
<template>
<v-card>
<v-card-title class="accent white--text"> Edit Meal Plan </v-card-title>
<v-card-title class="secondary white--text"> Edit Meal Plan </v-card-title>
<v-card-text> </v-card-text>
<v-card-text>
@ -32,7 +32,6 @@ export default {
return utils.getDateAsPythonDate(dateObject);
},
async update() {
this.process();
await api.mealPlans.update(this.mealPlan.uid, this.mealPlan);
this.$emit("updated");
},

View file

@ -8,24 +8,24 @@
<NewMeal v-else @created="requestMeals" />
<v-card class="my-1">
<v-card-title class="accent white--text"> Meal Plans </v-card-title>
<v-card-title class="secondary white--text"> Meal Plans </v-card-title>
<v-timeline align-top :dense="$vuetify.breakpoint.smAndDown">
<v-timeline-item
class="px-1"
class="mx-4"
v-for="(mealplan, i) in plannedMeals"
:key="i"
color="accent lighten-2"
icon="mdi-silverware-variant"
fill-dot
>
<v-card color="accent lighten-2" dark>
<v-card-title class="title">
<v-card>
<v-card-title class="white--text secondary lighten-1">
{{ formatDate(mealplan.startDate) }} -
{{ formatDate(mealplan.endDate) }}
</v-card-title>
<v-card-text class="white text--primary">
<v-card-text>
<v-row dense align="center">
<v-col></v-col>
<v-col
@ -42,22 +42,24 @@
</v-col>
<v-col></v-col>
</v-row>
<v-btn
color="accent lighten-2"
class="mx-0"
outlined
@click="editPlan(mealplan.uid)"
>
Edit
</v-btn>
<v-btn
color="error lighten-2"
class="mx-2"
outlined
@click="deletePlan(mealplan.uid)"
>
Delete
</v-btn>
<v-row class="mt-2 ml-1">
<v-btn
color="accent lighten-2"
class="mx-0"
text
@click="editPlan(mealplan.uid)"
>
Edit
</v-btn>
<v-btn
color="error lighten-2"
class="mx-2"
text
@click="deletePlan(mealplan.uid)"
>
Delete
</v-btn>
</v-row>
</v-card-text>
</v-card>
</v-timeline-item>

View file

@ -1,6 +1,6 @@
<template>
<v-card>
<v-card-title class="accent white--text">
<v-card-title class="secondary white--text">
Create a New Meal Plan
</v-card-title>
<v-card-text>

View file

@ -17,7 +17,7 @@
<v-card-actions>
<v-btn
color="accent"
color="secondary"
text
@click="$router.push(`/recipe/${meal.slug}`)"
>

View file

@ -22,7 +22,6 @@
<v-col sm="5">
<v-text-field
label="Servings"
color="accent darken-1"
v-model="value.recipeYield"
>
</v-text-field>
@ -30,8 +29,8 @@
<v-col></v-col>
<v-rating
class="mr-2 align-end"
color="accent darken-1"
background-color="accent lighten-3"
color="secondary darken-1"
background-color="secondary lighten-3"
length="5"
v-model="value.rating"
></v-rating>

View file

@ -16,7 +16,7 @@
type="label"
:ripple="false"
elevation="0"
color="accent darken-1"
color="secondary darken-1"
class="rounded-sm static"
>
{{ yields }}
@ -24,8 +24,8 @@
</v-col>
<v-rating
class="mr-2 align-end static"
color="accent darken-1"
background-color="accent lighten-3"
color="secondary darken-1"
background-color="secondary lighten-3"
length="5"
:value="rating"
></v-rating>
@ -41,7 +41,7 @@
hide-details
class="ingredients"
:label="ingredient"
color="accent"
color="secondary"
>
</v-checkbox>
</div>
@ -117,7 +117,7 @@
:ripple="false"
elevation="0"
:href="orgURL"
color="accent darken-1"
color="secondary darken-1"
target="_blank"
class="rounded-sm mr-4"
>

View file

@ -9,11 +9,11 @@
<v-btn class="mr-2" fab dark small color="success" @click="save">
<v-icon>mdi-content-save</v-icon>
</v-btn>
<v-btn class="mr-5" fab dark small color="accent" @click="json">
<v-btn class="mr-5" fab dark small color="secondary" @click="json">
<v-icon>mdi-code-braces</v-icon>
</v-btn>
</div>
<v-btn color="secondary" fab dark small @click="editor">
<v-btn color="accent" fab dark small @click="editor">
<v-icon>mdi-square-edit-outline</v-icon>
</v-btn>
</template>

View file

@ -13,8 +13,8 @@
<v-col>
<v-rating
class="mr-2"
color="accent"
background-color="accent lighten-3"
color="secondary"
background-color="secondary lighten-3"
dense
length="5"
size="15"

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

View file

@ -1,5 +1,6 @@
from scrape_schema_recipe import scrape_url
from slugify import slugify
from utils.logger import logger
from services.image_services import scrape_image
from services.recipe_services import Recipe
@ -14,6 +15,7 @@ def create_from_url(url: str) -> dict:
def process_recipe_url(url: str) -> dict:
new_recipe: dict = scrape_url(url, python_objects=True)[0]
logger.info(f"Recipe Scraped From Web: {new_recipe}")
if not new_recipe:
return "fail" # TODO: Return Better Error Here