From f7e81d4f7fae9f75d3b6b9f45458105aa8894a1c Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 19 Jan 2021 17:04:13 -0800 Subject: [PATCH] Add module docstring to pipeable. --- voussoirkit/pipeable.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/voussoirkit/pipeable.py b/voussoirkit/pipeable.py index b7598d9..caf2a76 100644 --- a/voussoirkit/pipeable.py +++ b/voussoirkit/pipeable.py @@ -1,3 +1,17 @@ +''' +This module provides functions for making your program easy to pipe to and from +via the command line. + +Pipeable expects a little bit of buy-in with respect to the !i and !c strings. +In traditional unix tools, reading from stdin is sometimes enabled +automatically when the program detects its input is a pipe instead of a +keyboard, sometimes enabled by passing "-" to the argument that would otherwise +read a file, and sometimes implied by a lack of arguments. Following Python's +philosophy of explicit is better than implicit, I prefer using a consistent +argparser and letting !i indicate stdin. This also means you can write programs +where any of the arguments might be !i, unlike most traditional unix tools where +only the primary data sink reads stdin. +''' # import pyperclip moved to stay lazy. import os import sys