1
0
mirror of https://github.com/e621ng/dtext_rb.git synced 2025-03-03 18:53:03 -05:00
compiled dtext parser extension
Go to file
2023-04-09 12:54:16 +02:00
.vscode Ignore compiled output for vscode searches 2023-03-29 15:46:52 +02:00
ext/dtext Regenerate cpp 2023-04-09 12:54:16 +02:00
lib Regenerate dtext.cpp and bump version 2023-04-03 13:40:33 +02:00
test Surround section content in div 2023-04-09 12:53:59 +02:00
.dockerignore Switch to standard gem layout 2023-04-03 12:55:51 +02:00
.gitignore More efficient full test script 2023-03-31 22:36:07 +02:00
docker-compose.yml Add dockerfile and more readme instructions 2022-08-15 21:45:26 +02:00
Dockerfile Switch to standard gem layout 2023-04-03 12:55:51 +02:00
dtext_rb.gemspec Switch to standard gem layout 2023-04-03 12:55:51 +02:00
Gemfile Switch to standard gem layout 2023-04-03 12:55:51 +02:00
Gemfile.lock Regenerate dtext.cpp and bump version 2023-04-03 13:40:33 +02:00
Rakefile Use -G2 option to generate Ragel parser 2023-03-26 23:11:02 +02:00
README.md Regenerate dtext.cpp and bump version 2023-04-03 13:40:33 +02: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.cpp.rl and the resuling changes in dtext.cpp. Bump the version number in lib/dtext/version.rb. 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"