When I tested my addon (Ancestry Table Report) I was surprised that Gramps generates a HTML report in black and white even if I choose font colors in the style editor.
After a quick search in the code, in htmldoc.py I found “Color is removed to avoid conflicts with the css.“. At the beginning I didn’t understand where a conflict could be possible because I didn’t see the HTML Options tab. Now I think I understood and I have a suggestion. I suggest leaving the font color as is when no css is selected.
If you agree I could write the modification in the “build_style_declaration” function.
Or is there another thing that I didn’t understand ? Another way to apply the styles defined with the style editor ?
Let me know.
That seems reasonable to me.
Nice !
Before I begin the modifications, is there special instruction or special method to follow ? If not, I will create a branch, make the modifications, test them locally, push them and create a PR.
No special instructions. Work in a new branch and create a PR when ready.
Still something I didn’t understand with git… I explain.
I cloned Gramps with this command : git clone git@github.com:gramps-project/gramps.git Gramps
I created a branch with this command : git checkout –b bruno-htmldoc-color --track origin/maintenance/gramps60
I modified the file Gramps/gramps/plugins/docgen/htmldoc.py.
I added this file with this command : git add .
I commited : git commit -m “Keep font color and font face when no stylesheet is selected”
Everything seems to be OK. git status shows :
* bruno-htmldoc-color 5b5c1642a8 [en avance de 1] Keep font color and font face when no stylesheet is selected
master 41258bdc42 Merge branch 'gramps60'
BUT git push origin bruno-htmldoc-color gives me an error :
ERROR: Permission to gramps-project/gramps.git denied to bforest76.
fatal: Impossible to read the remote repository. (or something like that in french that I translated)
What’s wrong ? I precise I don’t want to have too much access (too dangerous with a beginer like me !
). I can begin from the start if necessary, it’s not a problem to me. I just need some explanation and the right process.
Thanks a lot.
You should create a clone of the gramps repository in GitHub add then add it as a remote. Then push your branch to your clone rather than to origin.
I would do the following:
git checkout –b gramps60 --track origin/maintenance/gramps60
git checkout –b bruno-htmldoc-color
To create a remote called bruno pointing to your clone you will need a command like:
git remote add bruno git@github.com:bruno/gramps.git
Then to keep your branch up-to-date:
git checkout gramps60
git pull
git checkout bruno-htmldoc-color
git rebase gramps60
When you want to create a pull request:
git push bruno bruno-htmldoc-color