{"id":17001617,"url":"https://github.com/shresht7/scribe","last_synced_at":"2026-04-28T12:33:33.854Z","repository":{"id":103221745,"uuid":"599703197","full_name":"Shresht7/Scribe","owner":"Shresht7","description":"A library to programmatically generate text such as markdown 📝","archived":false,"fork":false,"pushed_at":"2024-02-13T08:43:43.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T06:15:16.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shresht7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-09T17:49:14.000Z","updated_at":"2023-03-04T21:18:11.000Z","dependencies_parsed_at":"2024-02-13T09:32:00.918Z","dependency_job_id":null,"html_url":"https://github.com/Shresht7/Scribe","commit_stats":{"total_commits":87,"total_committers":1,"mean_commits":87.0,"dds":0.0,"last_synced_commit":"6af106d81e87ddb60ddadf9045a49fdd3b8a8a7e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FScribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FScribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FScribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2FScribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/Scribe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931586,"owners_count":20534010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T04:25:34.166Z","updated_at":"2025-10-30T10:32:09.558Z","avatar_url":"https://github.com/Shresht7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Scribe`\n\nA super simple library to programmatically generate text.\n\n---\n\n## 📦 Packages\n\n### `scribe`\n\nThe `scribe` package doesn't do much on its own, but provides the foundation for the other packages to build upon.\n\n### `markdown`\n\nThe `markdown` package provides a simple way to generate markdown content programmatically.\n\n## Usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/Shresht7/Scribe/markdown\"\n)\n\nfunc main() {\n    \n    // Creating a Markdown document\n    doc := markdown.NewDocument()\n    doc.AddHeading(2, \"This is a sub-heading\")\n    doc.AddParagraph(\"Hello World!\")\n    fmt.Println(doc)\n\n    // Output:\n    // ## This is a sub-heading\n    // Hello World!\n\n    // Alternatively, you can use the `AppendChild` method to add nodes to the document\n\n    doc.AppendChild(\n        markdown.Heading(2, \"This is a sub-heading\")\n        markdown.Paragraph(\"Hello World!\")\n    )\n\n    // Or, use any func directly\n    fmt.Println(markdown.Bold(\"Hello World!\")) // **Hello World!**\n\n}\n```\n\n## Custom Nodes\n\nCreating custom nodes is as simple as creating a new struct that implements the `Node` interface.\n\n```go\ntype CustomNode struct {\n    text string\n}\n\nfunc (c *CustomNode) String() string {\n    return \"\u003e\u003e \"+c.text\n}\n\nfunc main() {\n    doc := markdown.NewDocument()\n    doc.AppendChild(\u0026CustomNode{\"Hello World!\"})\n    fmt.Println(doc) // \u003e\u003e Hello World!\n}\n```\n\n---\n\n## 📕 Markdown API Reference\n\n### `Blockquote`\n\n```go\nBlockQuote(\"text\")\n```\n\n\u003e \u003e text\n\n### `Bold`\n\n```go\nBold(\"text\")\n```\n\n\u003e **text**\n\n### `BoldItalic`\n\n```go\nBoldItalic(\"text\")\n```\n\n\u003e ***text***\n\n### `Code`\n\n```go\nCode(\"text\")\n```\n\n\u003e `text`\n\n### `CodeBlock`\n\n```go\nCodeBlock(\"fmt.Println(\\\"Hello World!\\\")\", \"go\")\n```\n\n\u003e ```go\n\u003e fmt.Println(\"Hello World!\")\n\u003e ```\n\n### `Details`\n\n```go\nDetails(\"description\", \"This is a simple details block\")\n```\n\n\u003e \u003cdetails\u003e\n\u003e \n\u003e \u003csummary\u003edescription\u003c/summary\u003e\n\u003e \n\u003e This is a simple details block\n\u003e \n\u003e \u003c/details\u003e\n\n### `FencedBlock`\n\n```go\nFencedBlock(\"This is a fenced block\")\n```\n\n\u003e ```\n\u003e This is a fenced block\n\u003e ```\n\n### `FrontMatter`\n\n```go\nFrontMatter(\"yaml\", \"title: Hello World\")\n```\n\n\u003e ```yaml\n\u003e title: Hello World\n\u003e ```\n\n### `Heading`\n\n```go\nHeading(4, \"Sub-Heading\")\n```\n\n\u003e #### Sub-Heading\n\n### `HorizontalRule`\n\n```go\nHorizontalRule('-', 3)\n```\n\n\u003e ---\n\n### `Image`\n\n```go\nImage(\"Image of a cat\", \"[ImageUrl]\")\n```\n\n\u003e ![Image of a cat](ImageUrl)\n\n### `Italic`\n\n```go\nItalic(\"text\")\n```\n\n\u003e *text*\n\n### `Link`\n\n```go\nLink(\"Link to GitHub Homepage\", \"https://github.com\")\n```\n\n\u003e [Link to GitHub Homepage](https://github.com)\n\n### `List`\n\n```go\nUnorderedList([]string{\"Item 1\", \"Item 2\", \"Item 3\"})\n```\n\n\u003e - Item 1\n\u003e - Item 2\n\u003e - Item 3\n\n```go\nOrderedList([]string{\"Item 1\", \"Item 2\", \"Item 3\"})\n```\n\n\u003e 1. Item 1\n\u003e 2. Item 2\n\u003e 3. Item 3\n\n### `Paragraph`\n\n```go\nParagraph(\"This is a simple paragraph\")\n```\n\n\u003e This is a simple paragraph\n\n### `Strikethrough`\n\n```go\nStrikethrough(\"text\")\n```\n\n\u003e ~~text~~\n\n### `Table`\n\n```go\nTable([]string{\"Name\", \"Age\"}, [][]string{{\"John\", \"21\"}, {\"Jane\", \"22\"}})\n```\n\n\u003e | Name | Age |\n\u003e | ---- | --- |\n\u003e | John | 21  |\n\u003e | Jane | 22  |\n\n---\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE) - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fscribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Fscribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fscribe/lists"}