Edinburgh-Genome-Foundry / blabel

:label: Python label/sticker PDF generation. HTML templates, built-in barcodes, qr codes, and other goodies
https://edinburgh-genome-foundry.github.io/blabel
MIT License
179 stars 38 forks source link

Please help me setup blabel. #11

Closed aidenmj closed 2 years ago

aidenmj commented 3 years ago

I tried 2 ways from Visual Studio (still a rookie) & Ananconda Prompt, conda can't install blabel. My goal is to scan a barcode(ID) and it's look up other columns, names and others details will be printed along with barcode of ID. Thanks in advance. I just need to setup and able to run the test script is enough.

veghp commented 3 years ago

What was the issue? In your terminal prompt you can install blabel with pip install blabel, preferably in your anaconda environment. It's not packaged as a conda package. Using blabel requires knowledge of Python, HTML and CSS. As for running a test issue the command: python testscript.py or the code itself in a Python prompt.

aidenmj commented 3 years ago

Hi, thank you for reaching out. I managed to install blabel via setup.py install. I'm still going through the codes, is there way to remove the text under the barcode(it's value). image and is there way to add in auto printing on script run for windows.

veghp commented 3 years ago

Removing text: blabel uses python-barcode. When you call label_tools.barcode(), simply pass the writer_options. See Writer options documentation. Perhaps setting text size to 0 solves this. For example: label_tools.barcode(sample_id, module_width=1.5, font_size=0)

Can you please clarify your second question? (auto printing)

aidenmj commented 3 years ago

My program flow would be, when the person scan his/her badge barcode, the input will lookup for name and other 2 columns and generate the barcode and the other information, then it should print it. Only trigger is the barcode input. Entry if not blank, run function to generate and print then return. Following person will be scanning their badge to print the barcode. Please share if you anything to share that might be helpful for my program.

Additional information. I am doing this program in tkinter(GUI) python program. I wanted to use an excel sheet as data source for lookup. and this program later on will be executable in more than one pc. Thank you.

veghp commented 3 years ago

Thanks for explaining, sounds like an interesting project. Nothing particular comes to mind regarding this. Please consider sharing the code once your project is finished.

aidenmj commented 3 years ago

Hi I've managed to compiled all the function in a script. With Barcode Scanner input it will look up for the record from database and barcode will be generated into pdf files. Then cmd script will run the printing process (uses Acrobat) & that Arcobat will be terminated. All the process will be trigger with only one Barcode Scanner input. After done printed, the next user can scan their badge for printing the sticker label.

Issues I'm having now, I wanted to make the whole py script into .EXE. Can blabel script can be executable? I managed to add .db file for the database. Other files such .html and .css files for the barcode pdf templates, I tried to include multiple files, But I can't manages to run it.

Any tips and guide in command for pyinstaller would be great. thanks This is my files need to run the script. image

veghp commented 3 years ago

Thanks for the details. Well, normally you would execute the script with python LabelPrint.py. Unfortunately I cannot further advise you on building an .exe program. This is a general programming question not specific to blabel. I'll close this as the original 'text under the barcode' issue has been solved.

aidenmj commented 3 years ago

Thank you!