jimevins / glabels

gLabels Label Designer
http://glabels.org
GNU General Public License v3.0
66 stars 25 forks source link

Auto-generate Brother QL label sizes from PPD #79

Open mrichar1 opened 2 years ago

mrichar1 commented 2 years ago

Hi,

I've written a short python script to read through a Brother QL PPD file and generate Glabels-template entries for each label. I've tested this with the PPD files provided for QL-700, QL-800 and QL-820NWB printers, and they all generate the same XML, so I think the output is likely to be generally useful.

I'm happy to open a PR and submit both the python and the generated XML to the project, but I wanted to check a couple of things first:

  1. Should the XML be in a new file, rather than replacing brother-other-templates.xml. If nothing else the PPD doesn't use the DK part numbers, instead referencing labels by size - e.g: 29x90/29mmx90mm(1.1"x3.5")
  2. Where should such a python script go? Is there a utils or extras dir somewhere?
  3. The Brother EULA for the PPDs seems 'GPL-like', and suggests that redistribution is allowed. However I'll not add them in the PR just in case (they are unlikely to change very often, so it probably wouldn't help much to have the XML auto-generated.

Let me know what you think!

G-Pereira commented 1 year ago

Let us know how you've done it please :) If you can share the python script as a draft PR