Working on installer.to with SCoRe Lab for GSoC 2020: Week 8

Heshan Geasman
SCoRe Lab
Published in
2 min readSep 5, 2020

My previous Medium article got published under SCoRe as https://medium.com/scorelab/my-previous-medium-article-got-published-under-score-as-https-medium-com-scorelab-working-on-insta-e57972ed7bcc

This week, I’m starting to work on the final part of the Continuous Delivery! That is, whenever a contributor adds or updates an installer.toml, then the Continuous Delivery will generate the following automatically.

Firstly, the installer.sh, the usual installer script we generated from the installer.toml file, then the minified installer script as installer.min.sh. Then I’m updating the table of all installers and their supported package manager matrix inside the README.md which is written in markdown language! If a new installer is added, I’m adding a new row to it, or if a new package manager method is supported that column of the tool will be marked as Yes.

I was surprised to see how Python language has all these very kind of packages to do every kind of things. I first tried to generate this with peo Python codes, but this markdown systax is to generate a tale was very frustrating for me, with lot of pipes, dashes, spaces, etc.

Then with some Googling, I found a Python Package called pytablewriter which can generate table for m any different formats and markdown was one of them. What I had to do is to generate the value matrix in Python with our installer information and provide the value matrix as an input, set headers. Then I could get the markdown syntax generated for me! I then used some regex to find the correct place of the table in the README.md and replaced the existing content with the new contents.

I used these <!-- beginning of tools list --> & <!-- end of tools list--> markdown comments to find the correct place of the table in the README.md

Then I’m generating a summary of all the installers we have as a TOML file called installers.toml. This will be used as a data source for a search feature in the future.

It looks like this, which has the name, description and the set of supported package managers for that tool.

Next challenge is committing these generated files an changes into git automatically and creating PRs. I will be working on this next week.

--

--