Closed robdebruin closed 5 years ago
Don't think I completely understand this; basically this would mean completely bypassing the current UI, why would you want to do that?
Anyway, most of these functionalities (submitting a carrier, finalizing a batch, etc) are things that happen while iromlab is already running, and having a command line interface isn't the solution for this. I think this would require something like a socket API where Iromlab acts a a server that listens to requests from client applications. That might actually be useful for allowing iromlab to communicate with e.g. an external application that manages a list of PPNs.
This would make it possible to integrate into workflow. It doesn't matter how that is done, but that it can be done. A socket API would be fine. We already have a workflow that keeps tracks of PPN's. We see that a lot of steps are needed to 'digitize' the disk in Iromlab and maintain the status correctly. A lot of handwork has already been eliminated, but still errors occur.
This might work:
Socket interface for PPN/title entry now pretty much works: https://github.com/KBNLresearch/iromlab/commit/182340d22aa86f7f8b90e1a73291620be2502117
Might need some further tweaking and refactoring.
TODO: move handleSocketRequests function into carrierEntry class. done!
Socket API seems to work, but while making a simple demo client I ran into this:
https://github.com/KBNLresearch/iromlab-socketclient/issues/1
While this happens the socket API is not of much use.
Also have a look at this:
https://docs.python.org/3/howto/sockets.html
and:
https://medium.com/python-pandemonium/python-socket-communication-e10b39225a4c
which looks simpler than what we have now.
Replace existing socket code by much simpler code adapted from here, and this seems to work:
https://github.com/KBNLresearch/iromlab/commit/b09e76a265245c0af3ae8c7800a7977929db9dd5
To be able to use Iromlab integrated into a workflow it would be neccessary to be able to call Iromlab via commandline. The following would be the minimum functionality required: