UpdateFromOPF

A Dropbox & Metadata Editor program for updating OPF files in Calibre.

This program has some features not found in Calibre, that I desired.
Specifically, TRUE titlecase for the ebook title, where every word regardless is capitalized.
Same can be done for Author names & Series title.
Ability to split off Series and Comments in the ebook title, to those fields.
Fixing the author name to First name(s) Last name.
Basically the program attempts to do all that may be desired at the click of one or more buttons.
Like all my programs, the aim is to reduce boring laborious repetitive editing.

Usage of the program, starts with dragging & dropping an OPF file onto the Dropbox, or if the program has been associated in the Windows Registry with OPF files, then using right-click 'Open with' etc.

(v7.5) Added improvements to word removal and Rank checking in the Editor window.

(v7.4) Implemented use of my KindEbook Wishlist program as another source option for Fetch.

(v7.3) Implemented more HTML text corrections.

(v7.2) Added a connection check for fetching the metadata (text or cover). Improved the batch GET option to avoid recording blank description returns.

(v7.1) Improved the GET metadata for all option of the Dropbox, adding a skip existing to query.

(v7.0) Adjusted the program to automatically deal with dual authors on Save (no query). Bugfix for double quotes etc in ebook title file name.

(v6.9) Implemented more HTML text corrections, and a related query.

(v6.8) Implemented more HTML text corrections, including with the FIX button.

(v6.7) Added a GET button to the Dropbox, for batch fetching of metadata for all current library ebooks. An option to use that saved data has been given to the Metadata Editor window FETCH query.

(v6.6) Added + and & as dividers for leading 'The' text in title.

(v6.5) Added command-line support for usage with my 'Get Blurb For Calibre' program.

(v6.4) Improved issue checking & reporting for Author name, now indicated by red text.

(v6.3) The program now deals with and supports adding decimal numbers in the Series. NOTE - This involves using CTRL or SHIFT with the INC button, if needing to increase or decrease.

(v6.2) You can now see or check or change the current default (active) calibre library, plus remove or add other libraries to the selection list.

(v6.1) Finally remembered to add some missing tooltips for buttons etc. Several bugfixes for combo selection issues (index related). Various other little tweaks.

(v6.0) Finally got around to making better sense with the display of 'On Exit' options, etc.

