当前位置:网站首页>A cool "ghost" console tool
A cool "ghost" console tool
2022-07-07 05:20:00 【InfoQ】
brief introduction
- Full name :Spectre.Console
- Translated names ( unofficial ): Ghost console ( Hereinafter referred to as ghost )
features
- New enough: The tools mentioned above , Or some did not mention , But tools with a large number of downloads , The update frequency is very slow , I want to be very angry ColorfulConsole, The last update has stopped 2020 year , So despite its powerful functions , But the vitality is not good . Ghosts are different , Look at the official release records , He is now in rapid iterative update , Abreast of the times 0.44.x edition , It has been updated 13 It's a small version , Yes, of course , Frequent updates are not necessarily a good thing , It also reflects many problems , Mending , But that's exactly what happened , It proves that it is energetic , It's worth affirming !
- Cool:I don't want to explain that , Look at the picture
- Strong enough :It can also be seen from the above figure , Ghost offers a variety of console printing styles , In addition to the processing of text style , And support , form , Trees , Progress bar , Even emoji expression ( The system configuration needs to be modified )
Use
typeface
AnsiConsole.MarkupLine($"[Yellow] I am the first 2 Middleware , I come from the entry file , I'm coming -{DateTime.Now}[/]");
AnsiConsole.MarkupLine("[bold]World[/]");
AnsiConsole.MarkupLine("[bold Yellow]World[/]");
form
- Static tables
var table = new Table().Centered();
table.AddColumn(" Authorized person ID");
table.AddColumn(" Authorized events ID");
table.AddColumn(" Authorized person ");
while (sdr.Read())
{
string column1 = Convert.ToString(sdr["UserID"]);
string column2 = Convert.ToString(sdr["TypeID"]);
string column3 = Convert.ToString(sdr["UserNam"]);
table.AddRow(column1, column2, column3);
}
AnsiConsole.Write(table);
// Set width
table.Width(50);
// Set offset
table.Columns[0].PadLeft(3);
// Set borders , Draw a circle
table.Border(TableBorder.Square);
- Dynamic tables
FIGlet Text
AnsiConsole.Write(
new FigletText("Tony's Box")
.Centered()
.Color(Color.Blue)
);
choice
var cmd = AnsiConsole.Prompt(
new SelectionPrompt<string>()
.Title(" The following are the operations temporarily supported by the toolkit ?")
.PageSize(10)
.MoreChoicesText("[grey]( Please select the operation to be performed )[/]")
.AddChoices(new[] {
"1. monitor 【User_ProgramTypeLink】 Permissions on the table ","2. Clear the log data half a year ago ", "3. Delete the specified index data "
}));
边栏推荐
- AOSP ~binder communication principle (I) - Overview
- Weebly mobile website editor mobile browsing New Era
- If you‘re running pod install manually, make sure flutter pub get is executed first.
- JVM(二十) -- 性能监控与调优(一) -- 概述
- Safe landing practice of software supply chain under salesforce containerized ISV scenario
- [PHP SPL notes]
- Harmonyos fourth training
- Full link voltage test: the dispute between shadow database and shadow table
- The founder has a debt of 1billion. Let's start the class. Is it about to "end the class"?
- Autowired注解用于List时的现象解析
猜你喜欢
Pytest testing framework -- data driven
Is the human body sensor easy to use? How to use it? Which do you buy between aqara green rice and Xiaomi
pytest测试框架——数据驱动
Dynamically generate tables
JHOK-ZBG2漏电继电器
No experts! Growth secrets for junior and intermediate programmers and "quasi programmers" who are still practicing in Universities
qt 简单布局 盒子模型 加弹簧
10 distributed databases that take you to the galaxy
利用OPNET进行网络仿真时网络层协议(以QoS为例)的使用、配置及注意点
window定时计划任务
随机推荐
线程同步的两个方法
torch optimizer小解析
Autowired注解用于List时的现象解析
Is it necessary to renew the PMP certificate?
LinkedBlockingQueue源码分析-初始化
DBSync新增对MongoDB、ES的支持
pmp真的有用吗?
CentOS 7.9安装Oracle 21c历险记
Complete code of C language neural network and its meaning
ThinkPHP关联预载入with
最长公共子序列(LCS)(动态规划,递归)
漏电继电器JELR-250FG
第一篇论文的写作流程
sublime使用技巧
vector和类拷贝构造函数
QT simple layout box model with spring
No experts! Growth secrets for junior and intermediate programmers and "quasi programmers" who are still practicing in Universities
HarmonyOS第四次培训
与利润无关的背包问题(深度优先搜索)
Operand of null-aware operation ‘!‘ has type ‘SchedulerBinding‘ which excludes null.