# Path: app/data.py
# class Projects():
# class Language():
# class Project():
# class Shelf():
# class Section():
# class Item():
#     def __init__(self) -> None:
#     def load_from_file() -> 'Projects':
#     def load(data: Dict[str, Dict[str, Dict[str, str]]]) -> 'Projects':
#     def __init__(self) -> None:
#     def load(key: str, data: Dict[str, Dict[str, str]]) -> 'Language':
#     def __init__(self) -> None:
#     def load(key: str, data: Dict[str, str]) -> 'Project':
#     def links(self) -> Dict[str, str]:
# def get_projects() -> Projects:
#     def __init__(self) -> None:
#     def load_from_file() -> 'Shelf':
#     def load(shelf_data: Dict[str, List[Dict[str, str]]]) -> 'Shelf':
#     def __init__(self) -> None:
#     def load(name: str, data: List[Dict[str, str]]) -> 'Section':
#     def __init__(self) -> None:
#     def load(data: Dict[str, str]) -> 'Item':
# def get_shelf() -> Shelf:
# 
# Path: app/note_util.py
# MARKDOWN_EXTRAS = [
#     'code-friendly',
#     'fenced-code-blocks',
#     'smarty-pants',
#     'tables',
# ]
# TIMEZONE = ZoneInfo(os.environ['DISPLAY_TIMEZONE'])
# NOTES_DIRECTORY = 'notes'
# REFERENCE_DIRECTORY = 'reference'
# class Note(object):
#     def __init__(self) -> None:
#     def __eq__(self, other: Any) -> bool:
#     def __repr__(self) -> str:
#     def get_note_file_data(note_file: str) -> Optional["Note"]:
#     def parse_time(timestamp_str: str) -> datetime.datetime:
#     def parse_markdown(markdown: str) -> str:
#     def write_note(self) -> None:
# def prune_note_files(note_files: List[str]) -> List[str]:
#     def is_valid_note(note_file: str) -> bool:
# def get_note_files(directory: str) -> List[str]:
# def get_notes(directory: str) -> List[Note]:
# def get_note_from_slug(directory: str, slug: str) -> Optional[Note]:


from typing import Any
from urllib.parse import urljoin
from feedgen.feed import FeedGenerator
from flask import (
    Blueprint,
    Response,
    abort,
    redirect,
    render_template,
    request,
    url_for,
)
from varsnap import varsnap
from app import data, note_util


handlers = Blueprint('handlers', __name__)


@handlers.route("/")
@varsnap
def index() -> Any:
    return render_template("index.htm")


@handlers.route("/resume")
def resume() -> Any:
    return render_template("resume.htm")


@handlers.route("/projects")
def projects() -> Any:
    projects = data.get_projects()
    return render_template("projects.htm", projects=projects)


@handlers.route("/notes")
def notes() -> Any:
    posts = note_util.get_notes(note_util.NOTES_DIRECTORY)
    return render_template("notes.htm", posts=posts)


@handlers.route("/shelf")
def shelf() -> Any:

# Path: app/data.py
# class Projects():
# class Language():
# class Project():
# class Shelf():
# class Section():
# class Item():
#     def __init__(self) -> None:
#     def load_from_file() -> 'Projects':
#     def load(data: Dict[str, Dict[str, Dict[str, str]]]) -> 'Projects':
#     def __init__(self) -> None:
#     def load(key: str, data: Dict[str, Dict[str, str]]) -> 'Language':
#     def __init__(self) -> None:
#     def load(key: str, data: Dict[str, str]) -> 'Project':
#     def links(self) -> Dict[str, str]:
# def get_projects() -> Projects:
#     def __init__(self) -> None:
#     def load_from_file() -> 'Shelf':
#     def load(shelf_data: Dict[str, List[Dict[str, str]]]) -> 'Shelf':
#     def __init__(self) -> None:
#     def load(name: str, data: List[Dict[str, str]]) -> 'Section':
#     def __init__(self) -> None:
#     def load(data: Dict[str, str]) -> 'Item':
# def get_shelf() -> Shelf:
# 
# Path: app/note_util.py
# MARKDOWN_EXTRAS = [
#     'code-friendly',
#     'fenced-code-blocks',
#     'smarty-pants',
#     'tables',
# ]
# TIMEZONE = ZoneInfo(os.environ['DISPLAY_TIMEZONE'])
# NOTES_DIRECTORY = 'notes'
# REFERENCE_DIRECTORY = 'reference'
# class Note(object):
#     def __init__(self) -> None:
#     def __eq__(self, other: Any) -> bool:
#     def __repr__(self) -> str:
#     def get_note_file_data(note_file: str) -> Optional["Note"]:
#     def parse_time(timestamp_str: str) -> datetime.datetime:
#     def parse_markdown(markdown: str) -> str:
#     def write_note(self) -> None:
# def prune_note_files(note_files: List[str]) -> List[str]:
#     def is_valid_note(note_file: str) -> bool:
# def get_note_files(directory: str) -> List[str]:
# def get_notes(directory: str) -> List[Note]:
# def get_note_from_slug(directory: str, slug: str) -> Optional[Note]:


# Path: app/routes.py
from typing import Any
from urllib.parse import urljoin
from feedgen.feed import FeedGenerator
from flask import (
    Blueprint,
    Response,
    abort,
    redirect,
    render_template,
    request,
    url_for,
)
from varsnap import varsnap
from app import data, note_util



handlers = Blueprint('handlers', __name__)


@handlers.route("/")
@varsnap
def index() -> Any:
    return render_template("index.htm")


@handlers.route("/resume")
def resume() -> Any:
    return render_template("resume.htm")


@handlers.route("/projects")
def projects() -> Any:
    projects = data.get_projects()
    return render_template("projects.htm", projects=projects)


@handlers.route("/notes")
def notes() -> Any:
    posts = note_util.get_notes(note_util.NOTES_DIRECTORY)
    return render_template("notes.htm", posts=posts)


@handlers.route("/shelf")
def shelf() -> Any:

    shelf = data.get_shelf()