dreamyguy / gitlogg

💾 🧮 🤯 Parse the 'git log' of multiple repos to 'JSON'
MIT License
130 stars 27 forks source link

Remove mysterious replacing of `\n` with `ò` #18

Closed trebi closed 6 years ago

trebi commented 6 years ago

I have found that in some point, the script gitlogg-generate-log.sh replaces new lines \n with ò character.

The very first repository where I tried this tool was https://github.com/freeCodeCamp/freeCodeCamp where is actually one commit from a person that has this ò character in his name, so the whole skript breaks at the point when it tires to parse that commit 😄

It would be nice if you could come with better solution and ideally omit this step of mysterious character replacing to make the tool more robust. Comment next to it saying "convert newlines/line-breaks to a character, so we can manipulate it without much trouble" does not quite apply in this case 🤣

Sorry for not creating a PR, but I really suck in coding in bash 😕

dreamyguy commented 6 years ago

Hey @trebi,

As I needed to format the git log output in a way that I could parse it reliably, I had to find replacements for both \n and \r. I even created https://github.com/dreamyguy/gitlogg/issues/3 to solve just that, and as you can see it was one of the earliest big problems I had.

I finally landed on the ò character, which occurs very, very, very seldom in the most used languages (according to a wiki page I visited back then, only occurs in 0.002% of Italian). I braced myself to the day someone would point out it had broken their output...

But there are good news.

This is no longer an issue on the https://github.com/dreamyguy/gitlogg/tree/javascript branch.

I've decided to "discontinue" the bash implementation and focus on getting the javascript branch to a state where I can publish it as the main branch. The README.md file there needs a complete rewrite as the application has changed dramatically.

Those willing to skim through commit messages and figure how the new application works will find that there's a lot of good stuff coming.

So I'm leaving this issue open, and will be closing it when the javascript branch is merged to master. ✨

dreamyguy commented 6 years ago

On a second thought, I decided to do some changes to the current master as it is. The javascript branch is a great take, but has issues...