Crates.io | squ |
lib.rs | squ |
version | 0.1.0 |
source | src |
created_at | 2022-12-16 23:51:47.537 |
updated_at | 2022-12-16 23:51:47.537 |
description | Simple command-line utility for converting quotation marks in plaintext files to "smart quotes". |
homepage | https://github.com/mdunsmuir/squ |
repository | https://github.com/mdunsmuir/squ |
max_upload_size | |
id | 739550 |
size | 15,788 |
Simple command-line utility for converting quotation marks in plaintext files to "smart quotes". A very, very, very thin wrapper around the crowbook-text-processing crate.
Writing and typesetting should be two separate processes. Unfortunately, mankind has inflicted upon itself the diabolical torments of WYSIWYG/"rich text" editing, bringing writing and typesetting together in an exceedingly unhappy marriage.
If you like writing in plaintext editors with regular quotes, but need to convert your writing to "smart quotes" for publication/distribution and the tools you're using don't already support doing so, squ
is a fast, flexible option.
cargo install squ
squ
attempts to convert the quotes in an existing file to "smart quotes". It can either output the result to stdout or replace the contents of the input file in place. It can't, yet, operate on stdin. Sorry.
$ squ --help
Convert plain quotes (single and double) in a file to matched "smart" quotes
Usage: squ [OPTIONS] <FILE>
Arguments:
<FILE> The file to convert
Options:
-i, --in-place
-h, --help Print help information
-V, --version Print version information
The file foo.txt
contains text quoted with reqular quotation marks. After processing by squ
, those quotes have been converted to matching "smart quotes", making foo.txt
a dirty liar. Note the use of the -i
flag to operate on foo.txt
in-place.
$ cat foo.txt
"This file doesn't have smart quotes!"
$ squ -i foo.txt
$ cat foo.txt
“This file doesn’t have smart quotes!”