0.0
No commit activity in last 3 years
No release in over 3 years
Creates HTML tags that correspond to tags needed by the Mana and Keyrune fonts @ https://github.com/andrewgioia/mana & keyrune from tags as provided by scryfall type sources
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0
 Project Readme

Gitpod ready-to-code

PrettyMagic

Pretty Magic takes text in curly brackets as used on the Scryfall API as well as other text and puts them into <i> html tags for use with the andrewgioia/mana and andrewgioia/keyrune fonts.

Codeship Status for danwiseman/pretty_magic

Installation

Add this line to your application's Gemfile:

gem 'pretty_magic'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pretty_magic

Usage

Run PrettyMagic::ManaIcons.mana_symbols("{MANA SYMBOL}") to get html tags for the Mana & Resource Symbols as documented at https://mana.andrewgioia.com/icons.html

Run PrettyMagic::ManaIcons.card_symbols("{CARD SYMBOL}") to get html tags for the Card Symbols as documented at https://mana.andrewgioia.com/icons.html

Run PrettyMagic::ManaIcons.guild_symbols("{GUILD}") to get html tags for the Guild and Clan Watermarks as documented at https://mana.andrewgioia.com/icons.html

Run PrettyMagic::ManaIcons.poleis_symbols("{POLEIS}") to get html tags for the Poleis Symbols as documented at https://mana.andrewgioia.com/icons.html

Run PrettyMagic::ManaIcons.add_icons_to_text("YOUR TEXT WITH TAGS IN IT") to have all four symbol types ran against a long piece of text. Such as the Oracle Text of a card. i.e. {X}{B/P}: Remove up to X counters from target permanent. For each counter removed this way, Hex Parasite gets +1/+0 until end of turn. ({B/P} can be paid with either {B} or 2 life.)

Run PrettyMagic::KeyruneIcons.set_symbols("{SET_CODE}") to get the html tags for the set symbols as documented at https://keyrune.andrewgioia.com/icons.html

Also, ensure the fonts are installed as documented on the fonts' githubs.

Notes

ℹ️ Mana Font: 1.6.0

ℹ️ Keyrune Font: 3.7.0

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/danwiseman/pretty_magic. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the PrettyMagic project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.