Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Progress-bar and spinner (text-based) |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.0.5 |
SHA1 sum: | 53541ed3c50ba003a2f62117e4cd322e0259eb76 |
Author: | Jozef Geurts http://joostgeurts.com/ |
Home page: | https://github.com/grsjst/progress_bar |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.0.5 | 53541ed3c50ba003a2f62117e4cd322e0259eb76 | 1 | https://github.com/grsjst/progress_bar.git |
21164a9b8bc94667ec04c138fcaa4adb201e8618 | 22 | https://github.com/grsjst/progress_bar.git |
Progress-bar and spinner portray the progress of a user defined process for SWI-Prolog (https://www.swi-prolog.org/). Several options are availe to adapt the visual appearance of the progress-bar (see the pldoc documentation for details).
This is what the simple_progress_bar
looks like
% [****************************************************************** ][71%]
and this is default_progress_bar
% default demo [=============================================> ] 3.47 seconds
It is meant to be hooked to the prolog messageing system (see https://www.swi-prolog.org/pldoc/man?predicate=print_message/2).
pack_install(progress_bar).
In your SWIPL programme include the directive:
:- use_module(progress_bar). prolog:message(demo(Msg)) --> Msg.
As an example, run the following query:
Total = 1000, forall( between(1,Total,Index), print_message(informational,demo(simple_progress_bar(Index,Total)))).
In the file `examples\demo.pl` a number of demos are provided
:- ['./examples/demo.pl']. % loads the demo :- demo_progress_bar. % runs demo simple_progress_bar, default_progress_bar and fancy_progress_bar :- demo_spinner. % runs demo simple_spinner, default_spinner and fancy_spinner
See the pldoc documentation for additional information
progress_bar.pl - the progress_bar module examples/demo.pl - a number of progress_bar and spinner examples
Pack contains 6 files holding a total of 25.1K bytes.