Download Build Awesome Command-Line Applications in Ruby 2: Control by David B. Copeland PDF

By David B. Copeland

Speak on to your process. With its basic instructions, flags, and parameters, a well-formed command-line software is the fastest technique to automate a backup, a construct, or a deployment and simplify your lifestyles. With this booklet, you will research particular how one can write command-line functions which are effortless to exploit, set up, and retain, utilizing a collection of transparent most sensible practices and the Ruby programming language. This publication is designed to make any programmer or method administrator extra efficient of their activity. Now up to date for Ruby 2.

Writing a command-line software that is self-documenting, strong, adaptable and eternally worthwhile is simpler than you may imagine. Ruby is especially fitted to this activity, since it combines high-level abstractions with "close to the steel" method interplay wrapped up in a concise, readable syntax. Plus, Ruby has the aid of a wealthy surroundings of open resource instruments and libraries.

Ten insightful chapters each one clarify and exhibit a command-line top perform. you will see the right way to use those instruments to raise the lowliest automation script to a maintainable, polished software. you are going to the best way to use unfastened, open resource parsers to create ordinary command-line interfaces in addition to command suites. you will see the best way to use defaults to maintain thoughts uncomplicated for daily clients, whereas giving complicated clients techniques for extra complicated projects. there is no it is because a command-line program should still lack documentation, even if it truly is a part of a aid command or a guy web page; you can find out whilst and the way to exploit either. Your trip from command-line beginner to seasoned ends with a glance at worthwhile techniques to checking out your apps, and contains a few enjoyable suggestions for outside-the-box, colourful interfaces that would satisfaction your users.

With Ruby, the command line isn't really lifeless. lengthy dwell the command line.

Show description

Read Online or Download Build Awesome Command-Line Applications in Ruby 2: Control Your Computer, Simplify Your Life PDF

Best protocols & apis books

Home networking for dummies

A community is a approach of 2 or extra desktops which are hooked up in a few demeanour (you have plenty of offerings concerning the "manner"). each one machine at the community has entry to the records and peripheral apparatus (printers and modems) on all of the different desktops at the community. utilizing a number of desktops is far more uncomplicated in case you have a community.

Basics of Computer Networking

Springer short fundamentals of laptop Networking offers a non-mathematical creation to the area of networks. This e-book covers either expertise for stressed and instant networks. insurance contains transmission media, neighborhood quarter networks, broad sector networks, and community safeguard. Written in a really available variety for the layman by way of the writer of a established textbook with decades of expertise explaining techniques to the newbie.

Designing the Total Area Network: Intranets, VPNs and Enterprise Networks Explained

Tackles the various concerns surrounding the most vital resources in any corporation: its community. sleek networks must be quickly and powerful to fulfill the ever-increasing have to for additional info and quicker conversation. this article deals a transparent and concise presentation of the main matters for these concerned with the acquisition, administration, making plans and implementation of conversation networks.

Neural Network Design and the Complexity of Learning

Utilizing the instruments of complexity concept, Stephen Judd develops a proper description of associative studying in connectionist networks. He conscientiously exposes the computational problems in education neural networks and explores how definite layout ideas will or won't make the issues more straightforward. Judd seems to be past the scope of anybody specific studying rule, at a degree above the main points of neurons.

Additional resources for Build Awesome Command-Line Applications in Ruby 2: Control Your Computer, Simplify Your Life

Sample text

We’ll use it to bootstrap our app’s UI and show us immediately how to declare our user interface. 4. 5. 6. com/davetron5000/gli Download from Wow! com> report erratum • discuss Chapter 2. Be Easy to Use • 26 Building a Skeleton App with GLI’s scaffold Once we install GLI, we can use it to bootstrap our app. The gli application is itself a command suite, and we’ll use the scaffold command to get started. gli scaffold takes an arbitrary number of arguments, each representing a command for our new command suite.

What if we need more? Perhaps we’d like some longer examples for new users, or perhaps our app is sufficiently complex that we need more space to explain things. last format). There isn’t enough space in the built-in help provided by OptionParser for this information. Furthermore, these are not details that a regular user will need. Frequent users will just want the usage statement and options reference via --help and won’t need tutorials, examples, or detailed documentation when they just need to get a list of options.

With tools like OptionParser and GLI, you can spend more time on your app and rest easy knowing your user interface will be top notch and highly usable, even as you add new and more complex features. Now that we know how to easily design and parse a good command-line interface, we need to find a way to let the user know how it works. In the next chapter, we’ll talk about in-app help, specifically how OptionParser and GLI make it easy to create and format help text, as well as some slightly philosophical points about what makes good command-line help.

Download PDF sample

Rated 4.63 of 5 – based on 30 votes