aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-13 17:16:24 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-13 17:16:24 -0500
commitbbf648ce7a6eca59791171b0d51f1c2f7f8c507a (patch)
treec57fd585d5e84c5821c9d995900834786d68a953
parent9bb3185998d3dcd047f6de0e34f018b37cfdb37c (diff)
downloadtextmode-bbf648ce7a6eca59791171b0d51f1c2f7f8c507a.tar.gz
textmode-bbf648ce7a6eca59791171b0d51f1c2f7f8c507a.zip
prep for initial releasev0.1.0
-rw-r--r--CHANGELOG.md7
-rw-r--r--Cargo.toml7
-rw-r--r--LICENSE32
-rw-r--r--README.md30
4 files changed, 76 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..3ff724c
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,7 @@
+# Changelog
+
+## [0.1.0] - 2021-03-13
+
+### Added
+
+* Initial release
diff --git a/Cargo.toml b/Cargo.toml
index fe1b835..b9fda6b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,6 +4,13 @@ version = "0.1.0"
authors = ["Jesse Luehrs <doy@tozt.net>"]
edition = "2018"
+description = "terminal interaction library backed by a real terminal parser"
+repository = "https://git.tozt.net/textmode"
+readme = "README.md"
+keywords = ["curses", "vt100", "terminal", "tui"]
+categories = ["asynchronous", "command-line-interface"]
+license = "MIT"
+
[dependencies]
itoa = "0.4"
nix = "0.20"
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..989bb12
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,32 @@
+This software is Copyright (c) 2021 by Jesse Luehrs.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+The MIT License
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the Software
+without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to
+whom the Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall
+be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
+WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..aff1aae
--- /dev/null
+++ b/README.md
@@ -0,0 +1,30 @@
+# textmode
+
+`textmode` is a library for terminal interaction built on top of a real
+terminal parsing library. It allows you to do arbitrary drawing operations on
+an in-memory screen, and then update the visible terminal output to reflect the
+in-memory screen via an optimized diff algorithm when you are finished. Being
+built on a real terminal parsing library means that while normal curses-like
+operations are available:
+
+```rust
+use textmode::Textmode;
+let mut tm = textmode::Output::new().await?;
+tm.clear();
+tm.move_to(5, 5);
+tm.set_fgcolor(textmode::color::RED);
+tm.write_str("foo");
+tm.refresh().await?;
+```
+
+you can also write data containing arbitrary terminal escape codes to the
+output and they will also do the right thing:
+
+```rust
+tm.write(b"\x1b[34m\x1b[3;9Hbar\x1b[m");
+tm.refresh().await?;
+```
+
+This module is split into two main parts: `Output` and `Input`. See the
+documentation for those types for more details. Additionally, the `blocking`
+module provides an equivalent interface with blocking calls instead of async.