# Supported Format Schemas This document outlines the specific structures the Intelligent Markdown Converter looks for to detect and parse different types of documents into selectable components. --- ## 1. Repo2Markdown Format **Purpose:** To represent a project's directory structure and the full contents of its files in a single document. **Schema Rules:** 1. The document **must** contain a second-level heading exactly named \`## File Structure\`. 2. The document **must** contain at least one file block, denoted by a third-level heading starting with \`### File:\`. 3. The content of each file should follow its \`### File:\` heading. 4. For proper syntax highlighting, code files should have their content wrapped in fenced code blocks (e.g., \`\`\`python ... \`\`\`). **Example:** \`\`\`markdown # My Project This is a sample project. ## File Structure \`\`\` 📁 Root 📄 app.py 📄 README.md \`\`\` Below are the contents of all files in the space: ### File: README.md \`\`\`md # My Project's README This is the content of the readme file. \`\`\` ### File: app.py \`\`\`python def main(): print("Hello, World!") if __name__ == "__main__": main() \`\`\` \`\`\` --- ## 2. Standard README Format **Purpose:** To parse a typical software project \`README.md\` file into its major sections. **Schema Rules:** 1. The document **must** start with a top-level heading (\`#\`). This is treated as the project title and becomes the "Introduction" component. 2. The document **must** contain at least one second-level heading (\`##\`). Each \`##\` heading and the text that follows it (until the next \`##\` or the end of the file) will be treated as a selectable "Section" component. **Example:** \`\`\`markdown # iLearn Social Agent This is an autonomous AI agent designed to interact with the \`social_media_app\`. It uses its learning capabilities to decide what to post, who to comment on, and how to behave as a social media user. ## How It Works This agent runs in a continuous loop, performing the following actions: 1. **Perceive**: It "looks" at the social media feed. 2. **Decide**: It uses an LLM to analyze the current feed. 3. **Act**: It formulates a plan to achieve its goal. ## How to Run 1. **Install dependencies:** \`\`\`bash pip install -r requirements.txt \`\`\` 2. **Run the agent:** \`\`\`bash python ilearn_social_user.py \`\`\` \`\`\` --- ## 3. Changelog Format **Purpose:** To parse a standard "Keep a Changelog" formatted file into components for each version. **Schema Rules:** 1. The document **must** contain at least one version heading that follows the pattern: \`## [VersionNumber] - YYYY-MM-DD\`. - Example: \`## [1.1.0] - 2024-05-21\` 2. Each version heading and its content (until the next version heading) will be treated as a single selectable "Version" component. 3. Sub-headings like \`### Added\` or \`### Fixed\` are preserved as part of the version's content. **Example:** \`\`\`markdown # Changelog All notable changes to this project will be documented in this file. ## [1.1.0] - 2024-05-21 ### Added - Intelligent format detection for READMEs and Changelogs. - Component selection for newly supported formats. ### Fixed - CSS scoping issue where preview styles could affect the main page. ## [1.0.0] - 2024-05-20 ### Added - Initial release with Repo2Markdown parsing. - PNG and HTML generation. \`\`\` --- ## 4. Unknown Format If your document does not match any of the schemas above, it will be classified as **"Unknown"**. The entire document will be treated as a single component and will be rendered as-is. This ensures that the tool can still be used as a general-purpose Markdown-to-PNG/HTML converter for any valid Markdown content.