<div dir="ltr"><div>Thanks for the update. <br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><pre style="color:rgb(46,52,54);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px"><span style="font-family:monospace,monospace">-- <br></span></pre><div style="color:rgb(46,52,54);font-size:14.6667px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;width:71ch"><span style="font-family:monospace,monospace"><span></span><span></span>Ibiam Chihurumnaya</span></div><div style="color:rgb(46,52,54);font-size:14.6667px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;width:71ch"><span style="font-family:monospace,monospace"><a href="mailto:ibiam@sugarlabs.org" target="_blank">ibiam@sugarlabs.org</a><br></span></div><br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 6, 2024 at 5:15 PM James Simmons <<a href="mailto:nicestep@gmail.com">nicestep@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I tried updating feedparser.py with a later version that still fits in two files. It looks like the developers made some attempt to get it working with Python 3 but did not finish it. I spent a couple of hours with it and it looks like it's working. I can browse OPDS feeds now. That's the good news.<div><br></div><div>The bad news is it looks like the OPDS feeds for Feedbooks don't exist anymore and in a month or so Feedbooks itself won't exist. I'm looking into alternative feeds.</div><div><br></div><div>The Internet Archive feeds work. I'm thinking of getting rid of one. It is supposed to list books in alpha order. What it actually does is list out letters of the alphabet and there appears to be no way to drill down to see books for that letter. Even if you could do that, the lists would be too long to be useful.</div><div><br></div><div>There are other lists I might add for Internet Archive. For example, there is one for Kids books.</div><div><br></div><div>Clicking on a book in one of these lists should make it available for download. That isn't working now. I'll fix it.</div><div><br></div><div>There is a way to list out My Books, which are books in your journal. It looks like you can copy books from thumb drives into the Journal too. Looks a bit like my Sugar Commander Activity.</div><div><br></div><div>In any case, I think I can make this Activity worth having.</div><div><br></div><div>James Simmons</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 5, 2024 at 11:20 AM James Simmons <<a href="mailto:nicestep@gmail.com" target="_blank">nicestep@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">It turns out that feedparser has a version that is new enough to support Python 3 but old enough to fit in two files, one of which replaces sgml.py. I can get rid of the current files instead of trying to make them work with Python 3 myself. I'm going to try this tonight.<div><br></div><div>It also turns out that the Activity does use OPDS for Internet Archive, just not for book searches. It uses it to browse catalogs like most downloaded, newly added, alphabetical by title, etc. So if I got that working we'd have a fancier Get IA Books even if Feedbooks goes away.</div><div><br></div><div>James Simmons</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 5, 2024 at 10:07 AM Chihurumnaya Ibiam <<a href="mailto:ibiam@sugarlabs.org" target="_blank">ibiam@sugarlabs.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Agreed, activities depending on external APIs are difficult to maintain and if anyone is willing to do it</div><div>then it can work.<br></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><pre style="color:rgb(46,52,54);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px"><span style="font-family:monospace,monospace">-- <br></span></pre><div style="color:rgb(46,52,54);font-size:14.6667px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;width:71ch"><span style="font-family:monospace,monospace"><span></span><span></span>Ibiam Chihurumnaya</span></div><div style="color:rgb(46,52,54);font-size:14.6667px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;width:71ch"><span style="font-family:monospace,monospace"><a href="mailto:ibiam@sugarlabs.org" target="_blank">ibiam@sugarlabs.org</a><br></span></div><br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 5, 2024 at 6:04 AM James Cameron <<a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Yes, I remember some of this from when I last maintained those activities.<br>
<br>
I felt that activities that depended on external APIs become difficult to maintain. ;-)<br>
<br>
On Mon, Mar 04, 2024 at 01:46:44PM -0600, James Simmons wrote:<br>
> Back in 2009 I wrote the Get IA Books activity which uses the Advanced Search<br>
> service of the Internet Archive to search their catalog and makes it possible<br>
> to download these books to the Journal and put some metadata in there as well.<br>
> <br>
> Shortly after I finished this Sayamindu Dasgupta made a similar Activity that<br>
> used OPDS to search book catalogs. Specifically he was interested in using OPDS<br>
> to search [1]<a href="https://www.feedbooks.com" rel="noreferrer" target="_blank">https://www.feedbooks.com</a>, which had an OPDS server that included<br>
> public domain books. He also made it possible for the Activity user to add an<br>
> entry for his own OPDS server, but you had to edit a text file using the<br>
> Terminal activity to do it.<br>
> <br>
> I have just fixed my own Activity to work with Python 3 and wanted to try<br>
> fixing this one too. I've run into a few problems which makes me think this<br>
> Activity might not be fixable.<br>
> <br>
> 1. Feedbooks.com is going out of business very soon. It is possible that their<br>
> OPDS server is already not working: [2]<a href="https://www.feedbooks.com/catalog/" rel="noreferrer" target="_blank">https://www.feedbooks.com/catalog/</a><br>
> public_domain<br>
> 2. There are other ODPS servers, but not for public domain titles: [3]http://<br>
> <a href="http://opdshome.uo1.net/" rel="noreferrer" target="_blank">opdshome.uo1.net/</a><br>
> 3. The Internet Archive has an OPDS server but this Activity doesn't use it.<br>
> Instead it adapted code from my GetIABooks activity. Apparently the IA OPDS<br>
> server had issues when this was written.<br>
> 3. The Activity makes use of code from [4]<a href="http://feedparser.org/" rel="noreferrer" target="_blank">http://feedparser.org/</a>.<br>
> Unfortunately, the latest version of this cannot be contained in just one file.<br>
> The old version depends on sgmllib.py, which was included with Python 2 but not<br>
> with 3. Somebody found the code for this and ran it through a Python 2 to 3<br>
> converter. I added this to the project.<br>
> 4. I managed to convert enough code in feedparser.py and sgmllib.py to get the<br>
> Activity to run without generating diagnostic messages. I have no idea if it is<br>
> actually working.<br>
> <br>
> Thoughts?<br>
> <br>
> James Simmons<br>
> <br>
> References:<br>
> <br>
> [1] <a href="https://www.feedbooks.com/" rel="noreferrer" target="_blank">https://www.feedbooks.com/</a><br>
> [2] <a href="https://www.feedbooks.com/catalog/public_domain" rel="noreferrer" target="_blank">https://www.feedbooks.com/catalog/public_domain</a><br>
> [3] <a href="http://opdshome.uo1.net/" rel="noreferrer" target="_blank">http://opdshome.uo1.net/</a><br>
> [4] <a href="http://feedparser.org/" rel="noreferrer" target="_blank">http://feedparser.org/</a><br>
<br>
> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>