Skip to content

telemachus/spacecat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spacecat

SYNOPSIS

Concatenate with a set number of spaces or tabs at the start of each line.

WHY?

To be honest, this is just an excuse to make a small filter in C. It's easily done with a number of existing tools (awk, sed, perl). This might make it slightly more convenient than those tools, but really, I just wanted to write something small in C.

USAGE

spacecat [-h] [-c COUNT] [-n] [-r] [-s] [-t] [FILE ...]

If the -t option is given, hard tabs will be used instead of spaces. If the -c option is given, then the number of spaces or tabs can be specified. Without options, the default is to output four spaces at the start of each line. If -t is given with no explicit count, one tabstop starts each line. The -n option adds line numbers to the output. -s squeezes consecutive blank lines: only the first will appear in the output. -r removes all blank lines from the output.

BUILDING/INSTALLING

Should be as simple as make. Then just pop it into ~/bin. I've tested on OSX, OpenBSD and Debian. If you have trouble building it, please let me know.

If you have ronn—and you really should—you can also get a manpage and HTML manpage. Just run make man.

BUGS

None found so far, but I have no doubt they're in there. Please let me know if you find any.

I'm a novice C programmer. Don't use this in any mission-critical copy/paste situations.

CREDITS

Manpage made with Ronn.

AUTHOR AND LICENSE

Copyright (c) 2012-2020 Peter Aronoff, MIT License. See LICENSE for details.

About

It's cat plus spaces or tabs—useful for copying code into Markdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published