Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

danbooru/dtext_rb

 
 

Repository files navigation

Important

DText was moved to the Danbooru repository in commit d965f959b. See lib/dtext_rb in the Danbooru repo.


DText

A Ruby library for parsing DText, Danbooru's text formatting language.

Installation

sudo apt-get install ruby ruby-dev g++ libc-dev make patch xz-utils ragel
gem install bundler
bundle install
bin/rake

Usage

ruby -Ilib -rdtext -e 'puts DText.parse("hello world")'
# => <p>hello world</p>

Development

bin/rake clean
bin/rake compile
bin/rake test
bin/rake bench

To build in debug mode:

bin/rake clean
DTEXT_DEBUG=true bin/rake compile

To build with Clang:

MAKE="make --environment-overrides" CXX="/usr/bin/clang++" bin/rake

About

compiled dtext parser extension

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 80.6%
  • Ruby 15.1%
  • Ragel 4.3%