Standard Ebooks Synchronization Script (sebsync)

260 views
Skip to first unread message

Paul Bryan

unread,
Jul 22, 2024, 9:16:01 PM7/22/24
to Standard Ebooks
For months I've had a Python script to synchronize the Standard Ebooks catalog to EPUBs in my local filesystem. I've now cleaned it up and packaged it up as a tool that others can use.

It will automatically download new books, as well as any books that have been updated since they were last downloaded. Book updates will update the books in place in your library.

In order to use it, you'll need to be a member of the Patrons Circle, or have previously produced a book, as it uses the OPDS feed to get metadata on all books in the Standard Ebooks catalog.

Paul

Kevin Palm

unread,
Jul 23, 2024, 8:01:28 AM7/23/24
to Standard Ebooks
Hi, Paul!

What an EXCELLENT idea!  I tried downloading sebsync, though, and got this error:

Fatal error from pip prevented installation. Full pip output in file:
    /home/kevin/.local/pipx/logs/cmd_2024-07-23_07.56.31_pip_errors.log

Some possibly relevant errors from pip install:
    ERROR: Ignored the following versions that require a different python version: 1.0a1 Requires-Python <4.0,>=3.12
    ERROR: Could not find a version that satisfies the requirement sebsync (from versions: none)
    ERROR: No matching distribution found for sebsync

Error installing sebsync.


Any suggestions? I'm currently running Python 3.10.12. Could that be the issue?

Paul Bryan

unread,
Jul 23, 2024, 9:41:54 AM7/23/24
to standar...@googlegroups.com
That is the issue. I've just dropped the dependency down to Python 3.10. Let me know if that works better.
--
You received this message because you are subscribed to a topic in the Google Groups "Standard Ebooks" group.
To unsubscribe from this group and all its topics, send an email to standardebook...@googlegroups.com.

Kevin Palm

unread,
Jul 23, 2024, 10:53:40 AM7/23/24
to Standard Ebooks
Thanks, Paul!  That worked for the download, but I get this error when I run it:

Traceback (most recent call last):
  File "/home/kevin/.local/bin/sebsync", line 8, in <module>
    sys.exit(main())
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/sebsync.py", line 199, in main
    sebsync(auto_envvar_prefix="SEBSYNC", show_default=True)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/sebsync.py", line 174, in sebsync
    remote_ebooks = get_standard_ebooks(opds, email)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/sebsync.py", line 64, in get_standard_ebooks
    updated=datetime.fromisoformat(entry.find("atom:updated", ns).text),
ValueError: Invalid isoformat string: '2024-07-22T17:33:40Z'

Paul Bryan

unread,
Jul 23, 2024, 11:32:21 AM7/23/24
to standar...@googlegroups.com
That's a new one for me. I'll take a look at it this morning. In order to avoid noise on this list, I've opened an issue in GitHub. Feel free to watch it for an update.

Kevin Palm

unread,
Jul 23, 2024, 12:27:46 PM7/23/24
to Standard Ebooks
Roger that!  Thanks!

Hendrik Kaiber

unread,
Jul 23, 2024, 5:20:35 PM7/23/24
to Standard Ebooks
Just wanted to say thank you for this tool, I tried and worked great, this will really help me keep my library updated!

-Hendrik

Paul Bryan

unread,
Jul 23, 2024, 5:59:20 PM7/23/24
to Standard Ebooks
Glad it's working! 🙂

Alex Cabal

unread,
Jul 23, 2024, 9:16:11 PM7/23/24
to standar...@googlegroups.com
Very cool Paul, thanks for putting it together!

