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

HallOfFameParser #38

Open
1ppm opened this issue Jan 1, 2017 · 10 comments
Open

HallOfFameParser #38

1ppm opened this issue Jan 1, 2017 · 10 comments

Comments

@1ppm
Copy link
Owner

1ppm commented Jan 1, 2017

A Parser Markdown to JSON

{
  username: 'ggerhard',
  gitHubUrl: 'https://github.com/ggerhard',
  otherUrl: '',
  projects: {
     201611: {
         name: 'parsecal',
         description: 'ruby script to parse an iCal calendar and create a spreadsheet report',
         status: 'Done'
    },
   ......
  }
}
  • Note that not all users have entered a github URL (could be fixed maybe...), so eighter gitHub or otherUrl should be filled. (regexp should do it)
  • projectID should be sortable / sorted

Extra Kudos for node module and maybe a more general approach to markdown to JSON.

@1ppm
Copy link
Owner Author

1ppm commented Jan 1, 2017

a twitter handle field would be useful too

@VladimirRubin
Copy link
Contributor

@1ppm today I works with a rough version of the parser, which you can see here: https://github.com/VladimirRubin/1ppmHallOfFameParser

I test it on the last version HallOfFame.md file and you can see result there:
https://gist.github.com/VladimirRubin/0c5f9c13021bf7e3d66468ed4e4da5f3

I found few problems with parsing data:

  1. Not all dates in the file specified in the correct order (two-digits month/four-digits year) -- few peoples have the reversed order (I'll try to correct this in parser later)
  2. Not all projects have "State" in tables (now this projects have empty string state in JSON)
  3. Not all projects use the states from your description ("Planning", "Started", "Done", "Continued", "Cancelled") and use himself states ("In progress", "Started previously, WIP", etc)

Based on the above, I wanna know about your suggestions and will continue work with parser :)

@ggerhard
Copy link
Collaborator

ggerhard commented Jan 2, 2017

@VladimirRubin that was great work, very valuable information!

1+3 - I can fix that manually
2 can't make states up, we will have to leave that blank until ppl update their tables

But, here comes the challenging part (if you like):
in the beginning, the site will be static. So the processing should happen in javascript :/
python could be handy for other aplications like local scripts though.

if you do want to get a little into JS, you could start here: http://stackoverflow.com/questions/22041795/how-to-tokenize-markdown-using-node-js

let me know if you want to try that, could be a nice little challenge

@VladimirRubin
Copy link
Contributor

@ggerhard Thank you for your warm review :)
About the second part of your comment i have one question: you wanna parse this data on the frontend or on backend?
Anyway i wanna do it! But need more info about "how/where it will works" :)

@ggerhard
Copy link
Collaborator

ggerhard commented Jan 2, 2017

For the start, the data should be parsed in the frontend. so JS calls the github api and processes the data. this will probably happen in an angularJS Service, but once the processing is solved, I can integrate that.

@VladimirRubin
Copy link
Contributor

@ggerhard ok, thank you. I'll try do it on JS

@ggerhard
Copy link
Collaborator

ggerhard commented Jan 2, 2017

👍

@VladimirRubin
Copy link
Contributor

@ggerhard Hi, today i finished works with JS version of parser.
You can see it by next link: https://github.com/VladimirRubin/1ppmHallOfFameParser/blob/master/js_version/parser.js

Result for node parser.js is: https://gist.github.com/VladimirRubin/e44004f43aa4c8ed98a28d6e911f1124

The main parser method is convertMDtoJSON(mdContent) where mdContent is data from github api for raw link.

@ggerhard
Copy link
Collaborator

ggerhard commented Jan 3, 2017

This is awesome! Also: great testdata. I will start playing with this ASAP.

If it's not in your CV yet, go and add "Open Source Contributor" 😄

@VladimirRubin
Copy link
Contributor

VladimirRubin commented Jan 3, 2017

@ggerhard Ahaha, thank you.
Let me know if you need anything more to parser functionality :)

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

No branches or pull requests

3 participants