https://github.com/mohawk2/mojolicious-command-bulkget
bulkget command for Mojolicious
https://github.com/mohawk2/mojolicious-command-bulkget
Last synced: 9 months ago
JSON representation
bulkget command for Mojolicious
- Host: GitHub
- URL: https://github.com/mohawk2/mojolicious-command-bulkget
- Owner: mohawk2
- Created: 2017-12-11T05:09:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T02:04:12.000Z (over 8 years ago)
- Last Synced: 2025-02-05T06:14:22.519Z (over 1 year ago)
- Language: Perl
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Mojolicious::Command::bulkget - Perform bulk get requests
# PROJECT STATUS
| OS | Build status |
|:-------:|--------------:|
| Linux | [](https://travis-ci.org/mohawk2/Mojolicious-Command-bulkget) |
[](https://metacpan.org/pod/Mojolicious::Command::bulkget)
# SYNOPSIS
Usage: APPLICATION bulkget urlbase outdir suffixesfile
# suffixes contains lines with 1, 2, 3
# fetches /pets/1, /pets/2, ...
# stores results in outputdir/1, outputdir/2, ...
mojo bulkget http://example.com/pets/ outputdir suffixes
Options:
-v, --verbose Print progress information
# DESCRIPTION
[Mojolicious::Command::bulkget](https://metacpan.org/pod/Mojolicious::Command::bulkget) is a command line interface for
bulk-fetching URLs.
Each line of the "suffixes" file is a suffix. It gets appended to the URL
"base", then a non-blocking request is made. Only 20 requests will be
active at the same time. When ready, the result is stored in the output
directory with the suffix as the filename.
This command uses the relatively new Mojolicious feature, Promises. The
code may be considered worth examining for lessons on what to do, and/or
what not to do.
# ATTRIBUTES
## description
$str = $self->description;
## usage
$str = $self->usage;
# METHODS
## run
$get->run(@ARGV);
Run this command.
# AUTHOR
Ed J
Based heavily on [Mojolicious::Command::openapi](https://metacpan.org/pod/Mojolicious::Command::openapi).
# COPYRIGHT AND LICENSE
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.