Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shoes to use html colour codes? #386

Closed
dredknight opened this issue Nov 12, 2017 · 4 comments
Closed

Shoes to use html colour codes? #386

dredknight opened this issue Nov 12, 2017 · 4 comments

Comments

@dredknight
Copy link
Contributor

dredknight commented Nov 12, 2017

Is it possible Shoes to use HTML colour coding?

For example I have a file with the following text:
Adds +1 to the Hero's four primary attributes and increases initiative of all shooters in Hero's army by 10%

<color=purple>Power of Dragons (1/8)<color=white>
The hero is granted +4 in every primary skill for wearing the full Dragon armor. Half of the pieces gives +2 in every primary skill.

<color=orange>Quest<color=white>
Bring all 8 pieces of the Dragon armor to a Sacrificial Altar and receive a unique reward.

can I use the HTML syntax to make the text align and colour itself instead of doing it myself?

@IanTrudel
Copy link
Collaborator

Have you considered using Shoes internal markup? The manual is written in that markup language. You could also parse the colours by yourself and render it in Shoes. I did something like that and it gave birth to Shoes eBook. Shoes eBook is work in progress but that would be nice on the Facebook page #380. Same goes for screenshots of the manual.

@dredknight
Copy link
Contributor Author

@backorder I would go with Shoes parser style any day but I am not writing the text. It is extracted as is from batch of files and just migrated to the Skillwheel. It is not that bad if it is not possible I will have to write my own HTML parser to convert the text into the style the Skillwheel app supports.

I will make something for FB :).

@IanTrudel
Copy link
Collaborator

IanTrudel commented Nov 14, 2017

Nokogiri gem is installed by default in Shoes. It will make your life easier for parsing texts and collect attributes from HTML code to apply Shoes related colouring.

@dredknight
Copy link
Contributor Author

gosh.. I am using nokogiri extensively for XML parsing but I did not think it can be used for HTML too.
Thank you @backorder :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants