{"id":14235566,"url":"https://github.com/wallyqs/org-ruby","last_synced_at":"2025-10-04T22:31:41.024Z","repository":{"id":1679485,"uuid":"2406694","full_name":"wallyqs/org-ruby","owner":"wallyqs","description":"An Org mode parser written in Ruby.","archived":false,"fork":true,"pushed_at":"2023-12-09T08:25:21.000Z","size":2094,"stargazers_count":215,"open_issues_count":55,"forks_count":50,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-14T02:21:09.572Z","etag":null,"topics":["emacs","html","org","org-mode","parser","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bdewey/org-ruby","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wallyqs.png","metadata":{"files":{"readme":"README.org","changelog":"History.org","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-17T20:56:33.000Z","updated_at":"2024-02-03T00:55:38.000Z","dependencies_parsed_at":"2023-01-16T21:15:14.989Z","dependency_job_id":null,"html_url":"https://github.com/wallyqs/org-ruby","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallyqs%2Forg-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallyqs%2Forg-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallyqs%2Forg-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallyqs%2Forg-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wallyqs","download_url":"https://codeload.github.com/wallyqs/org-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234625216,"owners_count":18862374,"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":["emacs","html","org","org-mode","parser","ruby"],"created_at":"2024-08-20T21:02:06.066Z","updated_at":"2025-10-04T22:31:35.659Z","avatar_url":"https://github.com/wallyqs.png","language":"Ruby","readme":"#+startup: showeverything\n\n* OrgRuby\n\n[[https://secure.travis-ci.org/wallyqs/org-ruby.png?branch=master]]\n\nAn [[http://orgmode.org][Org-mode]] parser written in Ruby.\n\n/Originally by Brian Dewey/\n\n** Installation\n\n#+BEGIN_SRC ruby\ngem install org-ruby\n#+END_SRC\n\n** Usage\n\nFrom Ruby:\n\n#+BEGIN_SRC ruby\n  require 'org-ruby'\n\n  # Renders HTML\n  Orgmode::Parser.new(\"* Hello world!\").to_html\n  # =\u003e \"\u003ch1\u003eHello world!\u003c/h1\u003e\\n\"\n\n  # Renders Textile\n  Orgmode::Parser.new(\"* Hello world!\").to_textile\n  # =\u003e \"h1. Hello world!\\n\" \n\n  # Renders Markdown\n  Orgmode::Parser.new(\"* Hello world!\").to_markdown\n  # =\u003e \"# Hello world!\\n\" \n\n  # Renders HTML with custom markup\n  Orgmode::Parser.new(\"* *Custom* /Markup/\", { markup_file: \"html.tags.yml\" }).to_html\n  # =\u003e \"\u003ch1\u003e\u003cstrong\u003eCustom\u003c/strong\u003e \u003cem\u003eMarkup\u003c/em\u003e\u003c/h1\u003e\\n\"\n\n  # Renders Markdown with custom markup\n  Orgmode::Parser.new(\"* *Custom* /Markup/\", { markup_file: \"md.tags.yml\"}).to_markdown\n  # =\u003e \"# __Custom__ _Markup_\\n\"\n#+END_SRC\n\nThe supported output exporters can be also called from the command line:\n\n#+BEGIN_SRC sh\n     org-ruby --translate html         sample.org\n     org-ruby --translate textile      sample.org\n     org-ruby --translate markdown     sample.org\n     org-ruby --markup html.tags.yml   sample.org\n     org-ruby --markup md.tags.yml --translate markdown sample.org\n#+END_SRC\n\n** Current status\n\nNot all of the [[http://orgmode.org/manual/][Org mode features]] are implemented yet.\nCurrently, the development of the gem is mostly oriented towards\ngiving support for exporting Org mode into other formats.\n\nBrief list of features supported:\n\n- Converts Org mode files to HTML, Textile or Markdown.\n- Supports tables, block quotes, code blocks, and html blocks\n- Supports bold, italic, underline, strikethrough, and code inline formatting.\n- Supports hyperlinks\n- Supports lists\n- Supports footnotes\n- Supports =.org= views in Rails through Tilt.\n- Code syntax highlight of code blocks using Pygments.rb or Coderay when available\n\n** Custom Markup\n\nOrg-ruby supports custom markups for HTML and Markdown. The custom\nmarkup needs to be in the form of a YAML file with the following keys\nand values:\n\n*** HTML Blocktags\n\n#+BEGIN_SRC yaml\n  ---\n  :HtmlBlockTag:\n    :paragraph: p\n    :ordered_list: ol\n    :unordered_list: ul\n    :list_item: li\n    :definition_list: dl\n    :definition_term: dt\n    :definition_descr: dd\n    :table: table\n    :table_row: tr\n    :quote: blockquote\n    :example: pre\n    :src: pre\n    :inline_example: pre\n    :center: div\n    :heading1: h1\n    :heading2: h2\n    :heading3: h3\n    :heading4: h4\n    :heading5: h5\n    :heading6: h6\n    :title: h1\n#+END_SRC\n\nFor example, you only want to change the blockquote HTML tag to be\ntranslated, your YAML file would look like this:\n\n#+BEGIN_SRC yaml\n  ---\n  :HtmlBlockTag:\n    :quote: pre\n#+END_SRC     \n\nThis will change the HTML markup to be translated in the blockquote\nelement.\n\n*** HTML Emphasis:\n     \n#+BEGIN_SRC yaml\n  ---\n  :Tags:\n    \"*\":\n      :open: b\n      :close: b\n    \"/\": \n      :open: i\n      :close: i \n    \"_\":  \n      :open: span style=\\\"text-decoration:underline;\\\"\n      :close: span\n    \"=\":   \n      :open: code\n      :close: code\n    \"~\":   \n      :open: code\n      :close:  code\n    \"+\":\n      :open: del\n      :close: del \n#+END_SRC\n\nLet's say that you prefer =\u003cstrong\u003e= over =\u003cb\u003e= in the Bold emphasis\nelement of Org-mode, your YAML file should look like this:\n\n#+BEGIN_SRC yaml\n  ---\n  :Tags:\n    \"*\":\n      :open: strong\n      :close: strong\n    \"/\":\n      :open: em\n      :close: em\n#+END_SRC\n\n*** Markdown:\n\n#+BEGIN_SRC yaml\n  ---\n  :MarkdownMap:\n    \"*\": \"**\"\n    \"/\": \"*\"\n    \"_\": \"*\"\n    \"=\": \"`\"\n    \"~\": \"`\"\n    \"+\": \"~~\"\n#+END_SRC    \n\nLet's say that you prefer underscores for Bold and Italics elements in\nMarkdown, your YAML file should look like this:\n\n#+BEGIN_SRC yaml\n  ---\n  :MarkdownMap:\n    \"*\": \"__\"\n    \"/\": \"_\"\n#+END_SRC\n\n** Contributing\n\n- If you see a feature missing, please create an issue so that the maintainer considers its implementation\n- Also, PRs are always welcome! Before submitting make sure to check what breaks by running =rake spec=\n\n** Projects using it\n\n- Used at [[https://github.com/github/markup][github/markup]] for rendering =.org= files\n- The [[https://github.com/gollum/gollum][Gollum]] project uses it too\n- [[https://www.gitlab.com/][Gitlab]] includes it for rendering Org files with syntax highlighting\n- Can be used with Jekyll for building a site: [[https://github.com/wallyqs/yet-another-jekyll-org-template][example here]]\n\n** License\n\n#+BEGIN_SRC \n (The MIT License)\n\n Copyright (c) 2009 Brian Dewey\n\n Permission is hereby granted, free of charge, to any person obtaining\n a copy of this software and associated documentation files (the\n 'Software'), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sell copies of the Software, and to\n permit persons to whom the Software is furnished to do so, subject to\n the following conditions:\n \n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n#+END_SRC\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallyqs%2Forg-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwallyqs%2Forg-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallyqs%2Forg-ruby/lists"}