inventree / inventree-brother-plugin

Label printing plugin for Brother series printers
MIT License
16 stars 12 forks source link

USB printer support #29

Closed timmyhadwen closed 5 months ago

timmyhadwen commented 10 months ago

Currently this plugin only supports networked printers however the brother_ql library supports USB printers as well. I have tested this by changing the send_label function.

SchrodingersGat commented 10 months ago

@timmyhadwen interesting, would you be able to submit a PR to provide USB functionality?

timmyhadwen commented 10 months ago

I have a fork with just hardcoded values for device address etc. More than happy to complete that implementation with settings etc however just struggling to get the plugin installed in a development environment? Do you have any tips for easy dev of plugins etc? I am currently using Docker and have the plugin cloned into the plugins folder but alas it won't install properly and can't see a nice way to get logs out. Any help or pointing in the right direction would be great :)

SchrodingersGat commented 10 months ago

If you have the plugin cloned directly into the external "plugins" directory, it won't detect and load, as it is buried too "deep" in the directory structure.

Put the invenrtee_brother subdirectory into the "plugins" directory, and then it should load. Can you check if this works for you?

wolflu05 commented 9 months ago

The easiest thing for me is using devcontainers in combination with editable installs. I described them on the docs a while ago: https://docs.inventree.org/en/stable/develop/devcontainer/?h=devcont#plugin-development

SchrodingersGat commented 9 months ago

@timmyhadwen did you get it working?

timmyhadwen commented 8 months ago

Thanks for your help guys. Work has been busy but hoping to get into a few PRs over the Christmas break. Will update soon.

RealNagus commented 5 months ago

Hello. I needed the USB connection as well and implemented an additional setting for the plugin. Seems to work fine. You find the changes in my fork, if you're still interested I can create a PR.

SchrodingersGat commented 5 months ago

@RealNagus a PR would be greatly appreciated!