• Stars
    star
    463
  • Rank 94,661 (Top 2 %)
  • Language
    C
  • License
    BSD 3-Clause "New...
  • Created over 14 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An easy-to-use C library for displaying text progress bars.

What is this thing?

progressbar is a C-class (it's a convention, dammit) for displaying attractive progress bars on the command line. It's heavily influenced by the ruby ProgressBar gem, whose api and behaviour it imitates.

Ok, what the hell is a C-class, and how do I use one?

progressbar is implemented in pure C99, but using a vaguely object-oriented convention.

Example usage:

progressbar *progress = progressbar_new("Loading",100);
for(int i=0; i < 100; i++)
{
  // Do some stuff
  progressbar_inc(progress);
}
progressbar_finish(progress);

Example output (from progressbar_demo.c):

demo output

Additional examples can be found in test/progressbar_demo.c

Why did you do this?

One of the things I miss most when I'm writing C instead of Ruby is the how ridiculously easy it is to write user-friendly, informative CLI apps in Ruby. A big part of that, at least for me, is the ProgressBar gem -- and since most of the time when I'm writing C I'm doing so because I need a tool to handle some long-running, processor-intensive task, I'd really like to have a way of seeing at a glance how much time is remaining and how far along we've gotten. Enter progressbar!

Can I use it?

Of course, if you're so inclined. progressbar is licensed under a simplified BSD license, so feel free to take it and run with it. Details can be found in the LICENSE file.

Why doesn't it compile?

If progressbar fails to build because termcap.h isn't found, you're probably missing the ncurses dev libraries.

gcc -c -std=c99 -Iinclude lib/progressbar.c
lib/progressbar.c:13:45: fatal error: termcap.h: No such file or directory
compilation terminated.

More Repositories

1

rwordnet

A pure Ruby interface to the WordNet database
Ruby
89
star
2

lilypond-ui

A simple IDE for LilyPond
TypeScript
30
star
3

rtypeset

An HTML Preprocessor for Web Typography, based on Typeset.js
Ruby
16
star
4

ConfigParser.sugar

A ConfigParser (RFC 822) Sugar for Espresso
11
star
5

clusterfuck

A subversive distributed systems tool
Ruby
6
star
6

FontTool

Turn TrueType fonts into OpenGL-friendly textures and texture atlases
Python
3
star
7

ggj2012

Global Game Jam project 2012
C#
3
star
8

generator-dropwizard-angular-gradle

Yeoman generator that scaffolds out an API served by Java 8 + Dropwizard and a front-end application built using Typescript + Angular
JavaScript
3
star
9

generator-dropwizard-gradle

A Yeoman generator that scaffolds a Java project with Dropwizard and Gradle
JavaScript
3
star
10

fdl

A Feature Description Language for Semantic Role Labeling
Ruby
2
star
11

mediabox

A highly configurable, plugin-based program for media computers.
Ruby
2
star
12

Price-Tiers

Extract iOS price tiers from iTunes Connect and format them for MySQL
Ruby
2
star
13

childes

Code for wrangling the CHILDES corpus into something useful
Ruby
2
star
14

AtlasTool

Create OpenGL friendly texture atlases
Python
2
star
15

shownotes-theme

Minimal Bootstrap-like styling for ShowNotes.io
CSS
2
star
16

crud

Crud generates UML-like class diagrams for my own idiosyncratic version of OOP-style C
Ruby
2
star
17

dotfiles

My dotfiles, organized as a Homesick castle
Ruby
2
star
18

corncob

Idiosyncratic C classes for building probabilistic models based on corpus counts.
C
1
star
19

GraphConnectivity

A platform for exploring graph connectivity measures
Ruby
1
star
20

probmodels

Scripts, styles, and images for the probmodels website
1
star
21

Categorizer

Scripts and tools for my thesis project
Ruby
1
star
22

findhost

Flail around the network looking for an available machine.
Ruby
1
star
23

Status.scrape

Get a list of all users on a Status.net site
Ruby
1
star
24

ruby-regress

A command-line tool & Ruby class for computing Pearson's r and other stats
Ruby
1
star
25

expatgames.net

Scripts, styles, and images for expatgames.net
JavaScript
1
star
26

oldhatbooks

Source Code & Docs for the Old Hat Books website
PHP
1
star
27

ldacats

A one-off tool for extracting categories from GibbsLDA++ output.
Ruby
1
star
28

Bebop

Python skeleton code for 48-hour game compos (ala Ludum Dare)
Python
1
star
29

itc_ducksboard

Funnel sales reports from iTunes Connect to Ducksboard
Ruby
1
star
30

Dendrograms

Ruby implementation of Hierarchical Random Graphs
Ruby
1
star
31

clusterval

Unsupervised evaluation of automatic clustering, using Semeval07 F-Scores.
Ruby
1
star
32

hrgiew

Hierarchical Random Graphs, Incremental, with Edge Weights
C++
1
star
33

brown

Tools to work with Percy Liang's implementation of the Brown algorithm
C++
1
star
34

highlight-google-ads

Firefox extension to make Google search ads more identifiable
CSS
1
star