Giter Site home page Giter Site logo

Comments (9)

dadoprom avatar dadoprom commented on July 19, 2024 1

YES!!! It works! Thank you very much... I have big smile for you.

from labelmaker.

ducky64 avatar ducky64 commented on July 19, 2024 1

Probably soon, I'm not sure when exactly.

In the meantime, I've worked around it by either setting ncols / nrows to something ridiculously large and moving labels to a new page in Inkscape or by making the input CSVs small enough. Not elegant, of course, but it gets the job done..

from labelmaker.

ducky64 avatar ducky64 commented on July 19, 2024

Whoa, I wasn't expecting any users, but awesome!

As you can probably guess by the error, I haven't really tested on arbitrary SVGs yet, I mainly use SVGs designed in InkScape. It looks like the code which extracts raw text from text elements might be overly strict. I'll fix that.

It might also be helpful to link to your template (if possible), a lot of it depends on the input file.

from labelmaker.

dadoprom avatar dadoprom commented on July 19, 2024

Well, I was looking for something like this for loooong time... I would be for sure 100perc happy if it works :). I made a template using inkscape based on your template. As you can see I also tested with your test files and it did not work. I have couple questioins: What file type as output file. Pdf? Svg? Could not find it in the readme. Also would it not be a better solution to have the configurations in separate file, lets say text file or csv or ini... It is just a tought :) Maybe not, maybe it is better in svg. I attached zip file with my custom files.
kp.tar.gz

from labelmaker.

ducky64 avatar ducky64 commented on July 19, 2024

The output file is a SVG (this makes the code super simple, which just does transformations on a SVG tree, instead of needing a rendering engine). Existing applications can convert SVG to your final desired format, like PDF.

There's definitely a good argument for having configurations in a separate file, one being that the same sized labels are available in different sheet sizes (for example, I could get 1.75" x 0.5" labels in either 4" x 6" or US Letter sheets). But that's perhaps future work.

The test code here in this repo is kind of out of date, as is the README (I'll update that now). See this repository (actually the primary driving application) for templates that (should!) work:
https://github.com/ucb-supernode/labels

Your template should now work fine, but you need to update the configuration style:
#config incx=40mm incy=10mm nrows=8 ncols=4
(it's now parsed as a standard command, rather than a special construct)

from labelmaker.

dadoprom avatar dadoprom commented on July 19, 2024

Thank you very much. Now everything appears to work except there is no generated file... I cant find it nowhere :) This is my command: python3 ./annotators.py kp/kp-lepky-A4.svg kp/kp-lepky-A4.csv kp/test.svg

also tried

python ./annotators.py kp/kp-lepky-A4.svg kp/kp-lepky-A4.csv kp/test.svg
and
python3 annotators.py kp/kp-lepky-A4.svg kp/kp-lepky-A4.csv kp/test.svg

what am I doing wrong?

from labelmaker.

ducky64 avatar ducky64 commented on July 19, 2024

I linked the ucb-supernode/labels repository for the example templates (in templates/ under the repository root). It submodules this repository (for the actual label generation code) and only contains code for generating the .csv datasets programatically (fetching information from DigiKey and refomatting it for label printing). Because of the complexity, it's designed to be used with the included build scripts. But unless you're actually setting up electronics parts drawers, you probably won't have much use for much of the stuff in that repository except for seeing how the templates are done.

You should continue to use the ducky64/labelmaker repository (which contains actual code) and the original invocation syntax:
python labelmaker.py <input SVG> <input CSV> <output SVG>

from labelmaker.

dadoprom avatar dadoprom commented on July 19, 2024

When do you plan to implement newpage support? That is much needed :)

from labelmaker.

dadoprom avatar dadoprom commented on July 19, 2024

Could be soon :) like very soon :D Anyway, thank you again.

from labelmaker.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.