Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/rotsix/media-sort
A command-line tool and Go (golang) library which categorizes provided files and directories by moving them into to a structured directory tree, using various live sources.
Binaries
See the latest release or download and install it now with curl https://i.jpillora.com/media-sort! | bash
Source
$ go get -v github.com/jpillora/media-sort
$ curl https://i.jpillora.com/media-sort! | bash
Installing jpillora/media-sort v2.4.3.....
######################################################################## 100.0%##O=# #
Installed at /usr/local/bin/media-sort
Test run media-sort
(read-only mode)
$ cd my-media/
$ media-sort --dry-run --recursive .
2016/01/30 09:35:47 [Dryrun]
2016/01/30 09:35:47 Searching dick van dyke show (series)
2016/01/30 09:35:47 [#1/1] dick-van-dyke-show.s01e10.[Awesome-Audio]-[Super-Quality]-[Name-of-Encoder].mp4
└─> The Dick Van Dyke Show S01E10.mp4
$ media-sort --help
Usage: media-sort [options] <target> [target] ...
media-sort categorizes the provided files and directories (targets) by
moving them into to a structured directory tree, sorting is currently
performed using TVMaze, MovieDB and Google.
Options:
--tv-dir, -t tv series base directory (defaults to current directory)
--movie-dir, -m movie base directory (defaults to current directory)
--tv-template tv series path template
--movie-template movie path template
--extensions, -e types of files that should be sorted (default mp4,avi,mkv,mpeg,mpg,mov,webm)
--concurrency, -c search concurrency [warning] setting this too high can cause rate-limiting
errors (default 6)
--file-limit, -f maximum number of files to search (default 1000)
--accuracy-threshold, -a filename match accuracy threshold (default 95)
--min-file-size minimum file size (default 25MB)
--recursive, -r also search through subdirectories
--dry-run, -d perform sort but don't actually move any files
--skip-hidden, -s skip dot files
--action filesystem action used to sort files (available <copy|link|move>, default
move)
--hard-link, -h use hardlinks instead of symlinks (forces --action link)
--overwrite, -o overwrites duplicates
--overwrite-if-larger overwrites duplicates if the new file is larger
--watch, -w watch the specified directories for changes and re-sort on change
--watch-delay delay before next sort after a change (default 3s)
--verbose, -v verbose logs
--version display version
--help display help
by default, tv series are moved to:
./<title> S<season>E<episode>.<ext>
and movies are moved to:
./<title> (<year>).<ext>
to modify the these paths, you can use the --tv-template and
--movie-template options. These options describe the new file path for
tv series and movies using Go template syntax. You can find the
default values here:
https://godoc.org/github.com/jpillora/media-sort/sort#pkg-variables
and you can view all possible template variables here:
https://godoc.org/github.com/jpillora/media-sort/sort#Result
Version:
0.0.0-src
Read more:
github.com/jpillora/media-sort
See https://godoc.org/github.com/jpillora/media-sort
The API has 3 layers:
mediasearch.Search(query, year, mediatype string) (mediasearch.Result, error)
Returns search resultSearch
): mediasort.Sort(path string) (*mediasort.Result, error)
Attempts to extract search query information from the path string, returns result which can be used to format a new path or result.PrettyPath()
can be used.Sort
): mediasort.FileSystemSort(config mediasort.Config) error
Attempts to sort all paths provided in config.Targets
, when successful - results are formatted and renamed to use the newly formatted path.Copyright © 2020 Jaime Pillora <dev@jpillora.com>
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.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.