1
0
mirror of https://github.com/e621ng/dtext_rb.git synced 2025-03-04 03:03:03 -05:00
compiled dtext parser extension
Go to file
Earlopain feca366bf7
Switch to building extension with C++
Switch to compiling the extension as C++. This way we can work towards replacing all the low-level C
code with C++, which is better at dealing with strings, and has a better standard library we can use
to replace the dependency on GLib.

d47307f2ef

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-26 22:48:36 +02:00
bin Remove standalone executable 2023-03-26 17:30:46 +02:00
ext/dtext Switch to building extension with C++ 2023-03-26 22:48:36 +02:00
lib Remove nokogiri dependency 2023-03-26 20:03:23 +02:00
test Remove [nodtext] 2023-03-26 22:23:54 +02:00
.gitignore Remove standalone executable 2023-03-26 17:30:46 +02:00
.ruby-version Update gems and ruby version 2022-08-15 21:20:26 +02:00
docker-compose.yml Add dockerfile and more readme instructions 2022-08-15 21:45:26 +02:00
Dockerfile Add dockerfile and more readme instructions 2022-08-15 21:45:26 +02:00
dtext_rb.gemspec Remove nokogiri dependency 2023-03-26 20:03:23 +02:00
Gemfile Remove nokogiri dependency 2023-03-26 20:03:23 +02:00
Gemfile.lock Remove nokogiri dependency 2023-03-26 20:03:23 +02:00
Rakefile Switch to building extension with C++ 2023-03-26 22:48:36 +02:00
README.md Add dockerfile and more readme instructions 2022-08-15 21:45:26 +02:00
VERSION Add lore to [color] tags, remove appeal and favgroup links 2022-11-21 07:44:59 +00:00

About

Uses the ragel state machine to generate the dtext parsing capabilities of e621.net

Getting started

Most of the changes will only need to touch dtext.rl, the rest of the files will be generated for you by running either rake compile or rake test. Take a look at this inofficial quickstart guide or the complete official documentation if you want to know more about how ragel works.

There's a docker-compose.yml which you can use to quickly run the most common commands without installing everything locally. Usable like this: docker-compose run --rm rake test. You will need to run docker-compse build once beforehand.

Releasing a new version for usage in e621

Commit the changes to dtext.rl and the resuling changes in dtext.c. Bump the version number in dtext_rb.gemspec and VERSION. After that is all done you can bundle lock in the e6 repository. It should pick up on the increased version.

To test these changes locally commit them and update the Gemfiles dtext entry. Specifying the commit hash allows you to rebuild the container without having to also increment the version number every time. Don't forget to bundle lock before rebuilding.
gem "dtext_rb", git: "https://github.com/YOUR_FORK/dtext_rb.git", ref: "YOUR_COMMIT_HASH"