tabi/es/projects/nani/index.html
2025-10-04 11:14:46 +00:00

36 lines
No EOL
18 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html><html lang=es><head><meta charset=UTF-8><meta content="default-src 'self';font-src 'self' data:;img-src 'self' https://* data:;media-src 'self' https://cdn.jsdelivr.net/;style-src 'self';frame-src player.vimeo.com https://www.youtube-nocookie.com;connect-src 'self' https://tabi-stats.osc.garden vhiweeypifbwacashxjz.supabase.co;script-src 'self' https://tabi-stats.osc.garden cdn.jsdelivr.net 'self'" http-equiv=Content-Security-Policy><meta content="width=device-width,initial-scale=1.0" name=viewport><meta content=https://welpo.github.io/tabi name=base><title>
~/tabi • nani</title><link href=https://welpo.github.io/tabi/img/seedling.png rel=icon type=image/png><link href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50%" x="50%" dominant-baseline="central" text-anchor="middle" font-size="88">🌱</text></svg>' rel=icon><link title="~/tabi - Atom Feed" href=https://welpo.github.io/tabi/atom.xml rel=alternate type=application/atom+xml><link href="https://welpo.github.io/tabi/custom_subset.css?h=0b9535a28bc3d5bf2321" rel=stylesheet><link href="https://welpo.github.io/tabi/main.css?h=3716ab3457d2dd050b3c" rel=stylesheet><meta content="light dark" name=color-scheme><meta content=#087e96 name=theme-color><meta content="Script Bash para crear URLs públicas a partir de archivos o texto en servidores remotos." name=description><meta content="Script Bash para crear URLs públicas a partir de archivos o texto en servidores remotos." property=og:description><meta content=nani property=og:title><meta content=article property=og:type><meta content="https://welpo.github.io/tabi/projects/nani/social_cards/es_projects_nani.jpg?h=4d1eefc65276a6e6a639" property=og:image><meta content=1400 property=og:image:width><meta content=800 property=og:image:height><meta content="https://welpo.github.io/tabi/projects/nani/social_cards/es_projects_nani.jpg?h=4d1eefc65276a6e6a639" name=twitter:image><meta content=summary_large_image name=twitter:card><meta content=es_ES property=og:locale:alternate><link href=https://welpo.github.io/tabi/es/projects/nani/ hreflang=es rel=alternate><meta content=en_GB property=og:locale:alternate><link href=https://welpo.github.io/tabi/projects/nani/ hreflang=en rel=alternate><meta content=ca_ES property=og:locale:alternate><link href=https://welpo.github.io/tabi/ca/projects/nani/ hreflang=ca rel=alternate><link href=https://osc.garden/es/projects/tabi/ rel=canonical><meta content=https://osc.garden/es/projects/tabi/ property=og:url><meta content=~/tabi property=og:site_name><noscript><link href=https://welpo.github.io/tabi/no_js.css rel=stylesheet></noscript><script src=https://welpo.github.io/tabi/js/initializeTheme.min.js></script><script defer src=https://welpo.github.io/tabi/js/themeSwitcher.min.js></script><script async data-goatcounter=https://tabi-stats.osc.garden/count src=https://tabi-stats.osc.garden/count.js></script><script src="https://welpo.github.io/tabi/js/searchElasticlunr.min.js?h=3626c0ef99daa745b31e" defer></script><script defer src=https://welpo.github.io/tabi/js/lunr/lunrStemmerSupport.min.js></script><script defer src=https://welpo.github.io/tabi/js/lunr/lunr.es.min.js></script><body><a href=#main-content id=skip-link>Saltar al contenido</a><header><nav class=navbar><div class=nav-title><a class=home-title href=https://welpo.github.io/tabi/es/>~/tabi</a></div><div class=nav-navs><ul><li><a class="nav-links no-hover-padding" href=https://welpo.github.io/tabi/es/blog/>blog </a><li><a class="nav-links no-hover-padding" href=https://welpo.github.io/tabi/es/archive/>archivo </a><li><a class="nav-links no-hover-padding" href=https://welpo.github.io/tabi/es/tags/>etiquetas </a><li><a class="nav-links no-hover-padding" href=https://welpo.github.io/tabi/es/projects/>proyectos </a><li class=menu-icons-container><ul class=menu-icons-group><li class="js menu-icon"><div aria-label="Haz clic o usa $SHORTCUT para abrir la búsqueda" class="search-icon interactive-icon" title="Haz clic o usa $SHORTCUT para abrir la búsqueda" id=search-button role=button tabindex=0><svg viewbox="0 -960 960 960" xmlns=http://www.w3.org/2000/svg><path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg></div><li class=language-switcher><details class=dropdown><summary aria-label="Selección de idioma" title="Selección de idioma" aria-haspopup=true role=button><div class=language-switcher-icon></div></summary> <div class=dropdown-content role=menu>Español<a aria-label=Català href=https://welpo.github.io/tabi/ca/projects/nani/ lang=ca role=menuitem>Català</a><a aria-label=English href=https://welpo.github.io/tabi/projects/nani/ lang=en role=menuitem>English</a><a aria-label=العربية href=https://welpo.github.io/tabi/ar/projects/nani/ lang=ar role=menuitem>العربية</a></div></details><li class="theme-switcher-wrapper js"><div aria-label="Cambiar a modo oscuro" title="Cambiar a modo oscuro/claro" aria-pressed=false class=theme-switcher role=button tabindex=0></div><div aria-label="Restablecer modo a configuración predeterminada" class="theme-resetter arrow" title="Restablecer modo a configuración predeterminada" aria-hidden=true role=button tabindex=0></div></ul></ul></div></nav></header><div class=content id=main-content><main><article class=h-entry><h1 class="p-name article-title">nani</h1><a class="u-url u-uid" href=https://welpo.github.io/tabi/es/projects/nani/></a><ul class=meta><li class=tag>Etiquetas: <li class=tag><a class=p-category href=https://welpo.github.io/tabi/es/tags/bash/>bash</a>, <li class=tag><a class=p-category href=https://welpo.github.io/tabi/es/tags/cli/>CLI</a></ul><p class=p-summary hidden>Script Bash para crear URLs públicas a partir de archivos o texto en servidores remotos.<section class="e-content body"><p>Si trabajas en un servidor remoto, sabrás que compartir archivos con otras personas puede ser un proceso tedioso. <code>nani</code> es un script en Bash diseñado para simplificar esta tarea. Con un solo comando, puedes convertir archivos locales en enlaces públicos, facilitando el proceso de compartir directamente desde tu servidor.<p><a class=external href=https://github.com/welpo/nani/><img alt="nani logo" src=https://welpo.github.io/tabi/es/projects/nani/nani_logo.webp></a><h4 class=centered-text id=ver-en-github><a aria-label="Anchor link for: ver-en-github" class="header-anchor no-hover-padding" href=#ver-en-github><span aria-hidden=true class=link-icon></span></a> <a class=external href=https://github.com/welpo/nani>Ver en GitHub</a></h4><h2 id=caracteristicas-clave><a aria-label="Anchor link for: caracteristicas-clave" class="header-anchor no-hover-padding" href=#caracteristicas-clave><span aria-hidden=true class=link-icon></span></a> Características clave</h2><ul><li><strong>Todo tipo de archivos</strong>: maneja directorios, archivos FLAC, archivos de texto e incluso URLs a vídeos.<li><strong>Personalizable</strong>: adapta los ajustes editando el script o un archivo de configuración.<li><strong>Notificaciones</strong>: notificaciones en el escritorio e integración con el portapapeles para una mejor experiencia.</ul><h2 id=inicio-rapido><a aria-label="Anchor link for: inicio-rapido" class="header-anchor no-hover-padding" href=#inicio-rapido><span aria-hidden=true class=link-icon></span></a> Inicio rápido</h2><ol><li>Coloca <code>nani</code> en un directorio dentro de tu PATH.<li>Haz el script ejecutable.</ol><p>Para pasos de instalación más detallados, <a class=external href=https://github.com/welpo/nani#-install>consulta la documentación completa</a>.<h2 id=uso><a aria-label="Anchor link for: uso" class="header-anchor no-hover-padding" href=#uso><span aria-hidden=true class=link-icon></span></a> Uso</h2><pre class="language-bash z-code" data-lang=bash><code class=language-bash data-lang=bash><span class="z-source z-shell z-bash"><span class="z-meta z-function-call z-shell"><span class="z-variable z-function z-shell">$</span></span><span class="z-meta z-function-call z-arguments z-shell"> nani Ruta/A/foto.png</span>
</span><span class="z-source z-shell z-bash"><span class="z-meta z-function-call z-shell"><span class="z-variable z-function z-shell">https://example.com/nani/hjRGLZB.png</span></span>
</span></code></pre><p>Compartir un directorio manteniendo su nombre original:<pre class="language-bash z-code" data-lang=bash><code class=language-bash data-lang=bash><span class="z-source z-shell z-bash"><span class="z-meta z-function-call z-shell"><span class="z-variable z-function z-shell">$</span></span><span class="z-meta z-function-call z-arguments z-shell"> nani<span class="z-variable z-parameter z-option z-shell"><span class="z-punctuation z-definition z-parameter z-shell"> -</span>o</span> Ruta/A/Directorio</span>
</span><span class="z-source z-shell z-bash"><span class="z-meta z-function-call z-shell"><span class="z-variable z-function z-shell">https://example.com/nani/Directorio.zip</span></span>
</span></code></pre><p>Puedes configurar varias opciones a través de los parámetros. Aquí tienes la salida de <code>nani</code> help:<div class=full-width><pre class=z-code><code><span class="z-text z-plain">Usage: nani [options] &lt;infile>
</span><span class="z-text z-plain">Provides public URL from input.
</span><span class="z-text z-plain">
</span><span class="z-text z-plain">Input handling:
</span><span class="z-text z-plain"> Directory Will be stored using zip (or symbolic link)
</span><span class="z-text z-plain"> FLAC Can be transcoded to MP3
</span><span class="z-text z-plain"> Text (html, php...) Extension can be set to .txt
</span><span class="z-text z-plain"> Other files New copy/hard link/symbolic link at output directory
</span><span class="z-text z-plain"> URL to video (e.g: youtube) Downloaded using yt-dlp
</span><span class="z-text z-plain"> Other URLs Downloaded using wget
</span><span class="z-text z-plain">
</span><span class="z-text z-plain">Modify the first lines of the script to change how nani behaves: quiet mode,
</span><span class="z-text z-plain">enabling/disabling transcoding, length of the string, extension truncation...
</span><span class="z-text z-plain">
</span><span class="z-text z-plain">Settings and options:
</span><span class="z-text z-plain"> -a, --alias Revert the hard link setting
</span><span class="z-text z-plain"> -c, --cleanup Remove all files on /nani/ except index.html
</span><span class="z-text z-plain"> -h, --help Display this help and exit
</span><span class="z-text z-plain"> -i, --insert Open nano to enter text. Saved in output directory as .txt
</span><span class="z-text z-plain"> -k, --keep Output dir becomes /nani/k/, to set different cleanup rules
</span><span class="z-text z-plain"> -l, --list List files in output directory /nani/
</span><span class="z-text z-plain"> -n, --name Use custom name (e.g. nani -n DesiredName &lt;file>)
</span><span class="z-text z-plain"> -N, --notify Revert the notify option
</span><span class="z-text z-plain"> -o, --original Preserve original file name
</span><span class="z-text z-plain"> -p, --push Send push notification
</span><span class="z-text z-plain"> -q, --quiet Revert the quiet setting
</span><span class="z-text z-plain"> -s, --string Force a certain string length (e.g. nani -s 32 &lt;file>)
</span><span class="z-text z-plain"> -t, --transcode Revert the transcode setting
</span><span class="z-text z-plain"> -x, --xclip Revert the xclip setting
</span><span class="z-text z-plain"> -y, --symbolic Create a symbolic link for files and directories
</span></code></pre></div></section><form action="https://vhiweeypifbwacashxjz.supabase.co/rest/v1/rpc/increment_hits?apikey=sb_publishable_EoB7MFJhCmb6PiAk-GPJ4w_PGhQ44Ru" class=iine-form method=post><input name=page_slug type=hidden value=/projects/nani/><button aria-label="Me gusta esta publicación" title="Me gusta esta publicación" class=iine-button data-icon=thumbs_up data-slug=/projects/nani/>👍</button></form></article></main><div id=button-container><div id=toc-floating-container><input class=toggle id=toc-toggle type=checkbox><label class=overlay for=toc-toggle></label><label title="Mostrar/ocultar la tabla de contenidos" class=button for=toc-toggle id=toc-button><svg viewbox="0 -960 960 960" xmlns=http://www.w3.org/2000/svg><path d="M414.82-193.094q-18.044 0-30.497-12.32-12.453-12.319-12.453-30.036t12.453-30.086q12.453-12.37 30.497-12.37h392.767q17.237 0 29.927 12.487 12.69 12.486 12.69 30.203 0 17.716-12.69 29.919t-29.927 12.203H414.82Zm0-244.833q-18.044 0-30.497-12.487Q371.87-462.9 371.87-480.45t12.453-29.92q12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.511 12.69 12.512 12.69 29.845 0 17.716-12.69 30.086-12.69 12.37-29.927 12.37H414.82Zm0-245.167q-18.044 0-30.497-12.32t-12.453-30.037q0-17.716 12.453-30.086 12.453-12.369 30.497-12.369h392.767q17.237 0 29.927 12.486 12.69 12.487 12.69 30.203 0 17.717-12.69 29.92-12.69 12.203-29.927 12.203H414.82ZM189.379-156.681q-32.652 0-55.878-22.829t-23.226-55.731q0-32.549 23.15-55.647 23.151-23.097 55.95-23.097 32.799 0 55.313 23.484 22.515 23.484 22.515 56.246 0 32.212-22.861 54.893-22.861 22.681-54.963 22.681Zm0-245.167q-32.652 0-55.878-23.134-23.226-23.135-23.226-55.623 0-32.487 23.467-55.517t56.12-23.03q32.102 0 54.721 23.288 22.62 23.288 22.62 55.775 0 32.488-22.861 55.364-22.861 22.877-54.963 22.877Zm-.82-244.833q-32.224 0-55.254-23.288-23.03-23.289-23.03-55.623 0-32.333 23.271-55.364 23.272-23.03 55.495-23.03 32.224 0 55.193 23.288 22.969 23.289 22.969 55.622 0 32.334-23.21 55.364-23.21 23.031-55.434 23.031Z"/></svg></label><div class=toc-content><div class=toc-container><ul><li><a href=https://welpo.github.io/tabi/es/projects/nani/#ver-en-github>Ver en GitHub</a><li><a href=https://welpo.github.io/tabi/es/projects/nani/#caracteristicas-clave>Características clave</a><li><a href=https://welpo.github.io/tabi/es/projects/nani/#inicio-rapido>Inicio rápido</a><li><a href=https://welpo.github.io/tabi/es/projects/nani/#uso>Uso</a></ul></div></div></div><a title="Ir al inicio de la página" class=no-hover-padding href=# id=top-button> <svg viewbox="0 0 20 20" fill=currentColor><path d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z"/></svg> </a></div><span class=hidden id=copy-success> Copiado! </span><span class=hidden id=copy-init> Copiar código al portapapeles </span><script defer src=https://welpo.github.io/tabi/js/copyCodeToClipboard.min.js></script><script defer src=https://cdn.jsdelivr.net/gh/welpo/iine@main/iine.mini.js></script></div><footer><section><nav class="socials nav-navs"><ul><li><a class="nav-links no-hover-padding social" href=https://welpo.github.io/tabi/es/atom.xml> <img alt=feed loading=lazy src=https://welpo.github.io/tabi/social_icons/rss.svg title=feed> </a><li class=js><a class="nav-links no-hover-padding social" data-encoded-email=dGFiaUBvc2MuZ2FyZGVu href=#><img alt=email loading=lazy src=https://welpo.github.io/tabi/social_icons/email.svg title=email> </a><li><a class="nav-links no-hover-padding social" rel=" me" href=https://github.com/welpo/> <img alt=github loading=lazy src=https://welpo.github.io/tabi/social_icons/github.svg title=github> </a><li><a class="nav-links no-hover-padding social" rel=" me" href=https://soundcloud.com/oskerwyld> <img alt=soundcloud loading=lazy src=https://welpo.github.io/tabi/social_icons/soundcloud.svg title=soundcloud> </a><li><a class="nav-links no-hover-padding social" rel=" me" href=https://instagram.com/oskerwyld> <img alt=instagram loading=lazy src=https://welpo.github.io/tabi/social_icons/instagram.svg title=instagram> </a><li><a class="nav-links no-hover-padding social" rel=" me" href=https://youtube.com/@oskerwyld> <img alt=youtube loading=lazy src=https://welpo.github.io/tabi/social_icons/youtube.svg title=youtube> </a><li><a class="nav-links no-hover-padding social" rel=" me" href=https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE> <img alt=spotify loading=lazy src=https://welpo.github.io/tabi/social_icons/spotify.svg title=spotify> </a></ul></nav><nav class=nav-navs><small> <ul><li><a class="nav-links no-hover-padding" href=https://welpo.github.io/tabi/es/about/> sobre mí </a><li><a class="nav-links no-hover-padding" href=https://welpo.github.io/tabi/es/privacy/> política de privacidad </a><li><a class="nav-links no-hover-padding" href=https://tabi-stats.osc.garden/> estadísticas del sitio </a><li><a class="nav-links no-hover-padding" href=https://welpo.github.io/tabi/sitemap.xml> mapa del sitio </a></ul> </small></nav><div class=credits><small> Impulsado por <a href=https://www.getzola.org>Zola</a> y <a href=https://github.com/welpo/tabi>tabi</a><a href=https://github.com/welpo/tabi> Código del sitio </a></small></div></section><script async src=https://welpo.github.io/tabi/js/decodeMail.min.js></script><div class="search-modal js" aria-labelledby=modalTitle id=searchModal role=dialog><h1 class=visually-hidden id=modalTitle>Buscar</h1><div id=modal-content><div id=searchBar><div aria-hidden=true class=search-icon><svg viewbox="0 -960 960 960" xmlns=http://www.w3.org/2000/svg><path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg></div><input aria-controls=results-container aria-expanded=false autocomplete=off id=searchInput placeholder=Buscar… role=combobox spellcheck=false><div class="close-icon interactive-icon" title="Borrar búsqueda" id=clear-search role=button tabindex=0><svg viewbox="0 -960 960 960" xmlns=http://www.w3.org/2000/svg><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg></div></div><div id=results-container><div id=results-info><span id=zero_results> No hay resultados</span><span id=one_results> $NUMBER resultado</span><span id=many_results> $NUMBER resultados</span><span id=two_results> $NUMBER resultados</span><span id=few_results> $NUMBER resultados</span></div><div id=results role=listbox></div></div></div></div></footer>