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

Daniel Learns About Spreads (on Windows, at least)

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.
User avatar
daniel_reetz
Posts: 2797
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:

Daniel Learns About Spreads (on Windows, at least)

Post by daniel_reetz » 29 Aug 2013, 17:42

So, I'm really, really excited about the work jbaiter is doing on Spreads. From where I'm standing, it looks like exactly what DIY Book Scanning needs. We've had a number of compelling solutions in the past (Book Scan Wizard, Scan Manager, Scan Tailor, YASW, and others), but Spreads looks modular enough to cover all those use cases and more. So, I need to start by saying my hat is off to all those developers who worked so hard on those solutions - especially because they laid the groundwork for today. Not to mention all the work done on smaller utilities that Spreads manages, or on new versions of core tools, like Petr Kovar's Scan Tailor Enhanced, which gives us all the power of ST and none of the interface. Or the various PDF binders, file renamers, and others. Your work is appreciated and very valuable.

This thread is my journey into understanding Spreads. I have just enough knowledge about Python to break everything terribly. I am running Windows 7 for this experiment because that's what the majority of kit builders are running. I want to learn how to install Spreads, how it works, and how to use it to scan books in a really efficient way. One dark secret of mine is that I have been so busy building and testing scanners for the last few years that I've only scanned a dozen or so of my books. I have a shelf full of hundreds that really need to be brought into the digital age. I hope to accomplish this with my Hackerspace Scanner, Spreads, and a Raspberry Pi.

User avatar
daniel_reetz
Posts: 2797
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: Daniel Learns About Spreads

Post by daniel_reetz » 29 Aug 2013, 17:44

Here is my basic setup (I will edit this as things change; this is where I am starting from):

1. A "Hackerspace Scanner" exactly as sold in the DIY Book Scanner US shop.
2. AMD64 PC, 32GB RAM, 10TB disk, Windows 7 64 Professional.
3. Two Canon Powershot A2200IS cameras.
4. One Raspberry Pi Model B.
5. One powered hub.
6. One USB keyboard for triggering.

User avatar
daniel_reetz
Posts: 2797
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:

Important Links about Spreads!

Post by daniel_reetz » 29 Aug 2013, 17:53

Here are the important links for Spreads:

Here is the main Spreads thread on the DIY Book Scanner forums.
Here is the Spreads documentation.
Here is the GitHub site with sourcecode. (if you don't know what this is, you don't need it)

I'm downloading Python from here:
http://www.python.org/download/releases/2.7.5/ - it's 2.7, as specified in the docs, but the latest version with bugfixes.

User avatar
daniel_reetz
Posts: 2797
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:

Installing Python.

Post by daniel_reetz » 29 Aug 2013, 18:15

OK, I downloaded "python-2.7.5.amd64.msi" and I'm running it. It wants to be installed at "C:\Python27\" and that is fine with me. I'm clicking Next> and then Next> again to install all features of Python.
PythonInstall1.jpg
PythonInstall1.jpg (38.19 KiB) Viewed 6134 times
Woo. The installer says it will take several minutes. My experience supports this. OK, INSTALLED. Now what? I guess I need to tell this Windows hunk-of-junk how to use Python. There's a tutorial on that here.

This is me following instructions. I hope we can eliminate these steps later somehow.
PythonInstall2.jpg
PythonInstall2.jpg (178.53 KiB) Viewed 6134 times

User avatar
daniel_reetz
Posts: 2797
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:

Installing PIP

Post by daniel_reetz » 29 Aug 2013, 18:24

OK, now that I've got Python installed, and the Windows Command Prompt knows how to use it, it's time to install PIP, as required by the docs.

What I did was followed instructions on the PIP page. I downloaded ez_setup.py and then, for the hell of it, copied it into my C:\Python27 folder.

I started a Windows command prompt by clicking the Start menu and typing CMD into the run box.

Once faced with the command line, I typed in:

Code: Select all

CD C:\Python27 
This changes the current working directory to the Python folder, where I copied the script.

Then I typed:

Code: Select all

python ez_setup.py
and the install proceeded. Says it finished, all seems well.
PipInstall.jpg
PipInstall.jpg (222.19 KiB) Viewed 6134 times

