Skip to content
Snippets Groups Projects
Commit 43aaf069 authored by Jamesjon's avatar Jamesjon
Browse files

Update install.sh, deinstall.sh, CHANGELOG, LICENSE, skynet/skynet.desktop,...

Update install.sh, deinstall.sh, CHANGELOG, LICENSE, skynet/skynet.desktop, skynet/skynet.sh, README.md files
parent 97b1d782
No related branches found
No related tags found
No related merge requests found
SKYNET V1.1
- Versión inicial
\ No newline at end of file
LICENSE 0 → 100644
MIT License
Copyright (c) 2021 Jamesjon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# Skynet
Upload files to Skynet.
\ No newline at end of file
Skynet te permite subir archivos a la red Skynet, sube archivos desde el botón secundario del ratón en dolphin, no es necesario instalar nada adicional para su funcionamiento.<br><br>
<hr>
**Requisitos**
1 - Se requiere la instalación de "*xclip*".<br>
2 - Se requiere la instalación de "*curl*".<br><br>
Puedes realizar la instalación del paquete "*curl*" desde Octopi, Synaptic u otro gestor de archivos.<br><br>
*Instalación de manera gráfica en ubuntu y derivadas*
Pulsa <a href="apt://curl">curl</a> para realizar la instalación gráfica.<br><br>
*Instalación de manera gráfica en OpenSuse y derivadas*
Pulsa <a href="https://software.opensuse.org/package/curl?search_term=curl" target="_blank">curl</a> para realizar la instalación gráfica.<br><br>
También puedes realizar la instalación desde la terminal utilizando el comando de tu distribución linux.<br><br>
*Comando para Ubuntu y distribuciones derivadas*
sudo apt install curl
(Si no funciona probar con el siguiente comando)
sudo apt-get install curl<br><br>
*Comando para Archlinux y distribuciones derivadas*
sudo pacman -Sy curl
<br><br>
**Instalación manual**
Opción 1 - Ejecuta "*install.sh*" (Asegurate de darle permisos de ejecución)
Opción 2 - Debes descomprimir y copiar la carpeta *skynet* en la siguiente ruta ~/.local/share/kservices5/<br><br>
**Desinstalación manual**
Opción 1 - Ejecuta "*deinstall.sh*" (Asegurate de darle permisos de ejecución)
Opción 2 - Debes eliminar la carpeta *skynet* de la siguiente ruta ~/.local/share/kservices5/<br><br>
**Mis proyectos**<br><br>
<a href="https://www.pling.com/u/jamesjon/" target="_blank">https://www.pling.com/u/jamesjon/</a><br><br>
\ No newline at end of file
#!/bin/bash
target_dir=~/.local/share/kservices5/skynet
rm -Rf $target_dir
exit
\ No newline at end of file
#!/bin/bash
#Versión 1.2.2
target_dir=~/.local/share/kservices5/skynet
rm -Rf $target_dir
mkdir $target_dir
cd $target_dir/
wget https://www.opencode.net/jamesjon/skynet/raw/master/skynet/skynet.desktop
wget https://www.opencode.net/jamesjon/skynet/raw/master/skynet/skynet.sh
chmod +x $target_dir/*
exit
\ No newline at end of file
[Desktop Entry]
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/allfiles;
Icon=cloud-upload
Actions=transferFile2;_SEPARATOR_;transferFile3;
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
X-KDE-StartupNotify=false
X-KDE-Priority=TopLevel
X-KDE-Submenu=Skynet
[Desktop Action transferFile2]
Name=Upload archive (Copy url from Skynet)
Name[es]=Subir archivo (Copiar url de Skynet)
Name[en]=Upload archive (Copy url from Skynet)
Exec=sh $HOME/.local/share/kservices5/skynet/skynet.sh %f 0 1 0
Icon=cloud-upload
[Desktop Action transferFile3]
Name=Upload archive (Copy url from Skynet and open link)
Name[es]=Subir archivo (Copiar url de Skynet y abrir link)
Name[en]=Upload archive (Copy url from Skynet and open link)
Exec=sh $HOME/.local/share/kservices5/skynet/skynet.sh %f 0 1 1
Icon=cloud-upload
\ No newline at end of file
#!/bin/sh
notificacion(){
notify-send --app-name="Skynet" --icon="cloud-upload" "Link copiado al portapapeles" --expire-time=2000 > /dev/null 2>&1
}
portapapeles(){
printf "%s" "$1" | xclip -selection clipboard -t text/plain > /dev/null 2>&1
}
if [ -n "$(type curl)" ]; then
if [ -n "$(type xclip)" ]; then
if [ $2 == 0 ]; then
uploaded=$(curl --silent -X POST "https://siasky.net/skynet/skyfile" -F "file=@$1" | jq '.skylink' | sed 's/\"//g')
fi
if [ $3 == 1 ]; then
link="https://siasky.net/$uploaded"
portapapeles "$link"
notificacion
fi
if [ $4 == 1 ]; then
xdg-open $link
fi
else
kdialog --error "Instala xclip para utilizar esta función."
fi
else
kdialog --error "Instala curl para utilizar esta función."
fi
exit 1
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment