Cocoa (
momijizukamori) wrote2016-11-05 10:58 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
You Might Be A Programmer If...
...your solution to crappy bundled label-making software is to spend two hours figuring out a way to do it programmatically, which at current time involves gLabels, three different methods of editing CSV files, and ImageMagick commandline scripts, but which I may be able to coalesce into one commandline script, one method of editing CSV files, and gLabels.
-gLabels allows you to programmatically create multiple unique labels from a CSV file and a template, including unique images specified by a filepath in the CSV template.
-Unfortunately, it has the following three drawbacks: 1) It doesn't maintain image ratios for the inserted images, and instead stretches or squishes them to fit the provided image box; 2) it doesn't reflow text particularly well; and 3) you have to make the same number of copies of each entry from the CSV.
-The solution to (1) is to use ImageMagick to batch process the images and add whitespace as necessary to make them all the same dimensions (this isn't an issue for most BPAL releases, but I'm dealing with two series that use photos or paintings as the label art so the dimensions are all over)
-The solution to (2) is, at the moment, to use multiple templates and manually break long lines in the titles, which is not ideal but I think the only way around it is to use something really high-end like InDesign which supports reflow really well. gLabels supports auto-resizing text but if you turn that on for a field, it won't line wrap, and you can't have multiple font styles in one text object.
-The solution to (3) is to copy each row of the CSV the number of times you need it. I've been doing this in a text editor, because it's faster than inserting and copying new rows in either of my spreadsheet editors.
-...And then I've been using both Gnumeric and LibreOffice because Gnumeric copies and pastes text as plaintext, while LibreOffice copies formatting and pops up a dialog box EVERY TIME to ask how you'd like to paste in the text which is super-obnoxious, but if you copy an image and paste it into Gnumeric it inserts the image, and in LibreOffice it inserts the filepath (though I just experimented and if you copy the entire image file in a file manager rather than right-click -> copy image from an image-viewer, it inserts the filepath in both programs.)
The super-hardcore solution to all of this is to fork gLabels and add these features, but the less hardcore solution is to just write a script that processes the text and images nicely and minimize the amount of fiddly editing necessary.
All this because the Avery software is shitty and lost three hours of my work because it said it had saved it but hadn't really.
-gLabels allows you to programmatically create multiple unique labels from a CSV file and a template, including unique images specified by a filepath in the CSV template.
-Unfortunately, it has the following three drawbacks: 1) It doesn't maintain image ratios for the inserted images, and instead stretches or squishes them to fit the provided image box; 2) it doesn't reflow text particularly well; and 3) you have to make the same number of copies of each entry from the CSV.
-The solution to (1) is to use ImageMagick to batch process the images and add whitespace as necessary to make them all the same dimensions (this isn't an issue for most BPAL releases, but I'm dealing with two series that use photos or paintings as the label art so the dimensions are all over)
-The solution to (2) is, at the moment, to use multiple templates and manually break long lines in the titles, which is not ideal but I think the only way around it is to use something really high-end like InDesign which supports reflow really well. gLabels supports auto-resizing text but if you turn that on for a field, it won't line wrap, and you can't have multiple font styles in one text object.
-The solution to (3) is to copy each row of the CSV the number of times you need it. I've been doing this in a text editor, because it's faster than inserting and copying new rows in either of my spreadsheet editors.
-...And then I've been using both Gnumeric and LibreOffice because Gnumeric copies and pastes text as plaintext, while LibreOffice copies formatting and pops up a dialog box EVERY TIME to ask how you'd like to paste in the text which is super-obnoxious, but if you copy an image and paste it into Gnumeric it inserts the image, and in LibreOffice it inserts the filepath (though I just experimented and if you copy the entire image file in a file manager rather than right-click -> copy image from an image-viewer, it inserts the filepath in both programs.)
The super-hardcore solution to all of this is to fork gLabels and add these features, but the less hardcore solution is to just write a script that processes the text and images nicely and minimize the amount of fiddly editing necessary.
All this because the Avery software is shitty and lost three hours of my work because it said it had saved it but hadn't really.
no subject
no subject
In the end it'll probably take just as long as it would to redo them (though that's debatable, I can't get the Avery designer to save any changes at all and the online template program is a laggy mess), but I will have learned a lot more.
no subject
no subject
Look, I was expecting it to be bad, but I wasn't expecting 'pretends to have saved the file but has actually not written any changes' bad or 'there is now keyboard shortcut to delete text or image objects' bad. It's also like 700MB and I bet like half of that is bullshit like making the UI buttons look 3D and crappy clipart.
no subject
*passes the flamethrower*
no subject
no subject
No need for apologies! I didn't read it as condescending (and I didn't intend my response to sound defensive, though I can see how it would be read that way, haha).
no subject
no subject
no subject
There's a certain joy to seeing a problem and going 'I can fix that', but I was sort of hoping to have these done on Thursday ;)
no subject
no subject
...Yeah, that's probably a reasonable reaction, heh.