![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,633
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Maybe a feasible improve for next version of Sigil?
Until I reach the final version of an epub, I'm going to generate three, four and even five checkpoints and sometimes I don't remember very well the differences between each one of them.
Would it be possible to have the possibility to associate some lines of text to each checkpoint so that the user can write down what characteristics each one has? |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm not opposed, in theory. I think it would be a handy feature myself. I just don't know how difficult it would be in practice. The checkpoint identifier is actually the github tag name. So we would probably have to get creative to have a "note" value that was associated with each github tag. Perhaps the commit message for the tag, or an annotated tag?
No promises, but I do like the notion. Last edited by DiapDealer; 10-04-2022 at 03:26 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
Join Date: Nov 2009
Device: many
|
I had originally considered that, but in the end I wanted the creation of a Checkpoint to be just a single click and *not* require a more involved prompt for extra information. That said, the checkpoint manager could be modified to allow an extra Notes column. But using it would require intentionally running it to add the note or description *after* creating the checkpoint.
If someone has an idea of how to go about associating a note with the creation of a checkpoint without having to constantly prompt for it, I am all ears. Last edited by KevinH; 10-04-2022 at 06:49 PM. |
![]() |
![]() |
![]() |
#4 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
What's a checkpoint? A marker for something you want to return to?
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
That way, the date/time message could be helpful on it its own, and those who wanted, could change the commit message (or tag annotation) to something more relevant. Just spit-balling. Another slightly out-there option might be to keep a tagname-to-description matrix in an untracked file stored in the repository itself (and included in a default .gitignore) that can be read and written to? Last edited by DiapDealer; 10-04-2022 at 03:44 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#7 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,633
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Another possibility would be, once I had create the checkpoint, to be able to go to checkpoint manager, and there, to have and space (a text field) where I can write something. Of that way, the user who want to write something can do it, and the user who doesn't want, do nothing, directly he doesn't open the checkpoint manager ![]() Last edited by RbnJrg; 10-04-2022 at 05:54 PM. |
|
![]() |
![]() |
![]() |
#8 |
Zealot
![]() Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
|
I think git itself has annotated tag and lightweight tag. So we just need to add a new function to add "annotated tag", and write comment.
|
![]() |
![]() |
![]() |
#9 |
Zealot
![]() Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
|
I think this is hard. But auto create checkpoint before/after file wide operation will be good, like replace all, reformat all,etc.
|
![]() |
![]() |
![]() |
#10 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,600
Karma: 29709834
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I use save as rather than checkpoint, because of a file name. BR |
|
![]() |
![]() |
![]() |
#11 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
Join Date: Nov 2009
Device: many
|
No auto checkpoints will be added. It is a single click to generate one. Only the user can judge when a full checkpoint is needed. Especially as the DryRun replace all allows you to verify correctness easily before large scale find/replace changes.
Annotated Tags with Tag messages are already being used by Checkpoints. The Tag message is autogenerated to keep things a single click. So the only question is about prompting for every checkpoint or allow it only after the checkpoint in the manager if the user wants to add a different message. I do not think prompting for every checkpoint is a good idea. It will just slow things down and is not actually needed. Each annotated tag already has time and date info. The manager will already show that info as well as a summary of files changed by each tag. Detailed compares can be done between any two tags to see specific changes if the file summary is not enough. So if we decide to add this then I think it should be done by adding a message after the fact by selecting a tag. But I took a look at how that could be done as well. There is already a gitignored .bookinfo file that keeps track of current repo head status. It could also keep a tag message history since dulwich does not support the git --edit switch on tags to allow updating the message. Using Tag delete and create does not work as the tag is always built from current HEAD which may differ from when the Tag was originally created. We could try manually editing the tag object in the dulwich object store but that will need to be tested to see if it is possible. So there are problems to be overcome with both suggested approaches if we decide to do this. Last edited by KevinH; 10-05-2022 at 09:16 AM. |
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I agree with all of your main opinions: no prompting at checkpoint creation time (user opt-in or otherwise), and messages added after the fact by selecting a tag.
Now the only problem is figuring out how to accomplish it. ![]() |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You have way more experience with dulwich than I do, but doesn't porcelain's tag_create() have an "objectish" parameter that can be for something other than HEAD that a new tag should point to? I'm just wondering if we could point tags to commits upon creation. So that the original commit will still exist should we try a delete tag/recreate tag scenario. Again; just spitballing.
|
![]() |
![]() |
![]() |
#14 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
Join Date: Nov 2009
Device: many
|
It might be possible. As far as I remember, the Annotated Tag does just point to a separate commit. Deleting and recreating it will change the tag date and time unless we manually back fill it also.
From looking at the dulwich code I see that message is a slot in the Tag object. So I am wondering if we just get the Tag object from the object store using the tag name as key, then change only the message field and write it back with the exact same key to overwrite things in the object store. Not sure if that is doable or not. I may try and add an update_tag_message routine to repomanager.py to see if direct manipulation of an annotated tag message field is possible when I get some time tonight or tomorrow. If it works, we should be able to figure out a way for the manage repos dialog to add that field and allow it to be edited. Last edited by KevinH; 10-05-2022 at 11:06 AM. |
![]() |
![]() |
![]() |
#15 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5702578
Join Date: Nov 2009
Device: many
|
From studying the dulwich code, direct manipulation of the message field of the object is not possible as the message forms part of the data that is hashed to create its id which is how the proper file is found.
Even tag_delete does not remove that annotated tag objects hash file, it just deletes the reference to it. So changing an annotated tag message field directly is not possible, and using tag_delete and tag_create will just leave orphaned hash files in the repo. Perhaps expanding the role of the .bookinfo file to keep a tag description for every tag is the right way to go here. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil version: 0.9.7 | increase | Sigil | 6 | 04-01-2020 09:53 AM |
Would it be possible for a next version of Sigil? | RbnJrg | Sigil | 24 | 02-17-2020 05:59 PM |
Is it feasible to build dictionary with opf2mobi/html2mobi? | EbokJunkie | Kindle Formats | 11 | 01-11-2014 07:51 PM |
Wikipedia (offline) Dictionary? Available? Feasible? | ivanatpr | Amazon Kindle | 2 | 10-22-2010 05:39 PM |