{"id":27993265,"url":"https://github.com/xwmx/rbst","last_synced_at":"2025-10-07T10:03:54.699Z","repository":{"id":710006,"uuid":"356693","full_name":"xwmx/rbst","owner":"xwmx","description":"A Ruby gem for processing reStructuredText via Python's Docutils","archived":false,"fork":false,"pushed_at":"2023-08-11T22:17:51.000Z","size":108,"stargazers_count":18,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T07:57:01.384Z","etag":null,"topics":["docutils","markup","python","restructuredtext","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/xwmx.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},"funding":{"github":["xwmx"],"custom":"https://paypal.me/WilliamMelody"}},"created_at":"2009-11-01T02:55:57.000Z","updated_at":"2021-11-14T02:53:18.000Z","dependencies_parsed_at":"2024-06-21T14:10:48.147Z","dependency_job_id":"1cda7f57-9c02-48d5-ac2e-a76c6f71beda","html_url":"https://github.com/xwmx/rbst","commit_stats":{"total_commits":148,"total_committers":6,"mean_commits":"24.666666666666668","dds":0.2635135135135135,"last_synced_commit":"0b5143dfe683a155c09e6ba0d45332194fe64cca"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/xwmx/rbst","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Frbst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Frbst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Frbst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Frbst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwmx","download_url":"https://codeload.github.com/xwmx/rbst/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Frbst/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395914,"owners_count":25979691,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docutils","markup","python","restructuredtext","ruby"],"created_at":"2025-05-08T18:48:34.736Z","updated_at":"2025-10-07T10:03:54.684Z","avatar_url":"https://github.com/xwmx.png","language":"Ruby","readme":"# RbST\n\n[![Gem Version](https://img.shields.io/gem/v/RbST)](http://rubygems.org/gems/RbST)\n[![Gem Downloads](https://img.shields.io/gem/dt/RbST)](http://rubygems.org/gems/RbST)\n\nA Ruby gem for processing\n[reStructuredText](https://en.wikipedia.org/wiki/ReStructuredText) via Python's\n[Docutils](https://pypi.org/project/docutils/).\n\n## Installation\n\nPython 2.3+ (or 3.3+) is required.\n\nRbST is available on [RubyGems](https://rubygems.org/gems/RbST):\n\n```bash\ngem install RbST\n```\n\nTo install with [Bundler](https://bundler.io/), add the following to your Gemfile:\n\n```ruby\ngem 'RbST'\n```\n\nThen run `bundle install`\n\n## Usage\n\n```ruby\nrequire 'rbst'\n@latex = RbST.new('*hello*').to_latex\n```\n\nThis takes the reStructuredText formatted string and converts it to LaTeX.\n\nThe first argument can be either a string or an array of one or more file\npaths. The files will be concatenated together with a blank line between\neach and used as input.\n\n```ruby\n# One file path as a single-element array.\nRbST.new(['/path/to/file.rst']).to_html\n\n# Multiple file paths as an array.\nRbST.new(['/path/to/file1.rst', '/path/to/file2.rst']).to_html\n```\n\nYou can also use the `convert` class method to output HTML:\n\n```ruby\nputs RbST.convert('*hello*')\n#=\u003e \"\u003cdiv class=\\\"document\\\"\u003e\\n\u003cp\u003e\u003cem\u003ehello\u003c/em\u003e\u003c/p\u003e\\n\u003c/div\u003e\\n\"\n```\n\nArguments can be passed to `#to_html`, `#to_latex`, `new` or `convert`,\naccepting symbols or strings for options without arguments and hashes of\nstrings or symbols for options with arguments.\n\n```ruby\nputs RbST.new('.. a comment').to_html('strip-comments')\n# =\u003e '\u003cdiv class=\"document\"\u003e\\n\u003c/div\u003e'\n```\n\nOptions passed as string use hyphens while symbols use underscores. For\ninstance, the above could also be written as:\n\n```ruby\nputs RbST.new('.. a comment').to_html(:strip_comments)\n# =\u003e '\u003cdiv class=\"document\"\u003e\\n\u003c/div\u003e'\n```\n\nDocument parts can also be specified with the `:parts` option.\n\n```ruby\nputs RbST.new('hello world').to_html(:part =\u003e :fragment)\n# =\u003e '\u003cp\u003ehello world\u003c/p\u003e'\n```\n\nBy default, RbST uses the `html_body` part for HTML and the `whole` part\nfor LaTeX.\n\nAvailable options can be viewed using the `RbST.html_options` and\n`RbST.latex_options` class methods.\n\nYou might run into a situation where you want to specify a custom script for\nprocessing one or both of the output formats. If so, just specify the full\npath to the custom script for the format by passing a hash to the\n`RbST.executables=` method:\n\n```ruby\nRbST.executables = {:html =\u003e '/some/other/path/2html.py'}\n\n# uses custom executable for outputting html\nRbST.new('*hello*').to_html\n\n# uses default executable for latex since a custom one wasn't specified\nRbST.new('*hello*').to_latex\n```\n\nSimilarly, if you want to explicitly specify which python executable to\nuse, set the path with the `RbST.python_path=` method:\n\n```ruby\nRbST.python_path = '/usr/bin/env python3'\nRbST.new('*hello*').to_latex\n```\n\nFor more information on reStructuredText, see the\n[ReST documentation](http://docutils.sourceforge.net/rst.html).\n\n## Note on Patches/Pull Requests\n\n- Fork the project.\n- Make your feature addition or bug fix.\n- Add tests for it. This is important so I don't break it in a future version\n  unintentionally.\n- Commit, do not mess with rakefile, version, or history. (if you want to have\n  your own version, that is fine but bump version in a commit by itself I can\n  ignore when I pull)\n- Send me a pull request. Bonus points for topic branches.\n\n## Copyright\n\nCopyright (c) 2009 William Melody. See LICENSE for details.\n","funding_links":["https://github.com/sponsors/xwmx","https://paypal.me/WilliamMelody"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Frbst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwmx%2Frbst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Frbst/lists"}