added instance directory, added tests directory, removed markdown_content
This commit is contained in:
parent
4fca9b53d3
commit
368f6b645b
@ -4,9 +4,6 @@ from all_paw_care.pages import pages
|
||||
from all_paw_care.users import users
|
||||
from all_paw_care.db.actions import ensure_tables
|
||||
|
||||
# App config
|
||||
from config import Config
|
||||
|
||||
# Flask
|
||||
from flask import Flask
|
||||
|
||||
@ -16,10 +13,10 @@ from sqlalchemy.orm import Session
|
||||
|
||||
def create_app():
|
||||
# Initialize app
|
||||
all_paw_care = Flask(__name__)
|
||||
|
||||
# Import config
|
||||
all_paw_care.config.from_object(Config)
|
||||
#
|
||||
# Learn more about instance folders here:
|
||||
# https://flask.palletsprojects.com/en/3.0.x/config/#instance-folders
|
||||
all_paw_care = Flask(__name__, instance_relative_config=True)
|
||||
|
||||
# Register app blueprints
|
||||
all_paw_care.register_blueprint(pages)
|
||||
|
||||
18
apc-db.dot
18
apc-db.dot
@ -1,18 +0,0 @@
|
||||
graph {
|
||||
ROUTER[label="Router\n\
|
||||
IP Address: 10.0.0.1"];
|
||||
|
||||
KYLIA_CLOUD[label="kylia-cloud\n\
|
||||
IP Address: 10.0.0.11"];
|
||||
|
||||
AXIS_CAMERA[label="AXIS Camera\n\
|
||||
IP Address: 10.0.0.100"];
|
||||
|
||||
AWKAWB_CLOUD[label="awkawb-cloud\n\
|
||||
IP Address: 10.0.0.10"];
|
||||
|
||||
AWKAWB_PI4GAMING[label="awkawb-pi4gaming\n\
|
||||
IP Address: 10.0.0.12"];
|
||||
|
||||
ROUTER -- { AWKAWB_CLOUD KYLIA_CLOUD AWKAWB_PI4GAMING AXIS_CAMERA }
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on
|
||||
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
|
||||
project adheres to
|
||||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.0.1] - TBD
|
||||
|
||||
Initial release
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
IP_ADDR = allpawcare.com
|
||||
PUBLIC_DIR = public
|
||||
BUILD_SCRIPT = scripts/build.sh
|
||||
|
||||
.PHONY: all
|
||||
all: clean
|
||||
|
||||
.PHONY: clean-public-dir
|
||||
clean-public-dir:
|
||||
rm -rf ${PUBLIC_DIR}/*
|
||||
|
||||
.PHONY: build
|
||||
build: clean-public-dir
|
||||
./${BUILD_SCRIPT}
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
# www.AllPawCare.com markdown content
|
||||
|
||||
Markdown assets for templates in
|
||||
[www.allpawcare.com](https://gitea.awkawb.cloud/awkawb/www.allpawcare.com.git).
|
||||
@ -1,97 +0,0 @@
|
||||
'''
|
||||
Converts site content written in Markdown to HTML.
|
||||
'''
|
||||
|
||||
class MarkdownContent(dict):
|
||||
def __init__(self):
|
||||
import frontmatter
|
||||
import os
|
||||
|
||||
# content paths with metadata
|
||||
self.PAGES_METADATA = dict()
|
||||
self.FORMS_METADATA = dict()
|
||||
|
||||
for content_dir in self._CONTENT_DIRS:
|
||||
self.__get_content(content_dir)
|
||||
|
||||
def __getitem__(self, page):
|
||||
return self.METADATA[page]
|
||||
|
||||
def __content_page_faq(self):
|
||||
'''
|
||||
Fetch FAQ page content.
|
||||
'''
|
||||
|
||||
return True
|
||||
|
||||
def __content_page_services(self):
|
||||
'''
|
||||
Fetch services page content.
|
||||
'''
|
||||
|
||||
return True
|
||||
|
||||
def __content_page_about_me(self):
|
||||
'''
|
||||
Fetch about me page content.
|
||||
'''
|
||||
|
||||
return True
|
||||
|
||||
def __content_page_contact_me(self):
|
||||
'''
|
||||
Fetch contact me page content.
|
||||
'''
|
||||
|
||||
return True
|
||||
|
||||
def __content_form_meet_and_greet(self):
|
||||
'''
|
||||
Fetch meet & greet form content.
|
||||
'''
|
||||
|
||||
return True
|
||||
|
||||
def __get_content(self, content_dir: str):
|
||||
import frontmatter
|
||||
import os
|
||||
|
||||
metadata = dict()
|
||||
|
||||
for items in os.walk(content_dir):
|
||||
if len(items[2]) > 0:
|
||||
for file in items[2]:
|
||||
path = os.path.join(items[0], file)
|
||||
|
||||
metadata[path] = \
|
||||
frontmatter.load(path).to_dict()
|
||||
|
||||
return metadata
|
||||
|
||||
def get_page(self, page: str):
|
||||
'''
|
||||
Transforms Markdown to HTML for pages.
|
||||
'''
|
||||
|
||||
# match page.lower():
|
||||
# case 'faq':
|
||||
# return True
|
||||
#
|
||||
# case 'services':
|
||||
# return True
|
||||
#
|
||||
# case 'about me':
|
||||
# return True
|
||||
#
|
||||
# case 'contact me':
|
||||
# return True
|
||||
|
||||
def get_form(self, form: str):
|
||||
'''
|
||||
Transforms Markdown to HTML for forms.
|
||||
'''
|
||||
|
||||
# match form.lower():
|
||||
# case 'meet and greet':
|
||||
# return True
|
||||
|
||||
@ -1 +0,0 @@
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
<p>Welcome to All Paw Care!</p>
|
||||
<p>I’ve been providing professional animal caretaking services in the
|
||||
Baltimore area for over 4 years. I provide services for paws of all
|
||||
shapes and sizes and specialize in dog and cat care.</p>
|
||||
<p>Animals add so much to our lives so caring for them is just as
|
||||
important.</p>
|
||||
@ -1,5 +0,0 @@
|
||||
<p>If you have any questions,the FAQ page may have an answer.</p>
|
||||
<p>If your question isn’t on the FAQ or you want to directly contact me,
|
||||
email or text messages work best.</p>
|
||||
<p>My personal Instagram page is public and includes pictures of my
|
||||
animal caretaking work along with all my interests.</p>
|
||||
@ -1,3 +0,0 @@
|
||||
<p>Here you’ll find answers to some common questions. If what your
|
||||
looking for can’t be found, head over to the <a href="">contact me</a>
|
||||
page for information on communicating with me directly.</p>
|
||||
@ -1,12 +0,0 @@
|
||||
<p>A broad range of payment types are accepted to make the process
|
||||
easy.</p>
|
||||
<ul>
|
||||
<li>Cash</li>
|
||||
<li>Credit/Debit cards (Amex, Discover, Mastercard, Visa, etc.)</li>
|
||||
<li>ACH transfers (direct bank transfer from your checking account)</li>
|
||||
<li>Paypal</li>
|
||||
<li>Apple Pay</li>
|
||||
<li>Google Pay</li>
|
||||
<li>Zelle</li>
|
||||
<li>plus more…</li>
|
||||
</ul>
|
||||
@ -1,2 +0,0 @@
|
||||
<p>Additional animals are charged per addition. For example, a walking
|
||||
service for three dogs incures two addtional dog fees.</p>
|
||||
@ -1,2 +0,0 @@
|
||||
<p>Payments are due 7 days after invoicing. Invoices are sent on the day
|
||||
of service or during (e.g house sitting).</p>
|
||||
@ -1,2 +0,0 @@
|
||||
<p>Service includes 15 minutes of in-home play and/or care for your
|
||||
dog/cat. Longer drop-ins are available!</p>
|
||||
@ -1,3 +0,0 @@
|
||||
<p>Service includes nightly in-home care for your animal. Drop-ins or
|
||||
walks are provided during the day. Cleaning of cat litter is included
|
||||
too!</p>
|
||||
@ -1,2 +0,0 @@
|
||||
<p>Service includes 30 minute walk for your dog/cat and bags for poop
|
||||
clean-up.</p>
|
||||
@ -1,6 +0,0 @@
|
||||
<p>All services are for a single animal. Additional animals are charged
|
||||
seperately.</p>
|
||||
<p>Set up a meeting before scheduling any service. I’ll come to your
|
||||
home or some place more convienient. The meeting will serve a way for
|
||||
your pet and I to get comfortable with each other. Also, any questions
|
||||
you may have can be discussed too!</p>
|
||||
@ -1,16 +0,0 @@
|
||||
#! /run/current-system/sw/bin/bash
|
||||
|
||||
# Static runtime variables
|
||||
SRC_DIR=src
|
||||
PUBLIC_DIR=public
|
||||
|
||||
for content in $(find $SRC_DIR -type f)
|
||||
do
|
||||
output_file="$PUBLIC_DIR/$(echo "$content" | sed -e 's/src\///g' -e 's/md$/html/g')"
|
||||
content_type=$(echo $content | awk -F/ '{ print $2 }')
|
||||
|
||||
mkdir -p $(dirname $output_file)
|
||||
|
||||
pandoc -o "$output_file" "$content"
|
||||
done
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
---
|
||||
Title: Meet and greet request
|
||||
---
|
||||
@ -1,13 +0,0 @@
|
||||
---
|
||||
Title: About me
|
||||
---
|
||||
|
||||
Welcome to All Paw Care!
|
||||
|
||||
I've been providing professional animal caretaking services in the
|
||||
Baltimore area for over 4 years. I provide services for paws of all
|
||||
shapes and sizes and specialize in dog and cat care.
|
||||
|
||||
Animals add so much to our lives so caring for them is just as
|
||||
important.
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
---
|
||||
Title: Contact me
|
||||
---
|
||||
|
||||
If you have any questions,the FAQ page may have
|
||||
an answer.
|
||||
|
||||
If your question isn't on the FAQ or you want to directly
|
||||
contact me, email or text messages work best.
|
||||
|
||||
My personal Instagram page is public and includes pictures
|
||||
of my animal caretaking work along with all my interests.
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
---
|
||||
Title: FAQ
|
||||
---
|
||||
|
||||
Here you'll find answers to some common questions. If what your
|
||||
looking for can't be found, head over to the
|
||||
[contact me]() page for information on communicating with me
|
||||
directly.
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
---
|
||||
Header: What types of payments do you accept?
|
||||
---
|
||||
|
||||
A broad range of payment types are accepted to make the process
|
||||
easy.
|
||||
|
||||
- Cash
|
||||
- Credit/Debit cards (Amex, Discover, Mastercard, Visa, etc.)
|
||||
- ACH transfers (direct bank transfer from your checking account)
|
||||
- Paypal
|
||||
- Apple Pay
|
||||
- Google Pay
|
||||
- Zelle
|
||||
- plus more...
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
---
|
||||
Header: Do you accept more than one animal?
|
||||
---
|
||||
|
||||
Additional animals are charged per addition. For example, a walking
|
||||
service for three dogs incures two addtional dog fees.
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
---
|
||||
Header: When is payment for a service due?
|
||||
---
|
||||
|
||||
Payments are due 7 days after invoicing. Invoices are sent on the day
|
||||
of service or during (e.g house sitting).
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
---
|
||||
Title: Drop-ins
|
||||
Price: $18+/visit
|
||||
---
|
||||
|
||||
Service includes 15 minutes of in-home play and/or care for your
|
||||
dog/cat. Longer drop-ins are available!
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
---
|
||||
Title: House sitting
|
||||
Price: $35+/night
|
||||
---
|
||||
|
||||
Service includes nightly in-home care for your animal. Drop-ins or
|
||||
walks are provided during the day. Cleaning of cat litter is included
|
||||
too!
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
---
|
||||
Title: Walking
|
||||
Price: $20+/walk
|
||||
---
|
||||
|
||||
Service includes 30 minute walk for your dog/cat and bags for poop
|
||||
clean-up.
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
---
|
||||
Title: Services
|
||||
---
|
||||
|
||||
All services are for a single animal. Additional animals are charged
|
||||
seperately.
|
||||
|
||||
Set up a meeting before scheduling any service. I'll come to your
|
||||
home or some place more convienient. The meeting will serve a way for
|
||||
your pet and I to get comfortable with each other. Also, any
|
||||
questions you may have can be discussed too!
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
IMG_ORIGINALS="img_original"
|
||||
IMG_PUBLIC="all_paw_care/static/img"
|
||||
# This directory contains images for processing
|
||||
IMG_ORIGINALS="$1"
|
||||
|
||||
# The static image directory for the website module
|
||||
IMG_PUBLIC="$2"
|
||||
|
||||
IMG_SIZES_NAME=("sm" "md" "lg" "xl" "xxl")
|
||||
IMG_SIZES=("346" "461" "595" "720" "840")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user