Skip to content

Add Custom Menu#872

Merged
windymilla merged 6 commits intoDistributedProofreaders:masterfrom
windymilla:custom-menu
Apr 9, 2025
Merged

Add Custom Menu#872
windymilla merged 6 commits intoDistributedProofreaders:masterfrom
windymilla:custom-menu

Conversation

@windymilla
Copy link
Copy Markdown
Collaborator

@windymilla windymilla commented Apr 4, 2025

Testing notes: read the help in the dialog itself:

image

The manual is not completely up to date yet.

Fixes #618

@windymilla
Copy link
Copy Markdown
Collaborator Author

windymilla commented Apr 7, 2025

Additional testing notes for $n and $l:

  1. Load any file that has page seps (or if they have been removed, it still knows which page is which)

  2. Add a Custom entry with
    Label: Through Formosa hi-res page
    Command: https://archive.org/details/throughformosaac00ruttuoft/throughformosaac00ruttuoft/page/$n/mode/1up

  3. Go to a page in the text in GG, then use the new Custom command. It should open the "correct" (i.e. same page number as the png number shown in the Img field of the status bar - won't actually be the right image of course unless you have Through Formosa text file loaded) hi-res image at IA as the current page in GG. You don't actually need to use Through Formosa text file to prove it works - you can see by the numbers.

  4. Set page labels in your text file, e.g. for calculation convenience make the page labels start at page 11 instead of page 1.

  5. Change $n to $l (for Label) in the custom command

  6. Now, the IA page number shown should be the label number instead of the png number.

  7. Try changing $l to $(l+3) for example.

  8. Now, the offset should be applied, e.g. if the page label is page 10, then it should display page 13 at IA. Negative offsets are also allowed.

Comment thread src/guiguts/mainwindow.py
Testing notes: read the help on the dialog page.
The manual is not completely up to date yet.

Fixes DistributedProofreaders#618
The custom menu entries were being written multiple
times into the command palette. For now, they will not
be added to the command paletter.
@srjfoo
Copy link
Copy Markdown
Member

srjfoo commented Apr 9, 2025

😁 -- View in browser should be Open in default application, or maybe just View HTML in browser so that it's obvious that only HTML will open in a browser. I had a text file loaded, and it opened in BBEdit.

I think Onelook can be https -- at least it comes up that way.

Other than the first custom menu item not actually bringing up a text file in a browser (and so being mis-labeled), I'm good with 1-5, but my attempts to follow instructions for pulling images from TIA or HathiTrust failed completely. As in -- yes it would bring up the URL and images, but no, I couldn't get it to reliably go to the correct image, even using an offset. I did not use the test example, but chose a couple of projects at random out of the PP pool.

Using $p as a variable for the Page Browser works quite nicely, but that's just another view of the proofing images that the PPer has presumably already downloaded (so now we've got three ways of viewing proofing images. :D

Anyway -- I'm going ahead and approving this, because it's not about that specific item, and I think that the label on the first one and the http -> https can be updated (should you wish to do so) without me needing to retest.

@windymilla
Copy link
Copy Markdown
Collaborator Author

@srjfoo - $s variable has been added, and other minor suggestions (https, and browser button wording) have also been fixed.

@windymilla windymilla requested a review from srjfoo April 9, 2025 16:26
@srjfoo
Copy link
Copy Markdown
Member

srjfoo commented Apr 9, 2025

@srjfoo - $s variable has been added, and other minor suggestions (https, and browser button wording) have also been fixed.

Thanks! The sequence number with an offset works quite nicely for both TIA and HathiTrust.

Not useful
@windymilla windymilla merged commit be86370 into DistributedProofreaders:master Apr 9, 2025
1 check passed
@windymilla windymilla deleted the custom-menu branch April 9, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Custom Menu

3 participants