lesma(1)
LESMA v1.2.2
lesma(1)

NAME

lesma - simple paste app friendly with browser and command line

SYNOPSIS

<command> | curl -F 'lesma=<-' https://lesma.eu

DESCRIPTION

add ?limit=n to set a download count limit (0: unlimited; max: 255)
add ?expire=n to set an expiration time in hours (max: 720h/30d)
add ?password=p to set a password or obtain a password-protected lesma
replace 'lesma=<-' with 'data=@file' to send binary files (max: 10MiB)
add any extension to resulting url for syntax highlighting
add ?raw for plain file
add #n-<number> for go directly to line number anchor

DEFAULTS

Download count limit: unlimited plain; unlimited browser
Expiration time: 720 hour(s) / 30 day(s) plain; 1 hour(s) browser

SPECIALS

/:help show this page

EXAMPLES

Basic usage

~$ cat lesma.rs | curl -F 'lesma=<-' https://lesma.eu
   https://lesma.eu/lesma
~$ firefox https://lesma.eu/lesma.rs

Set a view / download limit

~$ cat lesma.rs | curl -F 'lesma=<-' 'https://lesma.eu?limit=1'
   https://lesma.eu/lesma
~$ curl https://lesma.eu/lesma.rs
   Show lesma contents. Colored!
~$ curl https://lesma.eu/lesma.rs
   lesma not found

Note that cloning lesmas over the web or sharing the link in a social
network or chat that has the preview enabled consumes a view. To avoid
consuming this view when sharing the link you can set a password.

Send text that can only be viewed once

~$ curl -F 'lesma=some text' 'https://lesma.eu?limit=1'

Set an expiration time of one hour

~$ curl -F 'lesma=some text' 'https://lesma.eu?expire=1'

Set a limit of ten views or an expiration time of one day

~$ curl -F 'lesma=some text' 'https://lesma.eu?limit=10&expire=24'

Set a password-protected lesma

~$ curl -F 'lesma=some text' 'https://lesma.eu?password=complexword'

Note that the password is entered as a URL option so special characters
must be transformed into URL encoding. To avoid this you can use the
following method.

~$ curl -F 'lesma=some text' -F 'password=some pass' https://lesma.eu

Get a password-protected lesma

~$ curl 'https://lesma.eu/lesma?password=complexword'

If the password has special characters, it is easier to use the
following method.

~$ curl -F 'password=some pass' https://lesma.eu

Set a limit of one view or an expiration of one hour and password-protected

~$ curl -F 'lesma=text' 'https://lesma.eu?limit=1&expire=1&password=pass'

Send parameters in the request body instead of in the URL

~$ curl -F 'lesma=text' -F 'limit=1' -F 'expire=1' -F 'password=pass' \
   https://lesma.eu

Send any binary file

~$ curl -F 'data=@file' https://lesma.eu

You can send limit, expire and password parameters just like with
text lesmas. This always generates a download link regardless of the
file you send.

AUTHOR

Written by Óscar García Amor

COPYRIGHT

Copyright © 2017-2024 Óscar García Amor (https://ogarcia.me).
Distributed under terms of the GNU GPLv3 license.

REPORTING BUGS

https://gitlab.com/ogarcia/lesma/issues

SEE ALSO

http://gitlab.com/ogarcia/lesma