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

Write a converter from bibtex strings to proper JSON #5

Open
fedorov opened this issue Mar 22, 2017 · 4 comments
Open

Write a converter from bibtex strings to proper JSON #5

fedorov opened this issue Mar 22, 2017 · 4 comments
Assignees

Comments

@fedorov
Copy link
Collaborator

fedorov commented Mar 22, 2017

Each attribute of the Bibtex entry should map to a JSON attribute.

For example, for this input string:

"@article{hardin2014clinical, title={The clinical and genetic features of COPD-asthma overlap syndrome}, author={Hardin, Megan and Cho, Michael and McDonald, Merry-Lynn and Beaty, Terri and Ramsdell, Joe and Bhatt, Surya and Van Beek, Edwin JR and Make, Barry J and Crapo, James D and Silverman, Edwin K and others}, journal={European Respiratory Journal}, volume={44}, number={2}, pages={341--350}, year={2014}, publisher={Eur Respiratory Soc} } "

the proper JSON should look like this:

{
  "type": "article",
  "title": "The clinical and genetic features of COPD-asthma overlap syndrome",
  "author": "Hardin, Megan and Cho, Michael and McDonald, Merry-Lynn and Beaty, Terri and Ramsdell, Joe and Bhatt, Surya and Van Beek, Edwin JR and Make, Barry J and Crapo, James D and Silverman, Edwin K and others",
  "journal": "European Respiratory Journal",
  "volume": "44",
  "number": "2",
  "pages": "341-350",
  "year": "2014"
}
``
@fedorov
Copy link
Collaborator Author

fedorov commented Mar 22, 2017

This should be a separate python file that takes JSON containing array of strings and writing out JSON array of objects with the proper attributes.

@HesongHuang
Copy link
Owner

Done

@fedorov
Copy link
Collaborator Author

fedorov commented Mar 23, 2017

Can you please read this and follow the instructions I gave you?
#2 (comment)

@HesongHuang
Copy link
Owner

Sorry, I should reference the issue number

HesongHuang added a commit that referenced this issue Mar 24, 2017
store the data into a txt, and type of the data is string, looks like:
@Article{hardin2014clinical,
  title={The clinical and genetic features of COPD-asthma overlap syndrome},
  author={Hardin, Megan and Cho, Michael and McDonald, Merry-Lynn and Beaty, Terri and Ramsdell, Joe and Bhatt, Surya and Van Beek, Edwin JR and Make, Barry J and Crapo, James D and Silverman, Edwin K and others},
  journal={European Respiratory Journal},
  volume={44},
  number={2},
  pages={341--350},
  year={2014},
  publisher={Eur Respiratory Soc}
}
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