On 7/23/24 4:59 PM, 'Paul Bryan' via Standard Ebooks wrote:
> Glad it's working! 🙂
>
> On Tuesday, July 23, 2024 at 2:20:35 PM UTC-7 hendrik....@gmail.com wrote:
>
> Just wanted to say thank you for this tool, I tried and worked
> great, this will really help me keep my library updated!
>
> -Hendrik
> Em terça-feira, 23 de julho de 2024 às 13:27:46 UTC-3,
> pipe...@gmail.com escreveu:
>
> Roger that!  Thanks!
>
> On Tuesday, July 23, 2024 at 11:32:21 AM UTC-4 Paul Bryan wrote:
>
> __
> That's a new one for me. I'll take a look at it this
> morning. In order to avoid noise on this list, I've opened
> an issue in GitHub. Feel free to watch it for an update.
>
> https://github.com/pbryan/sebsync/issues/1
> <https://github.com/pbryan/sebsync/issues/1>
>
> On Tue, Jul 23, 2024, at 07:53, Kevin Palm wrote:
>> Thanks, Paul!  That worked for the download, but I get
>> this error when I run it:
>>
>> *Traceback (most recent call last):
>> *
>> On Tuesday, July 23, 2024 at 9:41:54 AM UTC-4 Paul Bryan
>> wrote:
>>
>> __
>> That is the issue. I've just dropped the dependency
>> down to Python 3.10. Let me know if that works better.
>>
>> On Tue, Jul 23, 2024, at 05:01, Kevin Palm wrote:
>>> Hi, Paul!
>>>
>>> What an EXCELLENT idea!  I tried downloading sebsync,
>>> though, and got this error:
>>>
>>> *Fatal error from pip prevented installation. Full
>>> pip output in file:
>>>
>>> /home/kevin/.local/pipx/logs/cmd_2024-07-23_07.56.31_pip_errors.log
>>>
>>> Some possibly relevant errors from pip install:
>>>     ERROR: Ignored the following versions that
>>> require a different python version: 1.0a1
>>> Requires-Python <4.0,>=3.12
>>>     ERROR: Could not find a version that satisfies
>>> the requirement sebsync (from versions: none)
>>>     ERROR: No matching distribution found for sebsync
>>>
>>> Error installing sebsync.*
>>>
>>> Any suggestions? I'm currently running Python
>>> 3.10.12. Could that be the issue?
>>> On Monday, July 22, 2024 at 9:16:01 PM UTC-4 Paul
>>> Bryan wrote:
>>>
>>> For months I've had a Python script to
>>> synchronize the Standard Ebooks catalog to EPUBs
>>> in my local filesystem. I've now cleaned it up
>>> and packaged it up as a tool that others can use.
>>>
>>> https://pypi.org/project/sebsync/
>>> <https://pypi.org/project/sebsync/>
>>>
>>> It will automatically download new books, as well
>>> as any books that have been updated since they
>>> were last downloaded. Book updates will update
>>> the books in place in your library.
>>>
>>> In order to use it, you'll need to be a member of
>>> the Patrons Circle, or have previously produced a
>>> book, as it uses the OPDS feed to get metadata on
>>> all books in the Standard Ebooks catalog.
>>>
>>> Paul
>>>
>>>
>>> --
>>> You received this message because you are subscribed
>>> to a topic in the Google Groups "Standard Ebooks" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/standardebooks/VGmgYl1iHrE/unsubscribe <https://groups.google.com/d/topic/standardebooks/VGmgYl1iHrE/unsubscribe>.
>>> To unsubscribe from this group and all its topics,
>>> send an email to standardebook...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/standardebooks/014f928c-490a-4dcb-830f-d2103c2fe80dn%40googlegroups.com <https://groups.google.com/d/msgid/standardebooks/014f928c-490a-4dcb-830f-d2103c2fe80dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>
>>
>> --
>> You received this message because you are subscribed to a
>> topic in the Google Groups "Standard Ebooks" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/standardebooks/VGmgYl1iHrE/unsubscribe <https://groups.google.com/d/topic/standardebooks/VGmgYl1iHrE/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an
>> email to standardebook...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/standardebooks/bd25d483-6238-471d-a994-c1b9ddebf10en%40googlegroups.com <https://groups.google.com/d/msgid/standardebooks/bd25d483-6238-471d-a994-c1b9ddebf10en%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Standard Ebooks" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to standardebook...@googlegroups.com
> <mailto:standardebook...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/standardebooks/c5d468e6-1b74-45b7-9304-6b4bfd792ed9n%40googlegroups.com <https://groups.google.com/d/msgid/standardebooks/c5d468e6-1b74-45b7-9304-6b4bfd792ed9n%40googlegroups.com?utm_medium=email&utm_source=footer>.

