Open ndom91 opened 4 years ago
Hi @ndom91! Sorry for late response, I have missed notification. I was thinking about this functionality, but I did not want to complexify the plugin. For this feature you need to add new view with new template or modify existing view or template. Now I have no time for this work, so if you want to do this - welcome!
Okay thanks for the feedback. I'll see what I can do ;)
Out of curiosity what is the intention of the Print function? does it setup to print to a particular label size or label printer at all?
The goal of the print function is to provide the ability to run the print wizard directly from Netbox.
Unfortunately, I'm not completely familiar with github. But do I understand correctly that the functions were never provided by Jasonlin1198?
I have no plugin menu etc. in Netbox (v3.2.2).
Also, the whole source code of Jasonlin1198 does not exist in the main version, if I see it correctly.
I have just seen that the marged on the branch develop has been executed.
So I never get it as a normal user during the installation. When will the new features from last year be distributed to everyone? Or are there still problems with the things from Jasonlin1198?
I am wondering upon the state of this? It seems that there was work put in originally, and that the feature got merged into the development branch in #16 however it has never been released. I would really like to see this added. I have over 170 racks that I need to print labels for, as well as over 2,000 cables and 500 devices and it is simply unrealistic to be able to do that one by one.
I feel like this should also take into consideration #43 as when we go to print these, we will likely be using label tape as well.
As far as I know, the branch is outdated and needs to be completely revised.
I made an exemplary workflow (means, it is manually calling the steps and passing results, but each is pulling a datasource or processing without interventions) for printing to my Avery label printer. It has some ZPL bugs and one of them is I can't write QR codes, but it might still help some of you get a grip on either solving stuff themselves or finding a good path to revive this. I'd of course also hope for the latter.
I'll try to make some video example on the weeked, or since i'll probably be too exhausted anyway, here's the examples
infoset="hostname,IMM (IMM),switchstack:0,ge-0/0/23
hostname,pNIC1-Port1 (1),switchstack:0,ge-0/0/20
hostname,IMM (IMM),switchstack:0,ge-0/0/22
hostname,pNIC1-Port1 (1),switchstack:1,ge-1/0/22
hostname,pNIC1-Port2 (2),otherhostname,pNIC1-Port2
hostname,pNIC2-Port1 (1),otherhostnamepNIC2-Port1
hostname,pNIC2-Port2 (2),otherhostname,pNIC2-Port2"
# .[] | [.label, .a_terminations[0].object.device.name, .a_terminations[0].object.display, .b_terminations[0].object.device.name, .b_terminations[0].object.name]| join(";")
OIFS=${IFS}
IFS=\,
echo "$infoset" |
while read _host _port _rhost _rport ; do
if [ ${#_host} -gt 15 ]; then
_host=${_host//[_-]/}
_host=${_host:0:6}?${_host: -16}
fi
if [ ${#_rhost} -gt 15 ]; then
_rhost=${_rhost//[_-]/}
_rhost=${_rhost:0:6}?${_rhost: -16}
fi
echo "^XA
^FX Hostname, LAN Port ID
^CF0,30
^FO95,72^FD${_host}^FS
^CF0,25
^FO100,40^FD${_port}^FS
^FX Uplink Switch und Port
^CF0,30
^FO90,160^FWI^FD${_rhost}^FS
^CF0,25
^FO100,125^FD${_rport}^FS
^XZ"
done | /usr/local/bin/lprint -d avery -o print-speed=50mm -o print-quality=high -o print-content-optimize=graphic -o media=oe_cable-label_2.76x0.94in
# .[] | [.label, .a_terminations[0].object.device.name, .a_terminations[0].object.display, .b_terminations[0].object.device.name, .b_terminations[0].object.name]| join(";")
is specifically intended to be that.none of this is to say I don't hope that netbox-qrcode sees a revival, I'm just trying to say 'if you're stuck with this and 2000 missing cable labels that you can't print and stick on as fast as they are missing, and so you never get a reference point where shit is right then PLEASE DO REMEMBER you can use CSV and pipe it into your label printer and you can create this bit of csv, too"
also, I use fs.com patch cables for a lot now with a usb barcode scanner, so i can at least feel safe in this limbo.
How about being able to print multiple QR Codes at once, like on a whole page of stickers?
Is this possible currently? If not, I'd be happy to help!