Initialize Database and Store Example Markdown File #1

Closed
opened 2025-09-16 20:49:23 +00:00 by tegwick · 0 comments
Owner

UseCase: The user can set up a new, temporary SQLite database to hold Markdown and Schema data.

This will be our MVP for this usecase:

Description:
UseCase: The user can initialize a SQLite database and store a markdown file with front matter.

Requirements:

  1. Initialize a temporary SQLite database with a markdown_files table
  2. Parse and store an example markdown file that includes YAML front matter
  3. Separate front matter metadata from markdown content
  4. Store both front matter and content in the database

Example Input:

Create and process this example markdown file (example.md):

---
title: "My First Document"
author: "Test User"
created: "2024-01-01"
tags: ["example", "test"]
---

# Welcome to MarkiTect

This is an example markdown document with **bold text** and *italic text*.

## Features
- Front matter parsing
- Content storage
- Database initialization

## Code Example
```python
print("Hello, MarkiTect!")

The system should handle this gracefully.

## Expected Behavior:
- Database table created with columns: id, filename, front_matter, content, created_at
- Front matter parsed as structured data (JSON/dict)
- Markdown content stored separately from metadata
- Simple API to initialize database and add markdown files

## Out of Scope:
- Schema validation (future issue)
- AST generation (future issue)
- GraphQL interface (future issue)
- Multiple file handling (future issue)

## Dependencies:
- SQLite (built-in Python)
- PyYAML (for front matter parsing)
- python-frontmatter (alternative option)
UseCase: The user can set up a new, temporary SQLite database to hold Markdown and Schema data. This will be our MVP for this usecase: Description: UseCase: The user can initialize a SQLite database and store a markdown file with front matter. ## Requirements: 1. Initialize a temporary SQLite database with a `markdown_files` table 2. Parse and store an example markdown file that includes YAML front matter 3. Separate front matter metadata from markdown content 4. Store both front matter and content in the database ## Example Input: Create and process this example markdown file (`example.md`): ```markdown --- title: "My First Document" author: "Test User" created: "2024-01-01" tags: ["example", "test"] --- # Welcome to MarkiTect This is an example markdown document with **bold text** and *italic text*. ## Features - Front matter parsing - Content storage - Database initialization ## Code Example ```python print("Hello, MarkiTect!") The system should handle this gracefully. ## Expected Behavior: - Database table created with columns: id, filename, front_matter, content, created_at - Front matter parsed as structured data (JSON/dict) - Markdown content stored separately from metadata - Simple API to initialize database and add markdown files ## Out of Scope: - Schema validation (future issue) - AST generation (future issue) - GraphQL interface (future issue) - Multiple file handling (future issue) ## Dependencies: - SQLite (built-in Python) - PyYAML (for front matter parsing) - python-frontmatter (alternative option)
tegwick added this to the Getting started project 2025-09-16 21:10:10 +00:00
tegwick moved this to Todo in Getting started on 2025-09-16 21:13:37 +00:00
tegwick changed title from Initialize a Database to Initialize Database and Store Example Markdown File 2025-09-23 02:09:55 +00:00
tegwick moved this to Done in Getting started on 2025-09-24 22:01:06 +00:00
Sign in to join this conversation.