> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make: *** [Makefile:390: mainwindow.o] Error 1
Hmm... it seems that the QtWebKitWidgets library is missing.
No idea how to continue, so I asked Alex ;).
We looked again at the qt5-webkit packages in apt, and saw the dev package.
`sudo apt install libqt5webkit5-dev`
Oke installed...
Now let's go back to the Makefile.
`make`
It worked! :)
It generated an executable file called `OSPKit`.
`├── main.cpp`
`├── main.o`
`├── mainwindow.cpp`
`├── mainwindow.h`
`├── mainwindow.o`
`├── mainwindow.ui`
`├── Makefile`
`├── moc_mainwindow.cpp`
`├── moc_mainwindow.o`
`├── moc_predefs.h`
`├── OSPKit`
`├── OSPKit.pro`
`└── ui_mainwindow.h`
### Use OSPKit
I copied the executable to the bin folder that I have in my home folder, with is on my `$PATH`:
`$ cp ./OSPKit ~/bin/`
I also renamed it to all lowercase:
`$ mv OSPKit ospkit`
And now I can use it from anywhere on my system :).
`$ ospkit`
------------------
## Finding my html2print boilerplate
After install OSPKit, I would like to try to combine it with html2print.
Some instructions that I received from Alex:
First clone your boilerplate of choice!
$ git clone https://gitlab.constantvzw.org/osp/tools.html2print.git
$ cd tools.html2print
An article is edited in the content
folder.
The content
folder takes .html
files.
So if you want to work in another way, for example in markdown, you need to add those steps yourself.
There is a makefile that can be used to generate a .json
file for each of the articles.
$ make
Now it's time to open OSPKit...
$ ospkit
and to run a local server in this folder...
$ python3 -m http.server
and to navigate to: localhost:8000
Now, which repo to start from?
There are many different versions of html2print in the OSP repositories. Alex recommends me to first try the `devel` branch of the `tools.html2print` repo.
(devel branch)
I tried it and realised that:
- there are so many branches in this repository!
- stylesheets are missing to make the spread/grid/preview buttons work
- print function does not take the content of the iframe, so a workaround is needed: print the file from the layout/filename.html directly.
Back to Alex, he recommends me to try the `Medor0` repo, which is the Médor flavoured version of `html2print`. The `Medor0` repo is the only one that is public, as the repo's of each issue includes API keys that should not be shared. The `Medor0` repo is made to collect changes in the `html2print` workflow made while working on the different issues of Médor. According to Alex, it's mainly Doriane who takes care of this repo these days.
Hmm..., I tried to work with it and realised that:
- python2 is used in the Makefile and I don't have this version installed.
Back to Alex again :).
He recommends me to look at one of the latest repo's of Medor and gives me access to it on the OSP gitlab.
The `Medor31` repo is the one that is used for the last issue.
When running it, I notice:
- python3 is used in the Makefile
That looks good, I will try this one!