Code Monkey home page Code Monkey logo

yourl's Introduction

██╗   ██╗ ██████╗ ██╗   ██╗██████╗ ██╗     
╚██╗ ██╔╝██╔═══██╗██║   ██║██╔══██╗██║     
 ╚████╔╝ ██║   ██║██║   ██║██████╔╝██║     
  ╚██╔╝  ██║   ██║██║   ██║██╔══██╗██║     
   ██║   ╚██████╔╝╚██████╔╝██║  ██║███████╗
   ╚═╝    ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝     

Release Build Status

URL shortner and upload files direct from terminal

Send files direct from terminal to 0x0.st or short URL by tinyurl.com

Works on

  • GNU/Linux
  • macOS
  • WSL2

Depends:

  • curl
  • qrencode
  • xclip
  • pbcopy(macOS)

Usage: To short links:

yourl.sh 'http://www.URLtoShortner.com'

To sent files:

yourl.sh '/Path/To/Your/File'

Disclamer

Maximum file size: 512.0 MiB Blocked file types: application/x-dosexec, application/x-executable, application/x-hdf5, application/java-archive, Android APKs and system images.

TERMS OF SERVICE

This is NOT a platform for:

  • piracy
  • pornography and gore
  • extremist material of any kind
  • malware / botnet C&C
  • anything related to crypto currencies
  • backups (yes, this includes your minecraft stuff, seriously people have been dumping terabytes of it here for years)
  • CI build artifacts
  • doxxing, database dumps containing personal information
  • anything illegal under German law

Licensing Your Contributions

Please note that when contributing to this project, you agree to license your contributions under the terms of the GPL-3. complete copy of GPL-3 here.


yourl's People

Contributors

concretematheusmartins avatar mateuscomh avatar

Stargazers

 avatar  avatar

Watchers

 avatar

yourl's Issues

Minhas sugestões...

1 - Mover para codeberg.org

Motivo: compromisso com o Software Livre ;-)

2 - Falando sério agora... hehehe

Será que uma abordagem assim funcionaria pra você?

#!/usr/bin/env bash

# Separando strings do código...

version='1.5'

usage="postweb.sh - Encurtador de links e envio de arquivos para 0x0.st
Uso: 

    Para encurtar links:
        postweb.sh 'URL'
    Para enviar arquivos:
        postweb.sh 'ARQUIVO'

Opções:

    -h|--help      Exibe esta ajuda e sai.
    -v|--version   Exibe a versão do script e sai. 
"

op_short='Link encurtado'
op_upload='arquivo enviado'

# O 'case' sai de qualquer forma no casamento com as opções... 

case "$1" in
    -h | --help)        echo "$usage"; exit;;
    -v | --version)     echo "$version"; exit;;
esac

# Só vai chegar aqui se não casar com as opções...

# Pense positivo! hehehe
if [[ -f "$1" ]]; then
    # O 'read' vai atribuir um link ou nada à variável 'REPLY'...
    read <<< $(curl -sF "file=@$1" https://0x0.st | sed -e "s/<.*//")
    op="$op_upload"
else
    # O 'read' vai atribuir um link ou 'Error' à variável 'REPLY'...
    read <<< $(curl -s http://tinyurl.com/api-create.php?url="$1")
    op="$op_short"
fi

# Expandindo nada ou 'Error', sai com erro...
[[ -z "$REPLY" || "$REPLY" = 'Error' ]] && exit 1    

# Caso contrário, chega até aqui...
echo "$REPLY"
notify-send -h int:value:40 "$op com sucesso"; xmessage -title "Send" -buttons "Close" -nearmouse "$REPLY"

Editado: troquei as aspas de usage.

Considerar melhorias

Promover codigo mais limpo implementado

  • Menos cores
  • Usar mais italico e negrito
  • Opcao de reset
  • Cabecalho e ajuda

bold=\e[1m'
reset=\e[m'

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.