Changelog for asfa
- Disable unnecessary regex features to reduce binary size by ~20% (by @jirutka)
- Cosmetic: Ensure verification separator is at least ellipsis ("...").
- Add preliminary nix support.
- Updated dependencies
- Fix: Added missing feature flags for clap3 release candidates
- Fix: Tests not running by disabling timestamps in
simple_logger
clean
/list
-command:- Fix having to supply negative indices after double dash.
- Add
rename
/mv
command.- Rename a remote file after uploading.
- Files can be selected by index or via local file with the same hash.
push
-command:- Provide more detailed error message if creation of remote file fails.
- Add
details
config option.- If true, act as if
--details
is given on command line. - If set,
-D
/--no-details
can be used to overwrite yet again.
- If true, act as if
- Have
-qqq
disable all logging and output messages. - Add new command:
check
- Same as list, it can be used to check if a given set of local files have already been uploaded.
- If so, check prints similar information as list.
- In case at least one file is not found, exit with return code 1 (i.e. for scripts when invoked with
-qqq
). - Since both
check
andclean
command begin withc
, another letter is needed to differentiate their short forms.
list
-command:- Fix interaction between
--reverse
and--last
. - Add
--first
-argument that works opposite of last.
- Fix interaction between
- Attempt to retrieve username from openSSH-config prior to falling back on system.
- Update dependencies
push
-command:- Remove need to seperate single alias from single file by dashes if alias specified first.
- Previously:
asfa push --alias my-alias.txt -- my-original-file.txt
- Now:
asfa push --alias my-alias.txt my-original-file.txt
- Previously:
- Check response for errors regaring
atd
not running if--expire
specified. - Now supports a default setting for
--expire
in the config.- Same as auth, both a global setting and host-specific settings are supported.
- Any set default argument can be disabled per host or command line by
specifying
none
as argument.
- Remove need to seperate single alias from single file by dashes if alias specified first.
list
-command:- More informative message if no files are present on remote site.
- tests:
- Fix
atd
not running in tests, but tests still passing because file got deleted differently.
- Fix
- Internal:
- Removed code-smell reported by clippy.
list
-command:- Disable framed-box layout if piping to another program.
- Separate different fields by tabs.
- Allows for easier parsing.
- Fix cryptic error message if there are no remote files.
- Disable framed-box layout if piping to another program.
- config: If defined, use hostname to query openSSH config.
- This allows for several distinct host-entries to be defined for the same physical host.
- Switch CI from Travis to Github Actions.
push
-command: When specifying--expire
, move notification to the beginning of the line. This This allows for easier box copying of links when uploading several files at once.list
-command: When specifying--detail
, fix files below one KiB having no unit suffix. Now the suffix isB
.- If not specified explicitly, get hostname and port for host-entry from openSSH config.
- Fix connection error when openSSH offers too many pubkeys.
- Fix formatting error when displaying file sizes that are >=999.5 {K,M,G,T,…}, breaking table formatting.
list
-command:- Fix displaying all files if filter does not match anything.
push
-command:- When specifying
--expire
, the notification about when the link expires is now- an explicit timestamp instead of repeated user input.
- printed to stderr instead of stdout.
- only printed if
asfa
is used in a terminal. This makes it easier to capture the URL in scripts liketmp_link=$(asfa push my-file)
.
- When specifying
push
: Add--prefix
/--suffix
.- Add a prefix (and/or suffix) to the filename stem (i.e. the part without extension).
- Useful to distinguish several autogenerated files with generic names (e.g., plots).
- Please note that dual extensions like
.tar.gz
specifying a suffix will cause it to be inserted after.tar
(i.e. the extension of afoobar.tar.gz
file is.gz
).
- Changed
from_openssh
(introduced in v0.5.4) to default totrue
(was originally planned for v0.6.0, but forgotten :( ). - Fix bug that no files are listed if some folder names begin with a dash.
clean
/list
/verify
-commands: Add--newer
/--older
-flags- They take a duration (seconds, minutes, hours, weeks, months, years) and filter the otherwise selected files
- Supported formats: -> tl;dr: Quantity and unit are NOT seperated by spaces
- Examples:
- List all files uploaded in the last three days:
asfa list --newer 3weeks
- Clean all files older than a month:
asfa clean --older 1month
- List all files uploaded in the last three days:
clean
-command:- Make output in confirmation dialog similar to
list
-command. - Add
-d
/--details
to force displaying of file details in confirmation likelist
command.
- Make output in confirmation dialog similar to
push
-command:- Add
--limit-{mbits,kbytes}
to allow specifying a speed limit when uploading. - Add
-e
/--expire
argument- automatically deletes uploaded files after set delay
- delay syntax specified in the same manner as
--newer
/--older
argument - uses
at
at remote site to schedule deletion
- Add
- Fix host-specific auth settings falling back on the default Auth-settings
instead of the global Auth-settings defined in
config.yaml
. - Add support to obtain settings from openSSH.
- If user-supplied settings fail to authenticate against the remote server, try
using private keys listed in openSSH.
- This can be toggled via a new
from_openssh
-boolean flag inauth
-section. - For now, this defaults to false - will be changed to true in next non-bugfix release.
- This can be toggled via a new
- Ensure bulk-requested file stats are in correct order.
- Rework authentication procedure to only try authentication methods that the server advertises.
- Add support for keyboard-interactive authentication if the user enables interactive input. -> Allows for two factor authentication (e.g., with pam-based google-authenticator)
- Fix host settings defined in separate file not falling back to defaults set in
config.yaml
- Improve stat retrieval speed from < 50 entries/s to near instant.
- Needs
find
,xargs
andstat
on the remote site. - Falls back to retrieving stats via sftp-interface if needed tools not available.
- Needs
- Fix: Remove unused
--no-confirm
-switch from verify command. - Fix: Colorful output for clean-confirmation.
- Allow host selection via
$ASFA_HOST
environment variable. Priority for host selection is:-H
/--host
supplied via command line.ASFA_HOST
environment variable.default_host
from config file.- Single host if there is only one defined.
clean
-command:- Add
-F
/--filter
-option to clean files matching a given regex. - Add
-n
/--last
-switch fromlist
command to clean the lastn
files - Add
-r
/--reverse
-switch to reverse listing (useful for-n
). - Add
-S
/--sort-size
-switch to sort files by remote size (useful for-n
). - Add
-T
/--sort-time
-switch to sort selected files by modification time.
- Add
list
-command:- Add
-T
/--sort-time
-switch to sort selected files by modification time.
- Add
- Add
verify
-command with same file selection arguments asclean
/list
.
- Fix name of
prefix_length
in example config. list
: Add-d
/--details
switch that simply enables printing of all details.- Fix formatting error when displaying file sizes that are 1000 {K,M,G,T,…} exactly.
- Add
private_key_file
to auth-option in order to specfiy private key file directly - Add
--verbose
argument that increases loglevel - Add
--quiet
argument that decreases loglevel - Encode hash in base64 in order to make needed URL prefix shorter at same "guessability". → This causes the maximum prefix length to go down from 128 to 64 (4 bit per char → 8 bit per char)
list
:- Add
-s
/--with-size
-switch to print file sizes. - Add
-f
/--filenames
-switch to print filenames instead of full urls in listing. - Add
-S
/--sort-size
-switch to sort selected files by remote size. - Add
-r
/--reverse
-switch to reverse listing. - Add
-F
/--filter
-option to only display filenames matching a given regex. - Add
-i
/--indices
-switch to only print indices of files.- This is useful to supply as input to the clean command for instance:
- Example:
asfa clean $(asfa list -iF "\.png$")
deletes all png.
- Add
-t
/--with-time
to print modification times.
- Add
- Fix prefix length limited to 64 -> now 128
- Fix error when deleting file by hash (via
--file
).
- Fix unencoded-URL printed after push (only
list
reported correctly encoded URL) - Add notifications for upload progress and remote verification
- Add confirmation prior to cleaning (can be avoided by issuing
--no-confirm
)
- Add option to specify prefix length
- Fix build issue with clap-3.0.0-beta.2
- Initial release