(v5.9) Added a CTRL option to the '1 - Series' button, where you can instead use leading Title text for the Series ... the separator is whatever comes first out of : - (. Minor improvement for the FIX button for Author(s), where an entry is now selected on completion of changes.

(v5.8) Added two buttons to the Editor (Italic or Emphasis and Bold or Strong). Use CTRL to get the alternate option for those plus the Heading button (H3 or H4). SHIFT held down when copying Author name to the Author Sort field, joins multiple author names with an ampersand to that field. Other minor changes to how Comments text is treated after fetching. FIX button for Comments, now shows a query and provides two options, with one being an Input for text replacements.

(v5.7) Bugfixes for multiple author names, including for re-processing. Support added for WIN XP.

(v5.6) The calibre library path is now determined by the last used library in calibre, but can change based on the path of an ebook being processed (Folder button excepted from any processing change).

(v5.5) Many changes & additions & improvements. Existing TAGS can now be optionally transferred to the Comments field on SAVE. A red line appears above the TAGS button when existing Tags are present. TAGS button and other buttons related to Comments have been resized & moved (icons assigned to some), and some new ones added, including a limited UNDO button (only works for last changes from new buttons). Comments code are no longer modified for improved visuals, which can be seen using the Preview button anyway. Path to the calibre library, for 'metadata.opf' being processed, is now explicitly specified.

(v5.4) Major Update. Many changes to the program to support the optional 'Various' as the author name when multiple individual authors detected & queried, with the other author names displayed separately regardless of the new 'Various' setting, plus relocated to 'Comments' etc if 'Various' is enabled. In addition, all author names are now also set separately as a Tag in the XML 'subject' field. Existing tags can now be skipped during saving, if desired (often these Tags are abused). The 'Metadata Editor' window has been enlarged a little to accommodate changes, and the preview popup cover image has been increased in size. A 'TAGS' button has been added to view existing Tags (Subjects). Minor changes have been made to other GUI elements. PLEASE NOTE - The program still needs more intensive testing, as bugs may have been introduced with the complex new changes for authors and related.

(v5.3) Minor bugfixes & visual improvement.

(v5.2) Bugfixes for errors added to calibre metadata, including importing again and using FIX buttons. NOTE - This is primarily for Authors and Comments, for either things overlooked or misunderstood.

(v5.1) Added detection and conversion of some Roman Numerals for Series, when using the RANK button.

(v5.0) Changed the black 'Rank' label to a button, that grabs any number from trailing (first) or leading text from the 'Series' input field, for the 'Series Rank' of current ebook. NOTE - Best used in conjunction with Left and Right Trim buttons. This can make up for some 'Series' button failings.

(v4.9) Added a RELOAD button. EDIT (Preview) button is now named EDITOR. Proper focus now given to Edit field after viewing enlarged cover and upon restoring Editor window from minimize. Editor window is now slightly taller. Edit field, Cover image and SAVE button resized to match changes. Implemented an auto alternate method for direct query of Amazon. CaSe buttons toggle order is now Titlecase first if not.

(v4.8) Case buttons for Title and Author, now toggle between UPPERCASE and Titlecase. BUGFIX for case change to Author name that wasn't sticking (finally solved I hope).

(v4.7) Added some additional fixes for bad html elements (removes incorrect space).

(v4.6) Added a PREVIEW button for Comments, to show what they will look like in Calibre. Font Size for Comments can now be toggled through a few larger sizes with a SIZE button, to make editing easier. Tag replacements for HTML in Comments, are now mostly automatic, for easier viewing etc.

(v4.5) Bugfix & Improvements. Added a FIX button for issues with Comments saving. Author Initials has better processing etc.

(v4.4) Bugfix & Improvements reading & fetching metadata, and hopefully no more fetching wrong titles.

(v4.3) Added further improvements for HTML Tag replacements, both visually and behind the scenes. User if savvy, can also add others to an INI entry, section [HTML Replacements] in the Settings.ini file.

(v4.2) Added an alternate fetch method, Method 1, for Amazon, which is now the default. HTML Tag Errors has had an improvement for reporting and checking. NOTE - Method 2 (prior method) sometimes does not return enough text.

(v4.1) BUGFIX for some Html tags (if Amazon fetch was used), that are now converted to work correctly. Added a count check of words in Description (Summary/Blurb) before and after Save, with a prompt if no match. NOTE - Implemented due to the odd rare failure ... some Html/Calibre compliance related issue.

(v4.0) Minor improvements or Tweaks.

(v3.9) Bugfix for initials space detection in Author Name(s). Using CTRL with the AMAZON FETCH button, will now alternatively open the user's web browser to the ebook's Amazon page.

(v3.8) Changed text of SWAP button to FLIP. The resulting red 'Cover Available' label can now be clicked to show an image popup of the Amazon ebook cover.

(v3.7) Improved Author initials issue detection, and added a SHIFT key option to the author FIX button to correct those issues. Some corrections may require standard use of FIX button first. Amazon cover notification display changed. Extra colons in title no longer automatically changed to dashes. Bugfix. Some checking and reporting for missing HTML Tag pairs in 'Comments' after Amazon query.

(v3.6) Added to the AMAZON FETCH button process a retrieve (download) the Amazon cover, as an alternate cover option. Which if successful, is accessible via the Cover FETCH button and 'Amazon' button on that resulting window (it can toggle between existing images).

(v3.5) Added an AMAZON FETCH button to the fetch download result window, which gives the possibility to get an alternate description. The MOBI-ASIN (if found) is now displayed as part of that window title. The new AMAZON FETCH ability requires gzip.exe (included), but can also use 7-zip if found instead.

(v3.4) Added FETCH buttons for both Metadata and the Cover, which obtains those elements from the web, and displays in a relevant window, for selection to ADD or REPLACE the existing for current ebook.

(v3.3) Added a Job Number change option, with SAVE button moved a little to accommodate. Ebook Cover relocated and enlarged and Comments field reduced to accommodate.

(v3.2) Added a check & report for space(s) when there are initials in an Author Name. This is NOT on by default, but can be set so in the 'Settings.ini' file. You would enable this if you care about how the spaces occur. Typically I only like a space between initials and the author name, not between initials themselves.

(v3.1) Added ' - ' as the final separator check for splitting the book title text to get Series, plus if no separator is found the full book title text is used for the Series name. Alternate dash is now also used as a separator if found, for Comments and Series. Added a separator query for Comments.

(v3.0) Added a Job book number to the Editor title, to help keep track of the number processed (while the program is running).

(v2.9) Added a CTRL option to the FIX button, so that any alpha text separated by a space in the Author name is converted to uppercase if less than 3 characters. You can now use CTRL (copy) or SHIFT (move) with the '2 - Comment' button, to do a partial or full restore to the 'Title' input field (based on colon, dash, bracket or none).

(v2.8) Added CIA, FBI, MI5, USA to Titlecase abbreviations.

(v2.7) Trailing punctuation in an ebook title is now removed, during copy to Comment or Titlecase.

(v2.6) Bugfix & improvement to Metadata viewer window title detection.

(v2.5) Mouse now needs to be moved slightly less again, for cover preview to close. In an effort to help speed up Metadata viewer window detection, for automated closing, the code has been modified again, plus an INI 'start' option added, which is the delay after starting the viewer before checking. The default was 500, but is now 1000 (1 second), which the user can modify in the 'Settings.ini' file. Right Trim for series has been improved for trailing punctuation etc.

(v2.4) Improved restoring of a title from the title sort field, when a ', The' variant exists. Changed the order of priority when extracting comments from the title field (bracket now first, then dash, then colon). BUGFIX for a slow Metadata viewing program startup, to catch the correct Window handle & title. NOTE - That 'wait' value is now read from the 'Settings.ini' file, and so it can be manually changed. The default was 2 seconds, it is now 5. For me, it is always the first startup that is significantly slower on my PC, and therefor hard to test for again once it has occurred, without a PC restart.

(v2.3) Support added to Minimize the Metadata viewing program (i.e. SciTE) when SAVE is clicked.

(v2.2) BUGFIX for the Author FIX button, where a value wasn't cleared and the Author name was being duplicated if clicked more than once. Mouse now needs to be moved slightly less for cover preview to close. Finally remembered to give a browse method to set the OPF file viewer program (default is SciTE if found at the standard location or Notepad). ADVICE - Clicking the VIEW METADATA button again, with CTRL held down, allows browsing for an alternative Viewer. NOTE - Until now, the VIEW METADATA button executed whatever program was associated with OPF files, which for me was SciTE. My apologies for not fixing this sooner.

(v2.1) Modified the floating 'Start' toolbar, and the 'Run calibre on exit' option, so that another program can be used instead, on exit etc (i.e. my 'Batch Ebook Convert' program). The window position for the Dropbox is now remembered on closing.

(v2.0) Added an extra option of a floating Start toolbar, to the 'Run calibre on exit' option, that has a START and CANCEL button. NOTE - I added this, because I now use my EbookConvert program before calibre is started (a requirement).

(v1.9) Added another Drag & Drop input at the bottom of the dropbox, for checking if a metadata OPF file exists in a folder or sub-folder.

(v1.8) Added a thumbnail image of ebook cover, which can be clicked to see a much bigger image. A file called 'cover.jpg' must exist in the OPF file folder. Minor updates to Program Information dialog.

(v1.7) Improved how leading 'The' is set as trailing ',The'. To make things look nicer in several fields, any '&amp;' is now replaced by an '&' but restored on SAVE. A special '+' sign is also used with an Author name, to restore any '&amp;' on SAVE. Any standard plus sign is maintained throughout. These niceties allow users to use regular text and not worry about the vagaries of an illegal '&' character in XML metadata entries. NOTE - Normally only a single Author name is stored in metadata, but I decided to support any unlikely situation, like 'Schuster &amp; Schuster' or 'Schuster + Schuster'.

(v1.6) Bugfix and Improvement to Series processing. I have also hopefully now solved the unnecessary opening of the calibre library folder, when any working sub-folder is still open. Relocated SAVE button again, to be more convenient for my usage (as I always use the METADATA button for failsafe backup).

(v1.5) When relocating multiple authors, you can now elect to have ' & others' text added to remaining first author. The '2 - Comment' button is no longer disabled after use, and can now be re-used in some instances, to relocate even more text. The 'Comments' field has been increased in height again, because the SAVE button has been relocated to its right. TRIM button renamed to LTRIM and the trim right code moved to a new RTRIM button. CASE buttons relocated to the right of their respective fields.

(v1.4) Implemented my own much improved version of Titlecase (built-in Propercase function lacks in many areas). Increased the height of the 'Comments' field, and then added an 'Alway save to calibre' option, to save on clicks ... for those like me who always save that way. Series button restored after a wipe. Drag & Drop support added for a single OPF metadata folder or sub-folder.

(v1.3) Calibre library folder has now been changed to forcibly close only when Saving to calibre, thus leaving the folder open if not doing that.

(v1.2) Calibre library folder is now forcibly closed when OPF file imported, and if set, re-opened after saving the metadata changes to calibre. NOTE - This is done to prevent any leftover empty folders.

(v1.1) When the extract '1 - Series' button has been used, it then becomes a 'Wipe Series' field button, in case you should need a quick clear method. The FIX button for Author(s), now reports on any multiple author names found and queries moving all but the first to the Comments field, if desired. The extract '2 - Comment' button is now disabled after use. Any carriage return or line feed in original Comments (description) is now ignored and left as, rather than display such in the Comments field, to avoid the potential of user error (unwanted insertions at such a point).
