<div dir="ltr">Hi All,<div><br></div><div>I want to share the progress of QGIS Symbology Sharing Tool for the GSoC project. This tool will allow you to share collections (symbol, svgs, etc) in a repository, fetch it, and use it in QGIS.</div><div><br></div><div><br class=""><span style="font-size:12.8px;font-weight:bold">What did you get done this week?</span></div><div>This week I worked on:<br></div><div><b style="font-size:12.8px"><br></b></div><div><b style="font-size:12.8px">Handler Classes</b></div><div><span style="font-size:12.8px">Handler class is responsible to interact with the repository (fetch the metadata and download the collections). I made some classes for this:</span></div><div><ul><li><span style="font-size:12.8px">BaseHandler: it's a base class that we can inherit from if we want to make another repository handler. It's an abstract class (OK, I don't use Python's abc but let's agree that it's an abstract class :)) (<a href="https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/base.py">https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/base.py</a>).</span></li><li><span style="font-size:12.8px">RemoteGitHandler: It's a base class to deal with remote git handler. It's not a concrete class but it's disabled. I create this class so that we can easily make handler classes inherit from this (<a href="https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/remote_git_handler.py">https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/remote_git_handler.py</a>)</span></li><li><span style="font-size:12.8px">Github Handler and Bitbucket Handler. It's a concrete class (see here <a href="https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/bitbucket_handler.py">https://github.com/akbargumbira/qgis_symbology_sharing/blob/master/symbology_sharing/handler/bitbucket_handler.py</a>). It only works for public repositories for now.</span></li></ul><span style="font-size:12.8px">So if we want to implement handler for another git remote repository, we can inherit from RemoteGitHandler and define some methods like in GithubHandler class. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">It wouldn't be hard too to add another handler like FIleSystem Handler (inheriting from BaseHandler). </span><span style="font-size:12.8px">The handler classes are autoregistered as long as you inherit it from BaseHandler. If can_handle(url) method is implemented correctly, the tool will pick the right handler depending on the URL.</span><div><br></div><div>This is the screencast I made to see how handlers work: <a href="https://youtu.be/DxE_PONFsjY">https://youtu.be/DxE_PONFsjY</a><br></div><div><span style="font-size:12.8px"><br></span></div></div><div><b>Parsing Metadata</b></div><div>After adding a repository, it will fetch the metadata and register avaialable collections from that metadata (it will only register, not download).</div><div><br></div><div><b>Separation between Repository Manager and Collection Manager</b></div><div>Repository manager is a class responsible for managing repository and calling the collection manager. Collection manager is responsible for registering/unregistering collections. Main class only needs to deal with repository manager. </div><div><b><br></b></div><div><b><br></b></div><div><b>What do you plan on doing next week?</b></div><div>Next week I want to work on:<br><ul><li>Right now every time users add/edit/delete repo, it will fetch all the repositories registered after these actions. I am going to save the collections in QSettings when user closes QGIS, and when user add/edit/delete repository, it will only update collections belong to that repo in the collections registry.</li><li>Make tests</li><li>Show the detail of the collections when user clicks a collection.</li><li>Filter the collections based on the QGIS version</li><li>Start thinking about upgrading collections mechanism (perhaps we should add the version of the collection in the metadata)</li><li>Start implementing download collection for github and bitbucket handler.</li></ul><div>If you have some thoughts for me, please email me. </div><div><br></div><div><b>Are you blocked on anything?</b></div></div><div>No. </div><div><span style="font-size:12.8px"><b><br></b></span></div><div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><p><b><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">-------------------</span></b></p><b>Akbar Gumbira </b></div><div><b style="font-size:12.8px"><a href="http://www.akbargumbira.com" target="_blank">www.akbargumbira.com</a></b></div></div></div></div></div>
</div></div>