<div dir="ltr">Hi Matthias, <div><br></div><div>Thanks for the feedback. Unfortunately raw URL is only provided for a single file, not a directory. As one repository could have many collections (collection is a directory containing resources), with git protocol, there are 2 ways downloading a single collection from a repository: git sparse checkout and git archive. Sparse checkout is not supported in Dulwich nor in Pygit2 (a Python wrapper using libgit2). And with the 2nd option, Github doesn't allow git archive.</div><div><br></div><div>One other alternative (which I am exploring now) is to clone a repository the first time user downloads a collection from that repository, and next time user downloads other collections from that repository, we just need to update and pull that repository. This is more efficient compared to downloading the whole repository (using zip url) every time user wants to download a collection.</div><div><br></div><div>We came to the decision that one repository could have many collections in the first place as it doesn't make sense  (we thought) for users to create one repository only for one collection.</div><div><br></div><div>Cheers</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 26, 2016 at 7:50 PM, Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias@opengis.ch" target="_blank">matthias@opengis.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Akbar,<br>
<br>
thanks a lot for the update, I especially liked the video, this makes it<br>
a lot easier for the audience (at least me :) ) to get an impression of<br>
the status quo. Good job so far!<br>
<br>
Concerning dulwich, did you checkout the #dulwich IRC channel and the<br>
mailing list which are mentioned in the project's readme [1] ?<br>
<br>
What exactly are the efficiency problems you are referring to? Maybe<br>
it's also worth looking into downloading individual files over http<br>
instead of the whole .zip file (<a href="http://raw.githubusercontent.com" rel="noreferrer" target="_blank">raw.githubusercontent.com</a>), that also<br>
allows doing partial downloads if you don't need a complete repository<br>
and you know which files you want.<br>
<br>
Looking forward to hearing more of this project, keep up the good work!<br>
<br>
Matthias<br>
<br>
[1] <a href="https://github.com/jelmer/dulwich#help" rel="noreferrer" target="_blank">https://github.com/jelmer/dulwich#help</a><br>
<span class=""><br>
On 06/26/2016 07:10 PM, Akbar Gumbira wrote:<br>
> Hi,<br>
><br>
> I made a video of the progress so<br>
> far: <a href="https://www.youtube.com/watch?v=OmJ2Vh3a63U" rel="noreferrer" target="_blank">https://www.youtube.com/watch?v=OmJ2Vh3a63U</a><br>
><br>
><br>
</span>> *What did you get done this week?*<br>
><br>
>   * Saving the metadata of the collections to local as a cache (after<br>
<span class="">>     some operations like adding/removing/deleting repository) so that<br>
>     when user doesn't have internet, (s)he will still be able to browse<br>
>     collection.<br>
</span>>   * Filtering collections with custom QSortFilterProxyModel to allow<br>
<span class="">>     filtering based on author, name, description, etc.<br>
</span>>   * Fix unicode problem (The problem is when parsing the metadatafile.<br>
<span class="">>     Using ConfigParser it was read as str. Changed it to<br>
>     SafeConfigParser with codecs module)<br>
</span>>   * Implemented reload repositories. Also when fetching metadata, never<br>
>     use cache<br>
>   * Implemented Ale's suggestion to have a directory file in official<br>
<span class="">>     repository and containing available repositories (and by default all<br>
>     those repositories will be registered in the plugin)<br>
</span>>   * Still thinking to use git as it will be more efficient rather than<br>
<span class="">>     using zip url and tried Dulwich (Python pure git implementation),<br>
>     but it's freezing the UI (see the video above)<br>
><br>
</span>> *What do you plan on doing next week?*<br>
><br>
>   * My code is getting harder to read. Need to refactor some and make tests<br>
>   * Tried to load a repository that contains 1000 collections. Right<br>
<span class="">>     now, I just saved the metadata's cache (dict) to the qsettings. The<br>
>     QGIS config file is getting too big. WIll move this to a separate<br>
>     pickled file.<br>
</span>>   * Explored Dulwich more<br>
<span class="">><br>
><br>
> Are you blocked on anything?<br>
> I have problem with Dulwich. It's freezing the UI. I want to show the<br>
> progress of cloning/pulling repository realtime but I haven't figured<br>
> out a way yet.<br>
><br>
> --<br>
><br>
</span>> *-------------------*<br>
><br>
> *Akbar Gumbira *<br>
> *<a href="http://www.akbargumbira.com" rel="noreferrer" target="_blank">www.akbargumbira.com</a> <<a href="http://www.akbargumbira.com" rel="noreferrer" target="_blank">http://www.akbargumbira.com</a>>*<br>
><br>
><br>
> _______________________________________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
><br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div><br><br clear="all"><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:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-------------------</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>