matthewtrask / elephpant-traders

Code for elephpanttrade.com
http://elephpanttrade.com/#/
6 stars 3 forks source link

Pre-populated list of elephpants #36

Open colinodell opened 7 years ago

colinodell commented 7 years ago

http://afieldguidetoelephpants.net contains a list of all known elephpants. Perhaps we could import some of that data into here? This would enable the site to:

matthewtrask commented 7 years ago

I can see this as a table on its own that we can then match too perhaps?

matthewtrask commented 7 years ago

@colinodell do you know if this data is available in any other way then just scraping it?

colinodell commented 7 years ago

I found the site's source code: https://github.com/philipsharp/afieldguidetoelephpants/tree/master/source It looks like a Sculpin site where most of the data is stored as YAML inside of Markdown files: https://raw.githubusercontent.com/philipsharp/afieldguidetoelephpants/master/source/_elephpants/2016-10-18-white-zend.md

colinodell commented 7 years ago

And this seems to be the magic regex to extract the YAML data.

matthewtrask commented 7 years ago

interesting, Ill take a look, thanks!

colinodell commented 7 years ago

@matthewtrask https://github.com/philipsharp/afieldguidetoelephpants/pull/71 :wink:

ramsey commented 7 years ago

I've had good luck using mnapoli/front-yaml paired with league/commonmark for parsing Markdown with YAML front-matter, which is what it looks like the field guide is using. 😉

matthewtrask commented 7 years ago

Ah snap, that may work. Thanks for the heads up @ramsey. I already have CommonMark set up so this would be a quick thing to do.