View Single Post
Old 06-18-2024, 10:18 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,858
Karma: 6120478
Join Date: Nov 2009
Device: many
FWIW, the Sigil Checkpoints feature uses git (actually a pure python implementation of it called dulwich) to create "checkpoints" ie. tags and compare across tags, and generate a history, manage repos, etc. Each epub repo has a particular unique identifier based on the uuid id set in the OPF, etc.

You can find these repos in your Sigil Preferences folder in the repos folder.
Each of these repos are completely git compatible and I have often used git directly on them to do merges and things.

Unfortunately dulwich does not itself support merging, and its main dev has a terrible not-invented-here syndrome which prevents him from not messing (read that breaking) any string of commits needed to actually properly enable merging. So I just gave up after 5 plus years of trying. I do have my own personal version of dulwich I call pyrotter that does properly handle merges.

So fire up Sigil, load an epub, make a checkpoint by clicking the checkpoint button, and then make some changes and then use Sigil's to compare your current epub to the previous checkpoint. Check out the manage repos, and etc.

Then go find the underlying git repo inside the Sigil Preferences folder inside of repos and use git on it to play around.

The dulwich routines that are used to implement checkpoints are all in python and easy to read and follow.

See:
https://github.com/Sigil-Ebook/Sigil...repomanager.py

With those as a guide, and dulwich, you should be able to create a nice external git repo interface or figure out how to push or pull from Sigil's internal repo to your own.

Hope this helps.

Last edited by KevinH; 06-18-2024 at 10:34 AM.
KevinH is offline   Reply With Quote