aliemteam / aliemcards

ALiEM Cards - markdown and website
https://www.aliemcards.com
MIT License
4 stars 8 forks source link

Drugs should be an array, not a string #102

Closed dsifford closed 7 years ago

dsifford commented 7 years ago

Drugs currently exist like this in the frontmatter.

[...]
updates: 2017/02/14
cateories:
    - Toxicology
drugs: amantadine, buproprion, chlorpromazine, desipramine, fluoxetine, labetalol, Methylphenidate, Phentermine  # ...etc

This creates extra work.

It should be like this

[...]
updates: 2017/02/14
cateories:
    - Toxicology
drugs: [ amantadine, buproprion, chlorpromazine, desipramine, fluoxetine, labetalol, Methylphenidate, Phentermine ]
michellealiem commented 7 years ago

OK. While we talking about this, should the names be all lower case too?

On Feb 15, 2017, 8:31 AM -0800, Derek Sifford notifications@github.com, wrote:

Drugs currently exist like this in the frontmatter.

[...] updates: 2017/02/14 cateories:

  • Toxicology drugs: amantadine, buproprion, chlorpromazine, desipramine, fluoxetine, labetalol, Methylphenidate, Phentermine # ...etc This creates extra work. It should be like this

[...] updates: 2017/02/14 cateories:

  • Toxicology drugs: [ amantadine, buproprion, chlorpromazine, desipramine, fluoxetine, labetalol, Methylphenidate, Phentermine ] — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
dsifford commented 7 years ago

@michellealiem Yep. Good catch.

jvoros commented 7 years ago

Is this even useful? We're doing a lot of hand wringing over something I set up on a lark. Not sure we need the feature now. If all drugs in then programatically adding later is possible.

On Wed, Feb 15, 2017 at 9:39 AM, Derek Sifford notifications@github.com wrote:

@michellealiem https://github.com/michellealiem Yep. Good catch.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aliemteam/aliemcards/issues/102#issuecomment-280063467, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVxJoxCX1BEX4-aQckz_74W6-sCoRANks5rcyomgaJpZM4MB7-B .

dsifford commented 7 years ago

@jvoros Not sure I understand the last part of what you're saying.

jvoros commented 7 years ago

@dsifford during build phase, not hard to parse markdown files, pull out drug names wrapped by and create the per card drug array that way. In fact, that's how it should work now anyway, now that I type that out.

Let's get rid of the frontmatter drug array.

On Wed, Feb 15, 2017 at 11:39 AM, Derek Sifford notifications@github.com wrote:

@jvoros https://github.com/jvoros Not sure I understand the last part of what you're saying.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aliemteam/aliemcards/issues/102#issuecomment-280099122, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVxJsmjABd0wAlslb10awbCAOH7AO7Yks5rc0Z2gaJpZM4MB7-B .

dsifford commented 7 years ago

Should the drug field be a custom markdown thing? It would be easier, more efficient, and more reliable to parse that out of an AST than it would to regex each card for html.

dsifford commented 7 years ago

@jvoros Is this issue still relevant? Didn't we pitch drugs?

jvoros commented 7 years ago

Yes. Drugs should be removed from cards. They are no longer in the build process.