GithubHelp home page GithubHelp logo

gs0510 / qr-filetransfer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from claudiodangelis/qrcp

0.0 2.0 0.0 6.75 MB

Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.

Home Page: https://claudiodangelis.com

License: MIT License

Go 100.00%

qr-filetransfer's Introduction

qr-filetransfer

Transfer files over Wi-Fi from your computer to a mobile device by scanning a QR code without leaving the terminal.

screenshot

Install

go get github.com/claudiodangelis/qr-filetransfer

Installation through a package manager

AUR (Arch Linux)

How does it work?

This tool binds a web server to the address of your Wi-Fi network interface on a random port and creates a handler for it. The default handler serves the content and exits the program when the transfer is complete.

The tool prints a QR code that encodes the text:

http://{address}:{port}

Most QR apps can detect URLs in decoded text and act accordingly (i.e. open the decoded URL with the default browser), so when the QR code is scanned the content will begin downloading by the mobile browser.

Usage

Screenshot

Note: Both the computer and device must be on the same Wi-Fi network.

On its first run, qr-filetransfer will ask you to choose which network interface you want to use to transfer the files. Choose the network interface that is connected to your Wi-Fi:

$ qr-filetransfer /tmp/file
Choose the network interface to use (type the number):
[0] enp3s0
[1] wlp0s20u10

Note: On Linux it usually starts with wl.

The chosen network will be saved and no more setup is necessary, unless you pass the -force argument, or delete the .qr-filetransfer.json file that the program stores in the home directory of current user.


Transfer a single file

qr-filetransfer /path/to/file.txt

Zip the file, then transfer it

qr-filetransfer -zip /path/to/file.txt

Transfer a full directory. Note: the directory gets zipped before being transferred

qr-filetransfer /path/to/directory

Arguments

  • -debug increases verbosity
  • -force ignores saved configuration
  • -zip zips the content before transferring it

Authors

qr-filetransfer's People

Contributors

claudiodangelis avatar tssva avatar dpeukert avatar darienflamont avatar gs0510 avatar joekyo avatar sergeax avatar 1hella avatar mattn avatar paralax avatar xjohn600 avatar

Watchers

James Cloos avatar  avatar

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.