Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c29d758
commit 4c9d6c9
Showing
35 changed files
with
3,315 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/.cargo-ok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ok |
5 changes: 5 additions & 0 deletions
5
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/.cargo_vcs_info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"git": { | ||
"sha1": "a250e4650a4cc5a4d418acab57d3cf44d522b2ec" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.*.swp | ||
tags | ||
target | ||
/Cargo.lock | ||
/wincolor/Cargo.lock |
3 changes: 3 additions & 0 deletions
3
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/COPYING
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This project is dual-licensed under the Unlicense and MIT licenses. | ||
|
||
You may use this code under the terms of either license. |
30 changes: 30 additions & 0 deletions
30
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
# | ||
# When uploading crates to the registry Cargo will automatically | ||
# "normalize" Cargo.toml files for maximal compatibility | ||
# with all versions of Cargo and also rewrite `path` dependencies | ||
# to registry (e.g. crates.io) dependencies | ||
# | ||
# If you believe there's an error in this file please file an | ||
# issue against the rust-lang/cargo repository. If you're | ||
# editing this file be aware that the upstream Cargo.toml | ||
# will likely look very different (and much more reasonable) | ||
|
||
[package] | ||
name = "termcolor" | ||
version = "1.0.4" | ||
authors = ["Andrew Gallant <jamslam@gmail.com>"] | ||
exclude = ["/.travis.yml", "/appveyor.yml", "/ci/**"] | ||
description = "A simple cross platform library for writing colored text to a terminal.\n" | ||
homepage = "https://github.com/BurntSushi/termcolor" | ||
documentation = "https://docs.rs/termcolor" | ||
readme = "README.md" | ||
keywords = ["windows", "win", "color", "ansi", "console"] | ||
license = "Unlicense OR MIT" | ||
repository = "https://github.com/BurntSushi/termcolor" | ||
|
||
[lib] | ||
name = "termcolor" | ||
bench = false | ||
[target."cfg(windows)".dependencies.wincolor] | ||
version = "1" |
21 changes: 21 additions & 0 deletions
21
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/Cargo.toml.orig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[package] | ||
name = "termcolor" | ||
version = "1.0.4" #:version | ||
authors = ["Andrew Gallant <jamslam@gmail.com>"] | ||
description = """ | ||
A simple cross platform library for writing colored text to a terminal. | ||
""" | ||
documentation = "https://docs.rs/termcolor" | ||
homepage = "https://github.com/BurntSushi/termcolor" | ||
repository = "https://github.com/BurntSushi/termcolor" | ||
readme = "README.md" | ||
keywords = ["windows", "win", "color", "ansi", "console"] | ||
license = "Unlicense OR MIT" | ||
exclude = ["/.travis.yml", "/appveyor.yml", "/ci/**"] | ||
|
||
[lib] | ||
name = "termcolor" | ||
bench = false | ||
|
||
[target.'cfg(windows)'.dependencies] | ||
wincolor = { version = "1", path = "wincolor" } |
21 changes: 21 additions & 0 deletions
21
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/LICENSE-MIT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Andrew Gallant | ||
|
||
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. |
86 changes: 86 additions & 0 deletions
86
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
termcolor | ||
========= | ||
A simple cross platform library for writing colored text to a terminal. This | ||
library writes colored text either using standard ANSI escape sequences or | ||
by interacting with the Windows console. Several convenient abstractions | ||
are provided for use in single-threaded or multi-threaded command line | ||
applications. | ||
|
||
[![Linux build status](https://api.travis-ci.org/BurntSushi/termcolor.png)](https://travis-ci.org/BurntSushi/termcolor) | ||
[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/termcolor?svg=true)](https://ci.appveyor.com/project/BurntSushi/termcolor) | ||
[![](https://img.shields.io/crates/v/termcolor.svg)](https://crates.io/crates/termcolor) | ||
|
||
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). | ||
|
||
### Documentation | ||
|
||
[https://docs.rs/termcolor](https://docs.rs/termcolor) | ||
|
||
### Usage | ||
|
||
Add this to your `Cargo.toml`: | ||
|
||
```toml | ||
[dependencies] | ||
termcolor = "1" | ||
``` | ||
|
||
and this to your crate root: | ||
|
||
```rust | ||
extern crate termcolor; | ||
``` | ||
|
||
### Organization | ||
|
||
The `WriteColor` trait extends the `io::Write` trait with methods for setting | ||
colors or resetting them. | ||
|
||
`StandardStream` and `StandardStreamLock` both satisfy `WriteColor` and are | ||
analogous to `std::io::Stdout` and `std::io::StdoutLock`, or `std::io::Stderr` | ||
and `std::io::StderrLock`. | ||
|
||
`Buffer` is an in memory buffer that supports colored text. In a parallel | ||
program, each thread might write to its own buffer. A buffer can be printed to | ||
stdout or stderr using a `BufferWriter`. The advantage of this design is that | ||
each thread can work in parallel on a buffer without having to synchronize | ||
access to global resources such as the Windows console. Moreover, this design | ||
also prevents interleaving of buffer output. | ||
|
||
`Ansi` and `NoColor` both satisfy `WriteColor` for arbitrary implementors of | ||
`io::Write`. These types are useful when you know exactly what you need. An | ||
analogous type for the Windows console is not provided since it cannot exist. | ||
|
||
### Example: using `StandardStream` | ||
|
||
The `StandardStream` type in this crate works similarly to `std::io::Stdout`, | ||
except it is augmented with methods for coloring by the `WriteColor` trait. | ||
For example, to write some green text: | ||
|
||
```rust | ||
use std::io::Write; | ||
use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor}; | ||
|
||
let mut stdout = StandardStream::stdout(ColorChoice::Always); | ||
stdout.set_color(ColorSpec::new().set_fg(Some(Color::Green)))?; | ||
writeln!(&mut stdout, "green text!")?; | ||
``` | ||
|
||
### Example: using `BufferWriter` | ||
|
||
A `BufferWriter` can create buffers and write buffers to stdout or stderr. It | ||
does *not* implement `io::Write` or `WriteColor` itself. Instead, `Buffer` | ||
implements `io::Write` and `termcolor::WriteColor`. | ||
|
||
This example shows how to print some green text to stderr. | ||
|
||
```rust | ||
use std::io::Write; | ||
use termcolor::{BufferWriter, Color, ColorChoice, ColorSpec, WriteColor}; | ||
|
||
let mut bufwtr = BufferWriter::stderr(ColorChoice::Always); | ||
let mut buffer = bufwtr.buffer(); | ||
buffer.set_color(ColorSpec::new().set_fg(Some(Color::Green)))?; | ||
writeln!(&mut buffer, "green text!")?; | ||
bufwtr.print(&buffer)?; | ||
``` |
24 changes: 24 additions & 0 deletions
24
rust_crates/registry/src/github.com-1ecc6299db9ec823/termcolor-1.0.4/UNLICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
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 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. | ||
|
||
For more information, please refer to <http://unlicense.org/> |
Oops, something went wrong.