Jump to content

TheSaint

MVPs
  • Posts

    15,692
  • Joined

  • Last visited

  • Days Won

    455

TheSaint last won the day on April 17

TheSaint had the most liked content!

About TheSaint

  • Birthday June 8

Profile Information

  • Member Title
    Sharpest Tool On The Shelf
  • Location
    South Downunder
  • Interests
    Guitar
    Songwriting & Recording
    Music
    Reading - Fiction & Non-Fiction
    Computers
    Technology
    Life concepts
    Programming with AutoIt of course
    Oops I forgot Sex and Humor ... possibly together even.

Recent Profile Visitors

5,143 profile views

TheSaint's Achievements

  1. Latest v1.2 update now available, see the first post. Some more improvements came to mind, and I discovered a rare file name issue. Latest Changes Some of this will come in handy when I get around to addressing (fixing) black & white and wrong size cover images, next time the battery in my Kobo device is flat.
  2. A note about the new orange row entries. I've discovered, that some ebooks share the same sub-folder numbers. Three ebooks worth of images (9 in total) in the same folder, is the most I have seen so far, so the numbers on many occasions are not unique to just one ebook. Mostly though, when it occurs it is just images for two ebooks (6 in total). The new right-click 'Mismatch' option is great for revealing all such cases. And now a reminder, that it isn't just images for ebooks on your Kobo device that can appear in the number sub-folders. It appears that some other images show up, that are either advert related or related to a specific author or ebook. So in some cases, the extra or additional ebook(s) in the number sub-folders are that type. This occurs even more in the device sqlite file.
  3. Latest v1.1 update now available, see the first post. My program has now had some significant use by me, and so I've modified a few things and even added some others. It should be pretty close to its final form now. Latest Changes That last modification, can kind of qualify as a bug fix, but unlikely to impact anyone who has less than 700 or so ebooks on their Kobo device. I was impacted at 729. Apart from those five ebooks I mentioned, all my ebooks now have cover images, though I still need to correct a few cover images that are Black & White or wrongly sized.. So that a fix so far for a few hundred ebooks on my Kobo device. P.S. I may yet add some kind of comparison option, to more easily discern if fixed images, do indeed become unfixed by the device software at any point. I've discovered none so far, when I sync, though some ebooks on my device do still lose one or more of their cover files. I guess I will find out soon enough. I am hoping for a permanent fix of course, but that might not be attainable. As it is, newly added ebooks seem to mostly lose their cover images. That last, may be due to how I add them to my device ... syncing fails for me, so I have to pretend each of them is the ebook I want to read now, and so they immediately download and open, and then I close them and reset to 'unread'. And there will still of course be the issue with newly side-loaded ebooks, where they often end up a Black & White variant and or the wrong image size. So I ill likely be using my program somewhat regularly, if only for a few ebooks each time.
  4. Latest update now available, see the first post. Sometimes I make myself laugh ... which is probably a good thing. I can be so sure I've come to end of thinking of new additions and changes, and then something else pops into my brain while asleep or during waking. Such happened today, and so we have another update. Basically, as I was waking, I was contemplating how best to approach working with the Kobo device today. I knew the battery was flat, and that it takes around an hour to charge, so I had that window before I then started getting USB connection issues due to the device being fully charged. So I wanted to make the most of it. That was when it occurred to me that some kind of guide via my program would be helpful in speeding things up etc. That meant having controls (buttons) indicate they were the one to click to get started etc. The first approach I thought of, was using a graphic rectangle around a button, that was colored red, and hide or show that as needed. I'd done that before in a couple of programs, but as I recalled it, it could be a bit tricky ... and I couldn't recall what programs I'd done it to, so would either have to spend time searching for one, or attempt to do it all again from scratch. Then I thought that colored text on the buttons could be almost as effective, so did that instead. Of course, you could color the buttons instead, but you can lose the visual of the push effect. Latest Changes Anyway, I did some of that stuff after creating or adding images to my Kobo device. I managed to process over 100 entries today, and about a third of that was done before implementing the new auto NEXT option. Aside from one ebook, which I need to redo, all the others worked a treat. I'm not sure what happened with that one ebook, but I had connected my Kobo device via wifi a couple of times since building my working list, and sometimes missing number sub-folders and images on them get created during a sync, so it could be related to that. I used my newish 'Restore' option to reset for that entry, but not yet redone it because my Kobo was fully charged and the USB connection started playing up again. P.S. At this point I am not sure, if syncing sometimes causes a loss of number sub-folders and thus their contained cover images. In any case, I have been building a record with my program, and so I guess I will see if that ever happens, or is just the result of my device not downloading everything properly from Kobo.
  5. Latest update now available, see the first post. If I had only realized, there was so little to do, I would have included the changes in my last update. But I was too tired to investigate anything more yesterday. Anyway, I checked today, and determined I needed to do very little, to get the FIX COVERS button code up-to-speed. I've not changed anything substantial in the way it works, just some of the record keeping aspect. See the following details. Please be advised though, that I haven't tested the process yet ... not since I last tested at least 10 months ago. It should work like it did previously, just with extra records. Some related stuff follows. This will hopefully be the last update, at least for a while, unless I find a bug. So I am now seeing my program as version 1, and essentially as a full version, some incomplete aspects aside, which are not a requirement to use the program successfully. As I have stated previously, I probably won't ever complete those lesser aspects ... not unless I find I need to for something. I now intend to use my program in earnest, which will test all the major elements, including the FIX COVERS button code. Enjoy!
  6. Latest update now available, see the first post. I did a stack of work today on the program .... then did a stack more. I started off with some improvements that had occurred to me since yesterday, then discovered a couple of bugs, then thought of some more improvements. Then I discovered my Kobo device was almost flat, so a good time to work with it and test a bunch of things. That led to me finding things weren't as good as I wanted them to be, and that I hadn't completed some stuff that needed to be. So implemented a bunch of things and kept testing, and decided I needed to do a few more, and before you knew it most of the day had disappeared. Eventually my Kobo device was fully charged and so kept connecting and disconnecting, so no more testing, though I still had a bunch of things to code and test without needing my device. Latest Changes While not a huge list, it was a lot of work. I'm pretty sure I still need to do more, especially as I haven't looked at the FIX COVERS code again, yet ... not for 10 months at least. I imagine the process still works okay, just needs some additional Log file recording (perhaps). and some visual updating to the list etc, and perhaps some other records. Anyway, I am pleased to say that the many covers created on my Kobo device today, did the job and worked well. Only a few hundred left to do. Those Fuschia colored rows are successful images copied to my Kobo device. Mostly it was three images per each ebook, but sometimes only one was required. If you look back at a previous screenshot, you can see what has changed.
  7. I thought it was time to amend a few things in the first post, so I've done that, and also added a new update to download there. Latest Changes Hopefully my bugfix did not break anything, as it was somewhat elusive to figure out.
  8. Latest update now available, see the first post. Okay, as I was waking today, it suddenly occurred to me that I had missed a very obvious improvement. This was a Dropzone for quick and easy renaming and copying of a cover image file, in preparation for the main usage of my program. So after pondering on how best to do that, with limited GUI space, I did the following ... optionally repurposed the 'Cover Image' preview field. To do that, you need to enable it via a checkbox on the 'Settings' window. So basically I did the following. That means another level of automation, making things quicker and less fiddly etc. Enjoy!
  9. Latest update now available, see the first post. Everything is now in a single ZIP file, including an EXE version. While the program is still not fully complete, it is complete enough to do what it needs to, and I may never get around to fully implementing the Clone stuff etc. Here's what I worked on today. Here's the latest screenshots. That's it. Enjoy! P.S. I am now going to start using my program in earnest, as a lot of cover image files are missing on my Kobo device. It will be a lengthy process though, with most of that taken up with retrieving image files for those ebooks, that luckily exist in my copy of calibre, and using the clipboard button to retrieve text, to rename them appropriately, before moving each image file to the 'Cover Images - Source' folder, and then refreshing the display of that folder content. I have two calibre library folders I need to keep swapping between - Digital Editions, which has all my DRM ebooks from Kobo, plus Kobo (DRM-Free), which is for ebooks that came DRM-Free from Kobo. While the greater number of my Kobo ebooks are in the Digital Editions library folder, I still have a lot in the Kobo (DRM-Free) library folder.
  10. That worked too, once I added in the two functions created by ChatGPT.
  11. It's a watery based version of ChatGPT in bathers or swimsuit.
  12. You are right. And I even consulted with ChatGPT back then, but got nowhere. Maybe I'm a bit smarter now, and perhaps ChatGPT is too. In any case, we painstakingly worked our way through it all this time, and things were discovered that weren't last time. The code covered in this topic is only half the Python code. Then ChatGPT and I worked on the other half, and solved that too. My feedback to ChatGPT was vital, as it allowed it to explore other avenues, which in the end finally resulted in the solution. We went very deep, and I can now claim to have worked successfully with ChatGPT, and that without its help, I would not have succeeded. As they say, if at first you don't succeed, then try try again.
  13. Okay, I've now done away with the previously required Python executable and code. Thanks to my persistence and the heavy lifting of ChatGPT, we finally wrestled a solution using pure AutoIt to get the correct numbered sub-folders for cover images for an ebook. You can read about some of that here. NOTE - This was based on some Python code I found in a file of my calibre install. The original Python script can be found in the Other Dependencies.zip file. See the first post for the updated downloads. The Other Dependencies.zip file is now around 7 MB smaller. P.S. Please note that this has had minimal testing so far.
  14. Okay, I don't believe it, ChatGPT actually solved it. First time ever for me. Local $inputstr = "file____mnt_onboard_Imports_Brandon_Sanderson_Shadows_Of_Self_-_Brandon_Sanderson_epub" ConsoleWrite("Final Hash: " & qhash($inputstr) & @CRLF) Func StringToUTF8($str) Local $utf8 = "" For $i = 1 To StringLen($str) Local $c = AscW(StringMid($str, $i, 1)) If $c <= 0x7F Then $utf8 &= Chr($c) ElseIf $c <= 0x7FF Then $utf8 &= Chr(0xC0 + BitShift($c, -6)) $utf8 &= Chr(0x80 + BitAND($c, 0x3F)) Else $utf8 &= Chr(0xE0 + BitShift($c, -12)) $utf8 &= Chr(0x80 + BitAND(BitShift($c, -6), 0x3F)) $utf8 &= Chr(0x80 + BitAND($c, 0x3F)) EndIf Next Return $utf8 EndFunc Func UnsignedRightShift($value, $bits) If $bits >= 32 Then Return 0 If $value < 0 Then $value += 0x100000000 Return Int($value / (2 ^ $bits)) EndFunc Func qhash($inputstr) If Not IsString($inputstr) Then Return -1 Local $utf8 = StringToUTF8($inputstr) Local $h = 0x00000000 Local $temp, $val For $i = 1 To StringLen($utf8) $val = Asc(StringMid($utf8, $i, 1)) $h = Mod($h * 16 + $val, 0x100000000) ; unsigned 32-bit left shift $temp = BitAND($h, 0xF0000000) $h = BitXOR($h, UnsignedRightShift($temp, 23)) $h = BitAND($h, 0x0FFFFFFF) Next Return $h EndFunc There was also an issue with the following Python line. h ^= (h & 0xf0000000) >> 23 What ChatGPT had to say.
  15. Yeah, I'm not sure where the issue lies. Here is the original Python 2 (seemingly) code. def qhash (inputstr): instr = "" if isinstance (inputstr, str): instr = inputstr elif isinstance (inputstr, unicode): instr = inputstr.encode ("utf8") else: return -1 h = 0x00000000 for i in range (0, len (instr)): h = (h << 4) + ord(instr[i]) h ^= (h & 0xf0000000) >> 23 h &= 0x0fffffff return h As you can see in the range loop, there are aspects that AutoIt doesn't really have an equivalent for out of the box.
×
×
  • Create New...