Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

Bindery

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.
Post Reply
Anonymous1

Bindery

Post by Anonymous1 » 07 Jan 2011, 03:16

Hello all.

I've been working on a graphical frontend to djvubind and alike software for those who prefer to use a GUI instead of the CLI. I've dubbed it Graphical Book Binder.

It's currently unable to do anything but thumbnail images and convert them to TIFF for use with djvubind and Tesseract. The GUI is quite bare, and I plan on adding tons of options as I move along, but for now, it's working. The main hurdle I have to get over is figuring out how to use QT4 and it's Python bindings, as I am pretty competent with Python.

Here's the current GUI. It's able to bind, but a glitch makes it freeze and go nuts while it is...
Image
Image

I've whipped up a quick 30 minute project page through GitHub, so for more (heh) info, browse here: http://blender3d.github.com/Bindery/.

If anyone has any suggestions, I will appreciate them a lot ;)

I'll post a fully bug-free interface demo soon, as I don't want to release this bug farm just yet.

Happy scanning!
Last edited by Anonymous1 on 12 Jan 2011, 00:50, edited 1 time in total.

User avatar
strider1551
Posts: 126
Joined: 01 Mar 2010, 11:39
Number of books owned: 0
Location: Ohio, USA

Re: Graphical Book Binder

Post by strider1551 » 07 Jan 2011, 09:03

Anonymous wrote:I've been working on a graphical frontend to djvubind
Are you planning on calling djvubind in a subprocess or directly importing the djvubind modules? Working with the modules will be more work on your end, but will give you a lot more flexibility in the long run. I ask because I've slowly been cleaning up the code (now that pylint has alpha support of python3!), and I would add "documenting the api better" to the list if I knew someone else was going to be working with it.
Anonymous wrote:The main hurdle I have to get over is figuring out how to use QT4 and it's Python bindings
That's half the reason I haven't made a gui myself.
Anonymous wrote:If anyone has any suggestions, I will appreciate them a lot
Yes.
  • Per-page options, things like changing the encoder used for that page or modifying/fixing the ocr text.
  • I think the hardest thing about djvubind is making a bookmarks file. Maybe something in the per-page options (checkbox to bookmark it, then text field to name it), or right-click -> bookamark as... with another menu to view/edit/remove bookmarks.
  • Along the same lines, a way to make the metadata file.
  • On my todo list is named pages. Instead of the pages going 1,2,3,4,5...n they could go cover,i,ii,iii,1,2,3...n just like the book itself does. I haven't settled on the best way to implement that, but keep an eye out for it.
My big general advice: use professional project hosting like Google Code. Open source thrives because of the ability for developers to communicate with each other and with users. The tools that make it possible are things like repository hosting, issue tracking, documentation, mailing lists, rss feeds. If you really want your software to take off, give it a better home than a forum thread. Also, unit testing and static testers (like pylint) save a lot of future headaches (wish I focused on those a lot earlier than I did).

If you need help with anything just let me know.

Anonymous1

Re: Graphical Book Binder

Post by Anonymous1 » 07 Jan 2011, 14:00

Wow, thanks for the suggestions.
strider1551 wrote:On my todo list is named pages. Instead of the pages going 1,2,3,4,5...n they could go cover,i,ii,iii,1,2,3...n just like the book itself does. I haven't settled on the best way to implement that, but keep an eye out for it.
That would be amazing. I've had book where pictures and blank pages weren't contributing to the page count, which made binding the book a pain. Do many programs even support this? I just thought they counted pages...

As for djvubind, I'll have to think about that one. I've tweaked the code a little bit (just adding a progress bar for the binding phase), and it was organized enough for me to read it pretty quickly, so I think I might actually just implement your code directly. If the API is relatively simple (I've been working with PyQT4, so I think I could handle just about anything ;) ), I'll use it.

If you need any help on your part, let me know too. I can code CLI applications really quickly, but this GUI stuff is just killing me...

As for project hosting, I've settled with Google Code, as it seemed to be the simplest. I can do web design, but SourceForge just seems like a pain to set up. The project URL is here: http://code.google.com/p/bindery/.

User avatar
daniel_reetz
Posts: 2779
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Graphical Book Binder

Post by daniel_reetz » 07 Jan 2011, 19:50

Oh man, this is awesome. Let me know the moment you want to announce to the world and I'll make a blog post about it. Thanks for the work you're putting in!

User avatar
strider1551
Posts: 126
Joined: 01 Mar 2010, 11:39
Number of books owned: 0
Location: Ohio, USA

Re: Graphical Book Binder

Post by strider1551 » 07 Jan 2011, 20:52

Anonymous wrote:That would be amazing. I've had book where pictures and blank pages weren't contributing to the page count, which made binding the book a pain. Do many programs even support this? I just thought they counted pages...
I know djview4 and djvused both support it (I guess the more proper term would be page titles, not named pages). There is reference to it in Lizardtech's DjVu Reference v3 from 2005 in section 8.3.2.2 - "If hastitle is set, then there is a third string which contains the name of the component (for display ... for example alternate page numberings in the Forward, or Preface)."

In case anyone doesn't understand what exactly I'm talking about, here's a screenshot with one book that has page titles and one that doesn't:
example.png
example.png (124.68 KiB) Viewed 15976 times
Oh, and I forgot to ask whether bindery will be only for djvu or for pdf as well? Anyway, best of luck with development. I'll try to keep up with it and offer bug reports that I spot and whatnot.

Anonymous1

Re: Graphical Book Binder

Post by Anonymous1 » 07 Jan 2011, 21:20

Well, it's (basically) ready! I've produced a successful DjVu book from a list of pages! It works flawlessly (thanks to djvubind's simple modules), but the UI still locks up whenever I'm doing a huge task. I'll have to do more thread controls, but once that's ready, I'll need a Python PDF script/library to fiddle with.
Last edited by Anonymous1 on 12 Jan 2011, 00:52, edited 2 times in total.

Anonymous1

Re: Bindery

Post by Anonymous1 » 12 Jan 2011, 01:16

@strider1551, are there any more settings that I should know about in djvubind? The two screenshots have been updated, and the settings are functional now in the Git repository.

Anonymous1

Re: Bindery

Post by Anonymous1 » 12 Jan 2011, 21:24

Well, it's almost at the beta stage! I've re-implemented/written djvubind's modules a little (I had to add progress hooks to the encoding module), and it's fully functional for DjVu binding. I'll just have to iron out a few thumbnailing glitches, and it'll be all set to go!

ibr4him
Posts: 102
Joined: 18 Oct 2010, 10:36

Re: Bindery

Post by ibr4him » 13 Jan 2011, 01:40

Windows and Mac binaries please! :D

Anonymous1

Re: Bindery

Post by Anonymous1 » 13 Jan 2011, 09:41

Windows, yes. Mac, no. I don't have admin access to a Mac, but I can give instructions on how to make a .app from the sources to someone who has one.

Post Reply