def main(wf): ''' main to check args and call ''' tr = Transmission(wf) if wf.args[0] == '--register' and len(wf.args) > 1: registerTransmission(wf, tr) elif wf.args[0] == '--reset': tr.resetConfig() elif wf.args[0] == '--copy' and len(wf.args) > 1: print(wf.args[1], end='') notify(title='Link copied in your clipboard') elif wf.args[0] == '--open' and len(wf.args) > 1: if tr.connection(): tr.addTorrent(wf.args[1]) else: nyaa(wf)