David at Standard Ebooks

unread,
Jul 23, 2024, 9:57:28 PM7/23/24
to standar...@googlegroups.com
Thanks very much, Paul. Any chance of adding an option to just download/sync the kepub versions of our titles?

David / Melbourne, Australia 

Paul Bryan

unread,
Jul 23, 2024, 10:03:43 PM7/23/24
to standar...@googlegroups.com
That should be doable. Could you open an issue in GitHub?
--
You received this message because you are subscribed to a topic in the Google Groups "Standard Ebooks" group.
To unsubscribe from this group and all its topics, send an email to standardebook...@googlegroups.com.

Paul Bryan

unread,
Jul 23, 2024, 10:52:56 PM7/23/24
to standar...@googlegroups.com
Added `--type` parameter in version 1.0a4. Supports: compatible, kobo, advanced. Please let me know how it works.

Paul Bryan

unread,
Nov 22, 2024, 2:59:28 AM11/22/24
to Standard Ebooks
I've just released sebsync 1.0.6. It can now display or remove outdated (when updating is disabled) and/or deprecated ebooks (i.e. when ebook identifiers change in Standard Ebooks’ catalog).

Details can be found on the GitHub page:

Kevin Palm

unread,
Nov 22, 2024, 8:20:37 AM11/22/24
to Standard Ebooks
Awesome, Paul! I can't use it yet since I have a kindle (I did vote for that enhancement in your GitHub issue), but I have a question for the future: I use calibre to organize my ebooks (I have all of the Standard Ebooks in a dedicated library). Have you tried your app with calibre? I used to use an OPDS plugin with calibre, but I had to abandon it after the feed required authentication (The author doesn't use authentication himself, so he's not likely to incorporate it into his app), so this will be a godsend if you make it able to download kindle format books!

Kevin Palm

unread,
Nov 22, 2024, 9:28:54 AM11/22/24
to Standard Ebooks
So, I answered my own question concerning calibre.  After I installed sebsync 1.0.6, I downloaded an epub of "Paradise Lost," since it was the most recently updated, and I imported it into calibre. I then ran sebsync, pointing the "books" parameter to my calibre Standard Ebooks library. It downloaded the entire corpus EXCEPT for "Paradise Lost," so I'd consider that a success!  Now, if you get it to download azw3 files, I'll be a happy camper! :-) Great work, Paul! 

Paul Bryan

unread,
Nov 22, 2024, 12:27:28 PM11/22/24
to Standard Ebooks
Excellent. Glad to know it's playing nice with Calibre. For Kindle support, at a minimum, we'd need to find a way to embed the book identifier into the exported azw3 files. It would be ideal as well to include the `dcterms:modified` element. It's unclear to me if that's even possible.

Kevin Palm

unread,
Jan 9, 2025, 6:56:57 PM1/9/25
to Standard Ebooks
Paul,

I recently jailbroke my kindle and installed KOReader so I can now read epubs natively, and sebsync is a godsend since I replaced all my SE azw3s with epubs!  I do have a question about it, though. I use calibre to maintain my SE library and, while it's great that sebsync automatically replaces updated books in the library, calibre doesn't record the updated modification date of the file so I can't tell at a glance if the books are the most recent version. Is there any way to have sebsync download updated books to the same directory that it downloads new books to?  That way I can add the updated versions and delete the duplicates manually. Not a dealbreaker by any means, just something that would be helpful to me! :-)

Kevin Palm

unread,
Jan 9, 2025, 7:05:45 PM1/9/25
to Standard Ebooks
I submitted an issue to GitHub, if that helps.

Kevin Palm

unread,
Jan 9, 2025, 7:10:57 PM1/9/25
to Standard Ebooks
Never mind, I see that you already implemented that feature in in version 1.0.3! It helps to look at closed issues before submitting new ones... :-)

Paul Bryan

unread,
Jan 9, 2025, 11:57:45 PM1/9/25
to standar...@googlegroups.com
I'm glad it's working for you!
You received this message because you are subscribed to the Google Groups "Standard Ebooks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to standardebook...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages