TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

TTY: Ruby gem for building command line apps

59 点作者 pmurach超过 10 年前

7 条评论

pipeep超过 10 年前
The question-and-answer system seems similar to node&#x27;s inquirer module:<p><a href="https://github.com/SBoudrias/Inquirer.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SBoudrias&#x2F;Inquirer.js</a><p>There&#x27;s a re-implementation of that same idea for python:<p><a href="https://github.com/magmax/python-inquirer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;magmax&#x2F;python-inquirer</a><p>I&#x27;ve been building something recently that uses python-inquirer, although it isn&#x27;t a perfect fit for my use-case. I&#x27;d be interested to know if there are any more similar libraries for python.
评论 #8348500 未加载
lobster_johnson超过 10 年前
Looks nice! I have been thinking of extracting some code into a gem like this; now I might not have to.<p>Features I need, though:<p>- Creating tables where you know the desired column widths (number of characters or percentages) but you don&#x27;t know the number of rows yet, because you&#x27;d like to stream the rows, not wait for all the data until rendering.<p>- Display progress on a single line and the ability to clean the current line when done. Typically this is stuff like percentage&#x2F;bytes completed. Spinner would be nice.<p>- Display an incremental series of steps that get a checkmark and turn green when ok, or display an error symbol and turn red when not.<p>Will see if I have time to work this into your gem.<p>Your site is a little broken, by the way. The API link doesn&#x27;t go to any API documentation, and on the Usage page, only the table links in the sidebar work.
评论 #8352577 未加载
bstar77超过 10 年前
Over the past couple years I&#x27;ve been building little libraries in ruby for a boxing simulator I plan to make some day. I&#x27;ve already built the name generator, region generator, coordinate system for the ring movement, json file db, etc.<p>The problem I&#x27;ve had is figuring out where I bring this all together, I&#x27;ve debated making it web enabled, standalone app, etc. I think I might just use this library and make it CLI based, the table library makes things really interesting for managing stats and events- I actually have a pretty strong use case for this to all be plugin based. I&#x27;d love to have my little sim running in a terminal window while I&#x27;m hacking on my web projects.<p>Anyway, very cool stuff, I will be investigating much deeper very soon!
评论 #8352530 未加载
bmn_超过 10 年前
There&#x27;s stuff in TTY that does not belong in core (table rendering, logging), and there is a great lack of features that is available by default in [MooseX-App](<a href="http://p3rl.org/MooseX::App" rel="nofollow">http:&#x2F;&#x2F;p3rl.org&#x2F;MooseX::App</a>): bash completion, typo detection&#x2F;suggestions, command words (à la `git foo`, `svn foo`).<p>TTY&#x27;s choice of eliminating dependencies is short-sighted. By embracing dependencies, a library can be more powerful, have more features, solve more problems.
评论 #8352490 未加载
habosa超过 10 年前
Looks great, I will probably use this to make scripts at work.<p>Note: the side-nav on the Usage page (<a href="http://peter-murach.github.io/tty/usage/" rel="nofollow">http:&#x2F;&#x2F;peter-murach.github.io&#x2F;tty&#x2F;usage&#x2F;</a>) doesn&#x27;t work for me. I can only get to Table Creation.
评论 #8348485 未加载
transfire超过 10 年前
ANSI gem does a lot of this already <a href="http://rubyworks.github.com/ansi" rel="nofollow">http:&#x2F;&#x2F;rubyworks.github.com&#x2F;ansi</a>. I&#x27;m always a bit leery of all-in-one libraries. If libraries have good SOC then it&#x27;s nice to be able to mix and match.
评论 #8348529 未加载
AJAlabs超过 10 年前
Right on! This is a project I&#x27;ll be keeping an eye on!
评论 #8348489 未加载