Python Forum
Library Program Prison Project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Library Program Prison Project
#1
I run a small library in a prison and I'm currently having to do everything in an excel spreadsheet which has a lot of limitations and there are a lot of tasks that could be made a lot easier and done a lot faster if I could replace this spreadsheet with a functional program. I don't have great programming skills but I have played around a little in python, bash, C, C++, and most notably php. I need this program to keep an inventory of all of my books, to be able to check books in and out to specific inmates by their numbers, to be able to add and drop books from the inventory, and generate unique IDs for each book in my inventory. I already have a formula in my head for generating the IDs. For a database I plan on using SQLite because I think I would have an easier time convincing our I.T. team to simply install Python than I would trying to get them to install a full fledged database server and a more heavy weight programming environment, and python gets things done quick. Apart from Python and it's built in SQLite support I know I'm going to need a GUI library, which I have little to no experience in. Any suggestions or recommendations on a good GUI module/library for this project. And what am I looking at here, how big of a project is this going to be? I've attached a copy of the XLSX file I have been using, never mind there is no upload file button. Thanks.

If I am successful with my above goals I hope to add the ability to generate Bar or QR codes for each book id that I can print out on my library book card sleeves and add the ability to scan the books in and out.

my code here
Reply
#2
This is not that big a project. You could do it with a two table database, one for books and one for inmates. That's simple enough that you could do it without SQL, depending on the size of your library/inmate population. If it was me, I'd be tempted to do it without a GUI, but I'm comfortable with command line applications if they're not too obtuse. If not installing anything but Python is a priority, you could use Tkinter for your GUI (it's built in to Python). I'm not familiar enough with other GUI frameworks to recommend one for a newbie.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
(Jul-06-2017, 01:09 AM)ichabod801 Wrote: This is not that big a project. You could do it with a two table database, one for books and one for inmates. That's simple enough that you could do it without SQL, depending on the size of your library/inmate population. If it was me, I'd be tempted to do it without a GUI, but I'm comfortable with command line applications if they're not too obtuse. If not installing anything but Python is a priority, you could use Tkinter for your GUI (it's built in to Python). I'm not familiar enough with other GUI frameworks to recommend one for a newbie.

Thanks. I am a Linux user so I'm equally comfortable with command line programs but being that I'm used to using Excel for this and that this program would have to be run on Windows I'd rather go GUI. One option that did come to mind was to write it for CLI and then come back and write a GUI to go over the top as an after project. Thanks again.
Reply
#4
Perhaps you copy and paste one or two lines of your excel file (between code tags, of course) so we can see what you are currently doing. Also, as was pointed out, knowing the size of the library and population would aid in suggesting solutions. There are a few scenarios that could be applied. I agree, start off with a CLI program and as ichabod801 pointed out, could be done rather easily. This could also be done in such a way as to be suitable cross platform. If you wish to continue using Excel, there are several Python library's out there that will allow you to do so. The first one that came to mind was openpyxl, but as I said, there are several out there. If you wish to abandon Excel and switch to a database solution, then Sqlite3 is a good choice. It comes with Python and it is well documented, with many tutorials out there. I also agree with ichabod801, that when you are ready for a GUI, Tkinter would be a good choice, especially for a beginner. Again, it comes with Python, is well documented with plenty of tutorials and examples out there. As with the other two, Tkinter is cross platform.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#5
I would drop the Excel. Convert the Excel to Sqlite3, build a CLI, develop it and get the kinks out, and then build the GUI. If you do it right, you can run the CLI on Windows until the GUI is set up. You just don't have as good a console on Windows, unless you install something extra, which you seem to be avoiding.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#6
(Jul-06-2017, 12:54 AM)lewashby Wrote: I already have a formula in my head for generating the IDs.
Do you have multiple copies of books? You could just use the upc code on the back, and then you've already got a barcode you can scan, without needing to print out anything and attach it.
Reply
#7
(Jul-06-2017, 09:18 PM)nilamo Wrote:
(Jul-06-2017, 12:54 AM)lewashby Wrote: I already have a formula in my head for generating the IDs.
Do you have multiple copies of books?  You could just use the upc code on the back, and then you've already got a barcode you can scan, without needing to print out anything and attach it.

My library is pretty small, less than a thousand books and the part of the prison I work in I usually service less than 500 inmates in a week. Some of my books have bar codes and some don't so I'd like to develop a uniform way of databasing and IDing each book. I'm currently using three different ID types for each book. The first was created by inmates in another library who installed the library cards and pouches in each book, they didn't do a great job because I get a lot of books with the exact same ID which means I have to be careful when checking books in and out to make sure I got the right one. Those book ID's look something like this "HH-0134" or "HP-0334", I work in the H-Building so HH stands for H-Building Hardback and HP stands for H-Building Paperback.
When I finally got a type writer and started making my own library cards and pouches I was just using the bar code on the back of the book, minus the first three numbers (978) if and when it had a bar code, but that's not always the case. That's where having my own algorithm for creating a book ID comes in, and having my program be able to generate bar or QR codes for me to scan the books in and out. I clarify I would rather not use Excel at all if I don' have to.
Reply
#8
If you have access to sticky labels, might I suggest printing your own barcodes for each book
there are codes such as 'code 3 of 9' which support a full ANSI character set.
Many of these are available as features in common database systems
Reply
#9
(Jul-08-2017, 04:58 PM)Larz60+ Wrote: If you have access to sticky labels, might I suggest printing your own barcodes for each book
there are codes such as 'code 3 of 9' which support a full ANSI character set.
Many of these are available as features in common database systems

Yes that was my hope, to be able to create car or QR codes and stick on each book for easy quick check in/outs. What do you mean by code 3 of 9?
I'm also considering doing this project in PHP because it would make dealing with a GUI a lot easier, I would just rely on the browser/html.
Reply
#10
There are many types of barcodes. The ones you see on food items are usually UPC-E or UPC-A
here's a site that shows quite a few code types: http://dynamicstatements.com/barcodes.aspx
Code 3 of 9 is also knows as code 39 (shortened name) the reason I mentioned this one is that
you can encode text as well as numbers. The problem with it is that it grows laterally as the number
of characters increases making it sometimes hard for the reader to capture.

Probably best to use ISBN code for book id which is all numeric, and uses Bookland EAN, or EAN-13
codes.

There is a group that is building a database for every product ever made, including books, and it's free
you can find out about it here: https://product.okfn.org/
and see some of their work here: http://product-open-data.com/

This is a good place to start learning about what's available.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help needed in finding a library for this project PythonEnthusiast1729 7 718 Dec-27-2023, 11:27 AM
Last Post: PythonEnthusiast1729
Music Help with: Audiobook Library/Copier Project eleven43 0 454 Sep-14-2023, 04:17 PM
Last Post: eleven43
  Problem with importing python-telegram library into the project gandonio 1 1,515 Nov-01-2022, 02:19 AM
Last Post: deanhystad
  Regarding import library in two different program file Rohit 3 2,408 Jan-22-2020, 07:14 AM
Last Post: buran
  Join the Python Standard Library to my project sylas 1 2,164 May-16-2018, 05:59 AM
Last Post: buran
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,740 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020