Project

dtext

0.0
The project is in a healthy, maintained state
E621 DText parser
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

 Project Readme

DText Parser

A Ruby extension for parsing DText markup used by e621.net.
This gem uses the Ragel state machine compiler to generate efficient C++ parsing code for DText syntax.

Setting up the development environment

If you wish to test your changes in a local instance of e621ng, please refer to the "Local DText gem" section of that repo's README file.

  1. Build the Docker container: docker compose build
  2. Compile the parser: docker compose run --rm rake compile
  3. Run tests: docker compose run --rm rake test

Important: Do not commit dtext.cpp in pull requests

The dtext.cpp file is a generated artifact and should not be committed in development branches or pull requests. It will be regenerated during the official release process.

Creating a new release

Use the release script to properly bump the version number and compile the artifacts.

./scripts/release.sh [patch|minor|major]

Don't forget to update e621ng's Gemfile to include the new tag name.

Ragel

If you're new to Ragel, these resources will help you understand the syntax and concepts: