Sweat
view release on metacpan or search on metacpan
script/sweat view on Meta::CPAN
Sweat is optimized for the so-called Seven-Minute Workout (7MW), which
leads you through twelve 30-second drills, with 10-second rests in
between. These focus on four types of exercise: aerobic, lower-body,
upper-body, and core. While it has sensible and widely accepted
defaults, you can change or expand its list of drills if you really
want, or adjust how many drills each workout entails, or the timing
involved.
Sweat features a friendly pause function, and a shuffle mode that will
randomize the drills you receive within each type while keeping the types themselves in order,
ensuring you get a varied and balanced workout.
Sweat assumes you already know how to perform the drills it calls out (see L<"The Seven-Minute Workout">, below),
and trusts you to get through them in whatever way works best for you.
Sweat will never judge you.
Yes, Sweat is a command-line program. Get your butt off the chair once
in a while and onto the floor, fellow hackers. It's good for you.
=head2 How Sweat is different from other timers
Sweat's major features that most other 7MW timers don't have:
=head3 A speech-centered UI
Sweat guides you through voice alone (with a simple text transcription in its terminal window).
=head3 Chatty entertainment while you struggle
Sweat will (unless you ask it not to) click through a randomly chosen thread of related Wikipedia articles while you work out and read aloud what it finds.
The workout takes priority, so this intentionally distracting chatter will not make you miss any exercise cues.
With a little extra configuration, you can have Sweat instead read you current news headlines from a variety of sources.
Sweat will also tell you the local weather during certain drills, and end by reading aloud the output of the `fortune` program (if available).
=head3 Optional drill-shuffling
For variety's sake, you can shuffle the drills out of their standard order. While you still get three rounds of aerobic, lower-body, upper-body, and core drills in that order, Sweat will randomize the order of the three drills within each category.
=head3 Pause between side-switching
Halfway through the side-plank drill, Sweat gives you a few seconds to adjust yourself.
(For some reason, few if any other timers seems to bother with this.)
=head3 No-chair and no-jumping modes
A no-chair mode substitutes other drills when you find yourself in a space (e.g. a hotel room) with no suitably stable chair to exercise with.
A no-jumping mode is also available when you want to avoid stomping around on your downstairs neighbor's ceiling.
=head3 Lots of configuration options
It's a command-line Unixish program, so of course it's far too configurable. Happily, its defaults should fit most needs...
=head2 The Seven-Minute Workout
If you're not already familiar with 7MW and its twelve drills, L<this New York Times article may serve as an excellent introduction|https://well.blogs.nytimes.com/2013/05/09/the-scientific-7-minute-workout/>.
As that article suggests, oodles of apps and websites exist for all your mobile and desktop devices
to help guide you through 7MW. Some of them will work better than Sweat at making you familiar
with the exercises involved; you may find it helpful to check them out first.
L<You may also wish to read thoughts by Sweat's author about 7MW|https://fogknife.com/2015-01-11-seven-minute-workout.html>.
=head2 Sweat is not a doctor
B<Please exercise responsibly.> Sweat wants to challenge you, but please do not push yourself too hard. If you start feeling
bad in any way while using Sweat, I<stop immediately>. Consult an actual doctor and not
a weird program you found on the internet with any questions or concerns you have about
setting up an exercise regimen for yourself.
=head1 RUNNING SWEAT
=head2 Pausing the workout
With the window running Sweat focused, hit any key (except for control
keys) to pause Sweat; it will click off its timer and stop talking. Hit
a key again to resume the workout.
Pause whenever you need to, or if you need Sweat to shut up for a second
so you can pay attention to something else.
=head2 Ending the workout early
You can bail out of your workout early by just quitting the program in
an ordinary way; Control-C will work on most systems.
Quit whenever you need to, for any reason. Sweat will never judge you.
It will always greet you upon your return with unfeigned gladness.
=head1 OPTIONS AND CONFIGURATION
Except where otherwise noted, you can set any of these options on the command line, or in a configuration file. See L<"SYNOPSIS">, above, for a few
examples on running sweat with command-line options, or see L<"Configuration file">, below,
for more information on that topic.
B<For boolean options> (such as C<shuffle>), simply name them on the command line to invoke
them: C<--shuffle>, for example. To negate on the command like, precede with "no-", e.g.
C<--no-shuffle>. To set them in a configuration file, set them to 0 or 1 with YAML
syntax: C<shuffle: 1>.
B<For other options>, set them on the command line with an equals sign
(--newsapi-key=MySecretKey), or in a config file with YAML syntax
(C<newsapi_key: MySecretKey>).
Note that you can try running Sweat without any options at all; most settings have
sensible defaults, depending upon your operating system. If sweat requires settings or
other resources that it can't find, it will tell you on startup.
=head2 Basic options
=head3 entertainment
# On the command line
sweat --entertainment
sweat --no-entertainment
# In config
entertainment: 0
script/sweat view on Meta::CPAN
A valid command-line invocation (including any desired options) for a program that will say something witty (according to a typical Unix system administrator in 1988).
When in entertainment mode, Sweat will invoke this at the end of every workout,
reading the results out loud.
Default: fortune
=head3 newsapi-key
# On the command line
sweat --newsapi-key=MySecretNewsApiKey
# In config
drill-length: MySecretNewsApiKey
An application key for NewsAPI. If provided with a valid key, then Sweat will
fetch, read, and display top news headlines from a variety of sources during
your workout (unless run in C<no-news> mode).
You can fetch a free key for personal use at L<https://newsapi.org>.
If I<not> set, then Sweat will read and display Wikipedia articles instead.
Default: none
=head3 refocus
# On the command line
sweat --refocus
# In config
refocus=1
B<Boolean.> Try to return focus back to the terminal window running Sweat after
opening a new browser tab (via L<"url-program">). This is useful mainly to make
Sweat's handful of interactive features (e.g. the pause function) more
convenient, obviating the need to switch back to the terminal from the browser
before taking the desired action.
This feature requires C<pstree> to be installed on Mac, or C<xdotool> on Linux.
Default: 0 (don't try to refocus)
=head3 url-program
# Example: On Mac, always open URLs with Firefox:
# On the command line
sweat --url-program='open -a Firefox'
# In config
url-program: open -a Firefox
A valid command-line invocation (including any desired options) for a program that opens a URL (provided as a main
argument) in a browser.
Default: On Mac, it will default to "open", a program that comes with the OS.
On other systems it has no default (and thus will not open any URLs.)
Non-Mac systems running Sweat may wish to try "xdg-open", a free and open-source program that you may
need to install first. You can find xdg-open as part of "xdg-utils" in various package managers, or at
L<https://freedesktop.org/wiki/Software/xdg-utils/>. Be aware that Sweat currently does not work well if it opens
a terminal-based browser such as Lynx.
=head2 Command-line-only options
These options work only on the command line (and have no effect in a config file).
=head3 config
sweat --config=/path/to/sweat.config
Full path to a Sweat configuration file, in L<YAML> format.
Default: C<.sweat>, in your home directory. (i.e. C<$HOME/.sweat>)
=head3 help
sweat --help
Prints a quick reference to Sweat's command-line options, then exits.
=head3 interactive
sweat --interactive
sweat -i
Sweat will ask a couple of questions at launch about
how many drills you'd like, and whether to activate its entertainment features.
Answers you provide will override values otherwise set by config or default.
=head3 no-news
sweat --no-news
Forces Sweat to use Wikipedia articles as its main source of workout chatter,
even if a valid NewsAPI key has been provided (via L<"newsapi_key">).
=head3 version
sweat --version
Prints version and authorship information about Sweat, then exits.
=head2 Configuration file
You can optionally provide Sweat with a configuration file in YAML format. Sweat
will load this on startup, and apply all its settings I<before> applying any settings
provided on the command line (thus letting you override config-file settings that way).
You can provide a path to such a file via the L<"config"> command-line option. If
you don't, Sweat will look for a config file at C<$HOME/.sweat>. If it doesn't
find one there either, it will continue without loading a config file.
If the config file exists but Sweat's YAML parser can't work with it, Sweat will
complain and then exit.
In the config file, you can set any of the options listed under L<"Basic options">
or L<"Entertainment options">, using YAML syntax.
The configuration file also gives you the opportunity to redefine Sweat's drill-list.
You can accomplish this by defining a C<groups> attribute, which contains several
( run in 0.567 second using v1.01-cache-2.11-cpan-e1769b4cff6 )