GithubHelp home page GithubHelp logo

fisadev / grillo Goto Github PK

View Code? Open in Web Editor NEW
19.0 5.0 7.0 61 KB

A small tool to easily send data (files, clipboard) between computers with 0 config, just using audio and mic

License: GNU General Public License v3.0

Python 100.00%

grillo's Introduction

Grillo

A small tool to easily send data (files, clipboard) between computers with 0 config, just using audio and mic.

Installation

On Ubuntu, install it by running:

sudo apt install portaudio19-dev libffi-dev libsndfile1 xclip
pip3 install grillomodem --user

Usage

machine1> grillo listen

machine2> grillo text "hello world!"

After hearing some hight pitched sounds, machine1 should print:

machine1> grillo listen
Received text:
hello world!

You can also send files:

machine2> grillo file /path/to/a_file.txt

Or even update machine1's clipboard with machine2's clipboard contents:

machine2> grillo clipboard

Limitations

This will work with contents of less than 8KB, and the bandwith is fairly low, around 52bps. So use it to send small files (configs, etc), texts (like commands, an email, an url, etc), or copied text from the clipboard. Don't try to send stuff like a video :)

Usage as a lib

You can also use Grillo from your own Python programs, like this:

from grillo import Grillo

g = Grillo()
g.send_text("hello world")

Brave vs normal mode

In the default mode, Grillo will use an ACK message to request any packets of a message that haven't been successfully received. This helps working in noisy environments. If you are super confident in your quiet environment, or your receiver can't emit sounds, you can use --brave to disable that feature.

grillo's People

Contributors

fisadev avatar marianelagauto avatar scaramagus avatar sofide avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

grillo's Issues

Encoding error when sending numbers

Trying to send a string of integers results in the following error:

$ grillo text "123456"
Traceback (most recent call last):
  File "/home/agustin/code/pycamp2019/grillo/env/bin/grillo", line 11, in <module>
    load_entry_point('Grillo', 'console_scripts', 'grillo')()
  File "/home/agustin/code/pycamp2019/grillo/grillo/grillo.py", line 235, in main
    fire.Fire(GrilloCli)
  File "/home/agustin/code/pycamp2019/grillo/env/lib/python3.7/site-packages/fire/core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
  File "/home/agustin/code/pycamp2019/grillo/env/lib/python3.7/site-packages/fire/core.py", line 366, in _Fire
    component, remaining_args)
  File "/home/agustin/code/pycamp2019/grillo/env/lib/python3.7/site-packages/fire/core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
  File "/home/agustin/code/pycamp2019/grillo/grillo/grillo.py", line 190, in text
    grillo.send_text(text)
  File "/home/agustin/code/pycamp2019/grillo/grillo/grillo.py", line 95, in send_text
    self.send_message(MessageKind.TEXT, text.encode("utf-8"))
AttributeError: 'int' object has no attribute 'encode'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.