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.pyMain entry point that reads Day One JSON, iterates content lines, and dispatches to sub-parsersparse_content.pyPrimary content parser handling text lines, embedded objects, newline normalization, and Markdown assemblyparse_header.pyHeader parser converting Day One header levels to Markdown ATX headings with newline managementparse_code.pyCode block parser for fenced code outputparse_inline_code.pyInline code detection and backtick wrappingparse_list.pyList parser handling ordered and unordered lists with indentationparse_quote.pyBlockquote parser with Markdown angle-bracket formattingparse_image.pyImage embed handler for Day One photo referencesparse_photo.pyPhoto embed handler producing Markdown image linksparse_video.pyVideo 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.pyparse_content.pyparse_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.shfetch-do-core.sh
Test data and experiment scripts
6 files changed
blog-output.mdSample blog output for visual comparisonmanual-wellformed.mdManually written well-formed Markdown for reference comparisongpt-test1.pyGPT API experiment script for JSON processingjson-processor.pyGPT example for processing Day One JSON objectsregex-test.pyRegex test harness for parser pattern developmenttest-zip-file.pyScript 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.mdregex-test.py
- Included GPT experiment scripts exploring AI-assisted JSON-to-Markdown conversion approaches
instantiate
internal
2 files
gpt-test1.pyjson-processor.py
Configuration and project scaffolding
5 files changed
.gitignoreComprehensive gitignore for Python, macOS, Hugo, Vim, Sublime Text, and media files.markdownlint.yamlMarkdownlint configuration with relaxed rules for generated outputrequirements.txtPython dependencies including coloredlogs and pylintNOTES.mdProject notes and observations about Day One export format quirksmilestoneMilestone tracker for parser progress