Last active
November 1, 2020 14:58
-
-
Save dietercastel/91aa45ab325ecc95ded8c974c8400cf7 to your computer and use it in GitHub Desktop.
Use the (magic) wormhole tool from julia repl to transfer files easeily
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to run magic-wormhole (see https://github.com/warner/magic-wormhole) from Julia repl | |
# Author: Dieter Castel | |
# Installing requirements once. | |
# Meanwhile refactored into: https://github.com/dietercastel/Wormhole.jl | |
]add Conda | |
]add PyCall | |
using Conda | |
using PyCall | |
Conda.add("magic-wormhole",channel="conda-forge") | |
# Good to go using PyCall. | |
os = pyimport("os") | |
# Test whether it works | |
os.system("conda run wormhole --help") | |
# But output piping was broken in conda run so instead use activate. | |
# Conda add installs to the the 'base' environment. | |
os.system("conda activate base & wormhole send --text mytest") | |
#or | |
# os.system("conda activate base & wormhole send myfile.test") | |
# or | |
# os.system("conda activate base & wormhole receive YOURSTRINGHERE") | |
# receives in current directory. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment