Closed Rob4001 closed 8 years ago
Just had another idea for how to implement this - the Python paramiko library builds cleanly on Windows and can run commands and send files via SFTP. Porting tbtool to run on this would provide a common base for all the platforms.
Would also be cleaner for the tingbot-python library to have a Python dependency, rather than a shell/system dependency. This is my preferred solution I think.
I've replaced the ssh
and rsync
bits with Python code using paramiko over in https://github.com/tingbot/tingbot-python/commit/e712e162868740dea025f9628c2f5a1a1e18e10f, so there's no need to bundle any extra tools with Windows. It adds a dependency to tingbot-python, but we already have some native deps there anyway (pygame, Pillow). Given a proper install of tingbot-python, a call to tbtool run/install
will just work.
This is complete, implemented in 28478ba8122fd3c66d92653d6d4e11f04d940e53
To provide some context - at a base level this is just calling the
tbtool install
shell command from the tingbot-python library.Things get a little more interesting on Windows however. Internally,
tbtool
usesrsync
andssh
to connect and copy to the Tingbot, and these aren't easily available on Windows.rsync
andssh
. Then the tbtool code will run unmodified.ssh
andscp
(Plink.exe and PSCP.exe) that could be used instead. This would require some (hopefully minor) modifications totbtool
.