Package: gnoll
GNOLLAn easy to integratedice notationlibrary for multiple programming languages.
Use for instant support of common syntax and a library that can scale with your demands, rather than a sticky taped monstrousity of regular expressions and tears.Here's an example of how you might use GNOLL:**Grindon The Brave**: I want to steal from the goblin sitting at the bar.**Dungeon Master**: Okay, give me a stealth check!**Grindon The Brave**: Okay, that's a <1d20+5>
[GNOLL]:21**Dungeon Master**: Hurrah! You successfully pickpocket the goblin! However, all he had in there were some crummy dice...You can follow Grindon's full adventure through the world of dice notation in our Documentation.Many of our notation design decisions are explained in the documentation and compared to other dice notation parsers.Current Status🧑‍💻 Language SupportGNOLL was written to be the definitive solution to dice notation. The core has been written in C, but fear not! You can use GNOLL in many other programming languages too.Primarily tested on Linux (Ubuntu), but functional in various forms on Windows (10, WSL) and Mac.🎲 Dice NotationXdY notationArithmeticFate DiceMiscellaneous Symbolic DiceShorthands & MacrosAlternate SyntaxExplosionsDrop/KeepRerollingFilteringFunctionsThere's so many different things, we'd bore you to list them all here. For the specific details of supported notation,check out our documentation.Getting StartedUsage from a package managerPythonpip3installGNOLLThen, in your code:fromgnollimportrollroll("1d20")>>(0,[[12]],None)# (return code, final result, dice breakdown (if enabled))🛠️ Installing From SourceBasic Requirementssudoapt-getinstallbisonflexmakepython3-pip-y
pipinstall-rreqs/requirements.txt
makeallTo verify your setup, try our tests:maketestOr, just try some commands yourself!$./build/dice1d2020If you would like to run the 'dice' command from anywhere, usemake installto add the executable to your path.(Note that not all commands may not be able to be used this way as some symbols are reserved for use by different terminal interfaces (e.g. bash uses ! and #))For languages other than Python/C/C++ call the corresponding make target after the commands above.🐛 Issues / Bugs / FAQs / Feature RequestsIf you encounter any issues or have any ideas, please file them in ourIssue Tracker.✋ ContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.🔢 VersioningWe useSemVerfor versioning. For the versions available, see thetags on this repository.🤹 Authors / Contributers / AttributionsIan Hunter-Main Developer-IanfhunterSee also the list ofcontributorswho participated in this project.📃 LicenseThis project is licensed under the GNU General Public License v3.0 - see theLICENSE.mdfile for details.Individual licensing arrangements can be made if this is an issue for your project - Contact Me atLinkedInto discuss.👏 AcknowledgmentsBillie Thompson-README & Contribution Templates-PurpleBoothMarkdown Badges🏗️ Built WithFlex & Bison- Grammar Lexing & Parsinguthash- C hashtable libPCG- Random Number GenerationArc4Random- Random Number Generation (Cryptographically secure)Love! 💖💰 DonateKeep this project alive