paulfd / chordpro-epub

Simple script to create a songbook from a list of chordpro files
MIT License
2 stars 1 forks source link

Interested in some modifications to your code? #1

Closed ghost closed 1 year ago

ghost commented 3 years ago

Hi Paul, your Python script was exactly what I was looking for. Anyway - while using it, I found some inconveniences (for me) and startet to modify your code: 1) the concept to put the chord-name into a div-box with the width of zero (and position it relative) leads to scattered layouts in some browser (everybody seem to handle the overflow-situatuation differently). After fiddling around with a table driven layout, I finally ended up with putting the text in one div-box, the chord-name into another and both together into a "chordbox" which is displayed "inline-block" (see image at the end). 2) to make the chordpro parsing-process more clear and easily extensible, I changed it to use the "pyparsing" lib. 3) while doing so, I changed your concept of reading the file linewise . This way you can have multiline comments and the like... 4) finally I changed the input charset to unicode, to be able to handle german umlauts and to be compatible with "MobileSheets" which I use on other devices for the same purpose of displaying chordsheets...

I'm not really into GIT, so I'm not clear what to do now. I could create my own project on GitHub, referencing to your version - or I could send you the code and you decide whether to integrate it into your project. Anyhow, I want to have the oportunity to go on adding features....

What do you think?

Ciao - Robert

div_concept

paulfd commented 3 years ago

Hi !

Thanks alot, that looks like a great addition :) I'd be happy to put this piece of code into a better shape, especially with the positioning of the chords which do not render well on all ereaders.

To contribute over time the best would be to "fork" the project and do pull requests. Github makes this somewhat simple. If you go to the main page, you will see a "Fork" counter on the top right. If you click it, you are given the option to create a fork of the project in your own account. Do so, and you will have a project at rhh/chordpro-epub.

Assuming you have git installed and its command line available, open a terminal and navigate to a folder where you will host a clone (a synced copy) of your new project. Type the command

git clone https://github.com/rhh//chordpro-epub.git

This should create a chordpro-epub directory, with my version of the code in it. Next, you can overwrite my files with your version. Do the command

git add .

to stage your changes, as well as the new files eventually. Staged files now need a commit message, which you can provide with

git commit -m "Multiple changes"

Finally, push the changes to your fork using

git push

You might have a message telling you to add flags to this command, something like git push -u origin master. If so, add the flags---they're only needed the first push. For followups you can just use git push.

At this point, you should see the git server answer stuff on the command line, along with an URL for you to start a "Pull Request". This is what will allow me to easily merge your changes back in my code. You can follow this link, fill in the message with what you wrote above, and then we can both comment and discuss on it.

If you have any issue do tell me !

paulfd commented 1 year ago

I merged your changes Robert, thanks again and sorry for the delay!