View Single Post
Old 04-13-2014, 01:15 PM   #4
signum
Zealot
signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.
 
Posts: 119
Karma: 64428
Join Date: Aug 2011
Device: none
How exciting! It sounds like you are well on the way and have learned a lot already.

This project reminds me of a feature I wish more editors had. My model is the vi editor's shell escape. For those who are unfamiliar with vi, the shell escape will create an anonymous stream of lines that are piped into the program of your choice. The output of your program is automatically piped back in to vi.

The program can be anything, even a shell script on its own. The major rule is that all input and output are pipes. A consequence of this is that it is allowable to read a line from the input pipe, process it somehow, and write the edited output to the output pipe. When the input reaches end of file, everything is closed and control returns to vi. This is in contrast to the "open with" feature, where all input is delivered at once to the editor, all changes are made, and all output is written at once back to sigil. I would call this a simplex pipe. Either input all at once or output all at once. The shell escape is a pair of pipes that allow partial reads and partial writes to be interleaved. Much more in line with the Unix stream concept.

Were this available to sigil, you could pipe your file to stream-oriented programs such as sed, awk, wc, sort, etc. All non-interactive common utilities, but they each do one thing, and do it well.

Just a thought for your consideration.
signum is offline   Reply With Quote