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

Introducing djvubind for djvu file creation

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.
blau
Posts: 1
Joined: 04 Mar 2014, 00:53

Re: Introducing djvubind for djvu file creation

Post by blau » 16 Feb 2011, 06:42

I installed the deb in ubuntu 10.10 and tried to run it against a directory full of .tif
However it seems that no output is produced, book.djvu is nowhere, am I missing something?

Code: Select all

$ djvubind  --no-ocr /path/to/directory
* Collecting files to be processed.
* Analyzing image information.
  Spawning 2 processing threads.
* Performing optical character recognition.
  Spawning 2 processing threads.
* Encoding all information to book.djvu.
$ 
I have python3 and all the prerequisites, afaik.

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

Re: Introducing djvubind for djvu file creation

Post by strider1551 » 16 Feb 2011, 09:20

Thank you for catching this bug (that I'm really surprised no one else ran into). I've committed a fix to the repository. I hope to have a new release out sometime in the next week or so, but until then, if you don't want to mess with pre-release code, a work around is to move to the directory with the .tif files and executing djvubind there:

Code: Select all

cd /path/to/dir
djvubind --no-ocr
If you or anyone else still have problems or notice an unwanted side effect, let me know either here or (preferably) on the ticket for this issue.

In other exciting news, the current version of djvubind has hit 200 downloads! The upcoming version will include page titles (already in repository) and more recent versions of cuneiform (if I can work out an annoying bug).

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

Re: Introducing djvubind for djvu file creation

Post by strider1551 » 15 Mar 2011, 20:33

I just released v1.1.0, available here.

This version adds support for page titles, so frontmatter in the book can be page i, ii, and so on (in other words, page 3 in the book is page 3 in the file; page iv in the book is page iv in the file...). I tried to explain the new command line options for this the best I could in the man page. It also should be able to handle more recent versions of cuneiform, and fixes the bug blau noticed above.

As always, feel free to report any bugs or feature requests on the issue tracker.

Lazy_Kent
Posts: 37
Joined: 26 Oct 2010, 10:06
Number of books owned: 0
Location: Moscow

Re: Introducing djvubind for djvu file creation

Post by Lazy_Kent » 18 Mar 2011, 17:16

strider1551 wrote:I just released v1.1.0
Thanks.
I packaged djvubind for openSUSE.
http://software.opensuse.org/search?q=d ... debug=true

gsloop

Re: Introducing djvubind for djvu file creation

Post by gsloop » 30 Mar 2011, 03:28

Is there a "howto" for Windows installation?
I'm pretty good on Linux, and was intending to run in FC14 in a VM in Windows - but since I run Win as my desktop platform, it seemed easier to do it there.

What do I have to have to run it on Windows?


---
[Alternatively, I've thought about building a decent VMWare VM that one could just pass off wholesale to users who want it. Once it's configured, that VM could be passed to anyone - and with VMWare player it should be pretty easy. We could put it up as a torrent and save newbies and Linux-phobes the build hassles. Plus everyone would be on a common platform, so reproducing/finding/fixing bugs/problems would be more straightforward. {Updates are a bit more hassle since you'd have to pull down the whole torrent again, or update by hand, but that's no worse than the alternative of building your own}]

Thoughts?

---
[I know it's CL-only for Windows, but do you have a nice UI in Linux, or is it still CL?]

Thanks,
Greg

User avatar
daniel_reetz
Posts: 2785
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: Introducing djvubind for djvu file creation

Post by daniel_reetz » 30 Mar 2011, 09:18

gsloop wrote: ---
[Alternatively, I've thought about building a decent VMWare VM that one could just pass off wholesale to users who want it. Once it's configured, that VM could be passed to anyone - and with VMWare player it should be pretty easy. We could put it up as a torrent and save newbies and Linux-phobes the build hassles. Plus everyone would be on a common platform, so reproducing/finding/fixing bugs/problems would be more straightforward. {Updates are a bit more hassle since you'd have to pull down the whole torrent again, or update by hand, but that's no worse than the alternative of building your own}]

Thoughts?
This is a great idea and one that's come up no less than 10 or 15 times. User Benjamin was going to do it, and I think had some success; there have been a number of others. It's also been suggested in the form of a LiveCD. I'll try to dig up the threads. This friday, I am meeting with Myles, who is going to try to reimplement the Internet Archive's Scribe interface, including camera control, in a VM. Maybe we could start a new thread and get together on making this happen for real? Virtualization is not my thing at all, and neither is making LiveCDs, but I can help find all the people who ever worked on it or suggested it.

TomHorsley
Posts: 96
Joined: 30 Jan 2011, 10:39

Re: Introducing djvubind for djvu file creation

Post by TomHorsley » 30 Mar 2011, 18:45

Building a LiveCD is pretty simple with the tools available in fedora. Lots of folks have special "spins" they produce each release customized towards one thing or another. I have no idea if any other distros have similar (or the same) tools. Here's one link to info on using the fedora tools:

http://fedoraproject.org/wiki/How_to_cr ... ra_Live_CD

A virtual machine might be more problematic since there are several competing virtualization projects out there, and I don't think they are compatible. So if you use KVM, I don't think you can also use virtual box or vmware, etc. (though I could be wrong about that).

gsloop

Re: Introducing djvubind for djvu file creation

Post by gsloop » 30 Mar 2011, 23:15

I am not familiar with any VM environment other than VMWare - but is there any reason not to use it?

Sure, you'll be stuck with using that particular VM environment, but vmware is widely known and pretty easy to run on Windows. (And if you're a Linux guru, then the vm probably wouldn't appeal to you anyway.)
vm-player is free and new distros are easily available from places like thought-police. So, it just seems like a good match.

The only draw-back I can see is OSX users, since there's no vm-play on OSX - but they're essentially already running a *nix and thus building the proper environment is easier - or at least highly possible. That's not really the case on Windows, and even when it's _possible_ it's often fraught with oddities.

[Believe me I know, I run a rdiff-backup Windows port on quite a number of Windows platforms and there's a lot of really odd glitches - not a problem for me to handle - but a wild ride for someone who doesn't know what they're doing.]

Anyway - I'm glad to consider other VM platforms, but I know vmware, I need to build one for my use and thus I can leverage this to start a project for others.

So unless I hear some very persuasive reasons to use something else, I'm likely to go ahead with a vmware FC14 "spin."

-Greg

TomHorsley
Posts: 96
Joined: 30 Jan 2011, 10:39

Re: Introducing djvubind for djvu file creation

Post by TomHorsley » 31 Mar 2011, 07:59

gsloop wrote:I am not familiar with any VM environment other than VMWare - but is there any reason not to use it?
Well, the only reason would be valid for every virtual environment: If the user already has virtual machines based on environment X, he wouldn't be able to use environment Y, but since that argument is valid for all possible environments, it doesn't really provide any reason to pick one over another :-).

And I think there may be tools to convert virtual images from one form to another, and since vmware is widely used, any such tools probably will accept vmware machines as an input.

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

Re: Introducing djvubind for djvu file creation

Post by strider1551 » 31 Mar 2011, 10:09

gsloop wrote: Is there a "howto" for Windows installation?
...
What do I have to have to run it on Windows?
...
I know it's CL-only for Windows, but do you have a nice UI in Linux, or is it still CL?
djvubind is only a command line program an any platform. Blender was making a gui frontend for it and other programs called bindery, but it's been a while since I checked in on his progress. It made its way to Windows thanks to a patch someone sent me, but I haven't personally used Windows for 5+ years - between that and being command line, I'm not willing to put energy into making it more Windows-user friendly (although anyone else is welcome to, being opensource and all).

Anyway, just unzip djvubind to the directory of your choosing. You also need python3, imagemagick, tesseract, and djvulibre installed. Open a command line, cd to the directory that contains your images, and use djvubind with whatever options you may need. It will probably look similar to this:

Code: Select all

cd "C:\my_book"
"C:\Python31\python.exe" "C:\Program Files\djvubind\bin\djvubind" --help
"C:\Python31\python.exe" "C:\Program Files\djvubind\bin\djvubind"
Would people be interested in a gui? It could be a nice summer project for me, but it will add a lot of complexity to the project. I've only seen ~40 downloads of the latest version (~250 of the previous stable that was out for a long time), so I'm not sure how many people even use djvubind, since I'm sure people have downloaded and then deleted. Personally I'm comfortable with the command line, but I'll look into making a gui if people let me know that they want one.

Post Reply