User avatar
daniel_reetz
Posts: 2797
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:

ScanTailor Enhanced

Post by daniel_reetz » 29 Aug 2013, 18:31

I want to use ScanTailor in my scanning process, and the docs say that it is optional. The docs link to a page containing code, but since I'm a rather daft end user, I want a compiled binary. I found those binaries here:

http://sourceforge.net/projects/scantai ... /enhanced/

I installed from the "latest binary" link and it seemed to install OK with no interaction from me.

User avatar
daniel_reetz
Posts: 2797
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:

PDFBeads and DJVUBind

Post by daniel_reetz » 29 Aug 2013, 18:34

I want to install PDFBeads and DJVUBind (by our own Strider1551, a longtime contributor here!)

PDFBeads assists in the making of a PDF, and DJVUBind makes the lesser known (or better known, if you're in Russia) DJVU format.

But I don't see compiled builds of either and I'm tired of installing stuff so I'm going to move on and come back to this stuff later.

User avatar
daniel_reetz
Posts: 2797
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:

Finally Installing Spreads!

Post by daniel_reetz » 29 Aug 2013, 18:40

OK, now to install Spreads. From the docs, it says to type this magic incantation into the command line:

Code: Select all

pip install spreads
PipInstall2.jpg
PipInstall2.jpg (25.92 KiB) Viewed 6132 times
Well, that failed because I didn't really install PIP, I think. I think I just installed the thing that installs PIP. Oh, developer tools. Back to the PIP documentation.

Yup, I didn't install get-pip.py

So I'm running that from the command line

Code: Select all

python get-pip.py
and it's starting to work. Looks like PIP is installed now:
PipInstall3.jpg
PipInstall3.jpg (89.4 KiB) Viewed 6132 times
OK now I'm gonna try that Spreads thing again:

Code: Select all

pip install spreads
FAIL - because I didn't add PIP to the environment variables as above, I have to navigate to the Scripts directory to make it work
PipInstall4.jpg
PipInstall4.jpg (15.95 KiB) Viewed 6130 times
So

Code: Select all

cd Scripts
Then

Code: Select all

pip install spreads
Got some errors, but I'm not worried. Looks like it installed.
Spreads.jpg

User avatar
daniel_reetz
Posts: 2797
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:

Running Spreads?

Post by daniel_reetz » 29 Aug 2013, 18:55

OK! Well, that was a lot of fiddling around, now I want to see Spreads run and do something. The documentation says:
If you are more comfortable working with a GUI, a graphical version of the wizard is included as well:

Code: Select all

$ spread gui
Spread2.jpg
Spread2.jpg (25.98 KiB) Viewed 6130 times
Alright, doesn't work. :( Investigating. Spread is just a file with no extension; I doubt if Python cares. However, with no file extension the Windows Operating Suckstem might not know what to do with it.
Spread1.jpg
I'll try specifying Python as the interpreter:
Spread3.jpg
Spread3.jpg (48.88 KiB) Viewed 6130 times
At least this gets me some errors. I see that it doesn't see yaml, whatever that is. Maybe not everything installed? Can anyone give me a clue as to how to continue?

abmartin
Posts: 79
Joined: 15 Sep 2010, 15:33
Number of books owned: 2000
Country: USA
Location: Ohio

Re: Daniel Learns About Spreads (on Windows, at least)

Post by abmartin » 29 Aug 2013, 22:27

Hey Dan,

I'm not on Windows, nor have I tried Spreads yet, but I have done some Python. (I guess I've gone complacent with my own sets of scripts and haven't tried the new stuff, which does look awesome) I assume that you just need to install the python YAML module. http://pyyaml.org/wiki/PyYAML

Since I haven't used Spreads yet, I have no idea which modules it will need, but I am sure that there are going to be a couple more that you might need to track down. (I guess I've gotten spoilt by Linux package repos making this stuff easy to find) If you get a similar error message for another module, you'll have to install that one too.

Perhaps a windows guru may one day make an installer that will contain all of the necessary modules once Spreads reaches a release.

Post Reply