EmbroidePy / pyembroidery

pyembroidery library for reading and writing a variety of embroidery formats.
MIT License
181 stars 33 forks source link

total noob to phyton, help run #141

Closed Ams-Laser closed 2 years ago

Ams-Laser commented 2 years ago

Helllo, any instructions available on how to compile/run/use ?

Please help Thanks

tatarize commented 2 years ago

Um. This is mostly a tool for programmers. It's a code library that performs input and output of most major embroidery formats. It works like a black box. You don't really need to know how it works, you only need to interact with it in the proscribed manner.

If you want you can go to python.org and install python. Then run the command line and do pip install embroidepy which will install a gui-like version with some interactions. They running embroiderpy would execute it. That or get familiar with python, and write code using the library. The readme contains some instructions for that. Also, if you want there's a vpype plugin for this.

https://github.com/EmbroidePy/vpype-embroidery

This will let you run the program without knowing much code. You'd need to install vpype which has some fairly good instructions: https://github.com/abey79/vpype

Then you can use eread and ewrite commands with a lot of nice commands to perform helpful functions. This would let you do things like read a file, do a number of processing events on that and output an embroidery file.

Ams-Laser commented 2 years ago

Thanks for your response, i will try the vpype route first BTW, while downloading vpype 1.10.0 i get antivirus alert VHO:trojan.Win32.Inject.gen will try in a virtual machine first

Thanks Ed

Ams-Laser commented 2 years ago

had to go the python route wrote this script

import pyembroidery import sys pyembroidery.convert("sys.argv[1]", "sys.argv[2].gcode")

intention is to call the script like convert.py inputfile.DST output.gcode

but seems not to work, however if i harcode the filenames it works ok can someone please shine a light at what im doing wrong ?

thanks Ed

Ams-Laser commented 2 years ago

got it working :)

import pyembroidery import sys infile=str(sys.argv[1])+".DST" outfile=str(sys.argv[2])+".gcode" pyembroidery.convert (infile, outfile)

tatarize commented 2 years ago

Anything compiled and not signed will often trigger an AV alert. That code seems fine.