d1conv 2023-10-30
Initial commit of Day One journal to Markdown converter with parser modules and test infrastructure
162 files · 145,811+ · 1,593-

Core parser and module architecture

10 files changed
  • parse.py Main entry point that reads Day One JSON, iterates content lines, and dispatches to sub-parsers
  • parse_content.py Primary content parser handling text lines, embedded objects, newline normalization, and Markdown assembly
  • parse_header.py Header parser converting Day One header levels to Markdown ATX headings with newline management
  • parse_code.py Code block parser for fenced code output
  • parse_inline_code.py Inline code detection and backtick wrapping
  • parse_list.py List parser handling ordered and unordered lists with indentation
  • parse_quote.py Blockquote parser with Markdown angle-bracket formatting
  • parse_image.py Image embed handler for Day One photo references
  • parse_photo.py Photo embed handler producing Markdown image links
  • parse_video.py Video embed handler for Day One video attachments
  • Established modular parser architecture with parse.py dispatching to dedicated sub-parsers for each Day One content type (headers, code, lists, quotes, media) instantiate architectural
    3 files
    • parse.py
    • parse_content.py
    • parse_header.py
  • Added custom colorized logger with per-module format strings for debug tracing of parser state transitions instantiate internal
    1 file
    • logger.py
  • Created shell scripts for extracting Day One export content and fetching core journal data instantiate internal
    2 files
    • extract-content.sh
    • fetch-do-core.sh

Test data and experiment scripts

6 files changed
  • blog-output.md Sample blog output for visual comparison
  • manual-wellformed.md Manually written well-formed Markdown for reference comparison
  • gpt-test1.py GPT API experiment script for JSON processing
  • json-processor.py GPT example for processing Day One JSON objects
  • regex-test.py Regex test harness for parser pattern development
  • test-zip-file.py Script to extract and parse Day One zip exports
  • Added test journal data, manually well-formed Markdown reference files, and regex test harness for iterating on parser correctness qualify internal
    2 files
    • manual-wellformed.md
    • regex-test.py
  • Included GPT experiment scripts exploring AI-assisted JSON-to-Markdown conversion approaches instantiate internal
    2 files
    • gpt-test1.py
    • json-processor.py

Configuration and project scaffolding

5 files changed
  • .gitignore Comprehensive gitignore for Python, macOS, Hugo, Vim, Sublime Text, and media files
  • .markdownlint.yaml Markdownlint configuration with relaxed rules for generated output
  • requirements.txt Python dependencies including coloredlogs and pylint
  • NOTES.md Project notes and observations about Day One export format quirks
  • milestone Milestone tracker for parser progress
  • Set up project scaffolding with gitignore, markdownlint config, requirements, and milestone tracking baseline internal
    3 files
    • .gitignore
    • .markdownlint.yaml
    • requirements.txt