Package

org.rogach

scallop

Permalink

package scallop

Source
package.scala
Linear Supertypes
DefaultConverters, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scallop
  2. DefaultConverters
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait CliOption extends AnyRef

    Permalink

    Parent class for option descriptors.

    Parent class for option descriptors. Each option descriptor contains everything needed to parse that option - option names, defaults, converters, validators, etc.

  2. trait DefaultConverters extends AnyRef

    Permalink

    This trait contains various predefined converters for common use-cases.

    This trait contains various predefined converters for common use-cases. org.rogach.scallop package object inherits from this trait, thus you can get all the converters simply by importing org.rogach.scallop._.

  3. case class HelpInfo(argLine: String, description: String, defaultValue: () ⇒ Option[String]) extends Product with Serializable

    Permalink

    Internal class - container for help information for a single option.

  4. class LazyMap[A, +B] extends Map[A, B] with ScallopOptionBase

    Permalink

    A class that lazily encapsulates a map inside.

  5. case class LongNamedPropertyOption(name: String, descr: String, converter: ValueConverter[_], keyName: String, valueName: String, hidden: Boolean) extends CliOption with Product with Serializable

    Permalink

    Descriptor for a property option with a "long" name (like --Props key1=value1 key2=value2).

    Descriptor for a property option with a "long" name (like --Props key1=value1 key2=value2).

    name

    Internal name for the option.

    descr

    Description for this property option, for help description.

    converter

    The converter for this option.

    keyName

    Name for 'key' part of this option arg name, as it will appear in help option definition.

    valueName

    Name for 'value' part of this option arg name, as it will appear in help option definition.

    hidden

    If set to true, then this option will be hidden from generated help output.

  6. case class NumberArgOption(name: String, required: Boolean, descr: String, converter: ValueConverter[Long], validator: (Any) ⇒ Boolean, default: () ⇒ Option[Long], hidden: Boolean) extends CliOption with Product with Serializable

    Permalink

    Descriptor for a number option (-1 or -3, like GNU tail for example).

    Descriptor for a number option (-1 or -3, like GNU tail for example).

    name

    Name for new definition, used for identification.

    required

    Is this trailing argument required?

    descr

    Description for this option, for help text.

    converter

    The converter for this option.

    validator

    The function that validates the parsed value.

    default

    If this argument is not required and not found in the argument list, use this value.

    hidden

    If set to true then this option will not be present in auto-generated help.

  7. case class PropertyOption(name: String, short: Char, descr: String, converter: ValueConverter[_], keyName: String, valueName: String, hidden: Boolean) extends CliOption with Product with Serializable

    Permalink

    Descriptor for a property option (like -Dkey=value or -D key1=value1 key2=value2).

    Descriptor for a property option (like -Dkey=value or -D key1=value1 key2=value2).

    name

    Internal name for the option.

    short

    Character that will be used as prefix for property arguments.

    descr

    Description for this property option, for help description.

    converter

    The converter for this option.

    keyName

    Name for 'key' part of this option arg name, as it will appear in help option definition.

    valueName

    Name for 'value' part of this option arg name, as it will appear in help option definition.

    hidden

    If set to true, then this option will be hidden from generated help output.

  8. case class Scallop(args: Seq[String] = Nil, opts: List[CliOption] = Nil, mainOptions: List[CliOption] = Nil, optionGroups: List[(String, Seq[CliOption])] = Nil, vers: Option[String] = None, bann: Option[String] = None, foot: Option[String] = None, descr: String = "", helpWidth: Option[Int] = None, shortSubcommandsHelp: Boolean = false, appendDefaultToDescription: Boolean = false, noshort: Boolean = false, helpFormatter: ScallopHelpFormatter = new ScallopHelpFormatter, subbuilders: List[(String, Scallop)] = Nil) extends ScallopArgListLoader with Product with Serializable

    Permalink

    Internal configuration builder.

  9. trait ScallopArgListLoader extends AnyRef

    Permalink
  10. abstract class ScallopConf extends ScallopConfBase

    Permalink

    Base class for CLI parsers.

  11. abstract class ScallopConfBase extends ScallopConfValidations

    Permalink

    Contains non-platform-specific functionality of ScallopConf.

  12. trait ScallopConfValidations extends AnyRef

    Permalink

    Helper trait for generaton of validate methods on ScallopConf.

  13. class ScallopHelpFormatter extends AnyRef

    Permalink

    Used by ScallopConf.helpFormatter to create help output.

    Used by ScallopConf.helpFormatter to create help output. Users of the library can override chosen (or all) methods to tweak help output to their requirements.

  14. abstract class ScallopOption[A] extends ScallopOptionBase

    Permalink

    A class to hold a reference to not-yet-computed option values.

    A class to hold a reference to not-yet-computed option values.

    Basically, this is a lazy option - it batches up all operations, and evaluates the value only as the last resort.

  15. trait ScallopOptionBase extends AnyRef

    Permalink
  16. class ScallopOptionGroup extends AnyRef

    Permalink

    Group of options.

    Group of options. Options added to the group will be shown before all other options in help output, in the same order as they were added in. (options without groups will be sorted alphabetically and shown after all option groups)

  17. case class SimpleOption(name: String, short: Option[Char], descr: String, required: Boolean, converter: ValueConverter[_], default: () ⇒ Option[Any], validator: (Any) ⇒ Boolean, argName: String, hidden: Boolean, noshort: Boolean) extends CliOption with Product with Serializable

    Permalink

    Descriptor for a simple option - describes flag, one-arg or multi-arg options (--opt [ARGS]...).

    Descriptor for a simple option - describes flag, one-arg or multi-arg options (--opt [ARGS]...).

    name

    Name for new option, used as long option name in parsing, and for option identification.

    short

    Overload the char that will be used as short option name.

    descr

    Description for this option, for help output.

    required

    Is this option required?

    converter

    The converter for this option.

    default

    Default value to use if option is not found in input arguments.

    validator

    The function that validates the parsed value.

    argName

    The name for this option argument, as it will appear in help.

    hidden

    Hides description of this option from help (this can be useful for debugging options).

    noshort

    If set to true, then this option does not have any short name.

  18. class Subcommand extends ScallopConf

    Permalink

    Base class for CLI subcommands.

  19. case class ToggleOption(name: String, default: () ⇒ Option[Boolean], short: Option[Char], noshort: Boolean, prefix: String, descrYes: String, descrNo: String, hidden: Boolean) extends CliOption with Product with Serializable

    Permalink

    Descriptor for a toggle option (like --verbose/--noverbose).

    Descriptor for a toggle option (like --verbose/--noverbose).

    name

    Name of this option.

    default

    Default value for this option.

    short

    Overload the char that will be used as short option name.

    noshort

    If set to true, then this option will not have any short name.

    prefix

    Prefix to name of the option, that will be used for "negative" version of the option.

    descrYes

    Description for positive variant of this option.

    descrNo

    Description for negative variant of this option.

    hidden

    If set to true, then this option will not be present in auto-generated help.

  20. case class TrailingArgsOption(name: String, required: Boolean, descr: String, converter: ValueConverter[_], validator: (Any) ⇒ Boolean, default: () ⇒ Option[Any], hidden: Boolean) extends CliOption with Product with Serializable

    Permalink

    Descriptor for a trailing arg option.

    Descriptor for a trailing arg option.

    name

    Name for new definition, used for identification.

    required

    Is this trailing argument required?

    descr

    Description for this option, for help text.

    converter

    The converter for this option.

    validator

    The function that validates the parsed value.

    default

    If this argument is not required and not found in the argument list, use this value.

    hidden

    If set to true then this option will not be present in auto-generated help.

  21. trait ValueConverter[A] extends AnyRef

    Permalink

    Converter from list of plain strings to something meaningful.

Value Members

  1. object ArgType

    Permalink

    An enumeration of possible arg types by number of arguments they can take.

  2. object Compat

    Permalink

    Contains helper functions to handle differences between different platforms (JVM, Native, JS).

  3. object Formatter

    Permalink
  4. object TrailingArgumentsParser

    Permalink

    Parses the trailing arguments (including the arguments to last option).

    Parses the trailing arguments (including the arguments to last option). Uses simple backtraking algorithm.

  5. object Util

    Permalink
  6. implicit val bigDecimalConverter: ValueConverter[BigDecimal]

    Permalink
    Definition Classes
    DefaultConverters
  7. implicit val bigIntConverter: ValueConverter[BigInt]

    Permalink
    Definition Classes
    DefaultConverters
  8. implicit val byteConverter: ValueConverter[Byte]

    Permalink
    Definition Classes
    DefaultConverters
  9. implicit val byteListConverter: ValueConverter[List[Byte]]

    Permalink
    Definition Classes
    DefaultConverters
  10. implicit val bytePropsConverter: ValueConverter[Map[String, Byte]]

    Permalink
    Definition Classes
    DefaultConverters
  11. implicit val charConverter: ValueConverter[Char]

    Permalink
    Definition Classes
    DefaultConverters
  12. implicit val charPropsConverter: ValueConverter[Map[String, Char]]

    Permalink
    Definition Classes
    DefaultConverters
  13. implicit val doubleConverter: ValueConverter[Double]

    Permalink
    Definition Classes
    DefaultConverters
  14. implicit val doubleListConverter: ValueConverter[List[Double]]

    Permalink
    Definition Classes
    DefaultConverters
  15. implicit val doublePropsConverter: ValueConverter[Map[String, Double]]

    Permalink
    Definition Classes
    DefaultConverters
  16. implicit val durationConverter: ValueConverter[Duration]

    Permalink
    Definition Classes
    DefaultConverters
  17. package exceptions

    Permalink
  18. implicit val fileConverter: ValueConverter[File]

    Permalink
  19. implicit val fileListConverter: ValueConverter[List[File]]

    Permalink
  20. implicit val finiteDurationConverter: ValueConverter[FiniteDuration]

    Permalink
    Definition Classes
    DefaultConverters
  21. implicit val flagConverter: ValueConverter[Boolean]

    Permalink
    Definition Classes
    DefaultConverters
  22. implicit val floatConverter: ValueConverter[Float]

    Permalink
    Definition Classes
    DefaultConverters
  23. implicit val floatListConverter: ValueConverter[List[Float]]

    Permalink
    Definition Classes
    DefaultConverters
  24. implicit val floatPropsConverter: ValueConverter[Map[String, Float]]

    Permalink
    Definition Classes
    DefaultConverters
  25. implicit val intConverter: ValueConverter[Int]

    Permalink
    Definition Classes
    DefaultConverters
  26. implicit val intListConverter: ValueConverter[List[Int]]

    Permalink
    Definition Classes
    DefaultConverters
  27. implicit val intPropsConverter: ValueConverter[Map[String, Int]]

    Permalink
    Definition Classes
    DefaultConverters
  28. def listArgConverter[A](conv: (String) ⇒ A): ValueConverter[List[A]]

    Permalink

    Creates a converter for an option which accepts multiple arguments.

    Creates a converter for an option which accepts multiple arguments.

    conv

    The conversion function to use on each argument. May throw an exception on error.

    returns

    A ValueConverter instance.

    Definition Classes
    DefaultConverters
  29. implicit val longConverter: ValueConverter[Long]

    Permalink
    Definition Classes
    DefaultConverters
  30. implicit val longListConverter: ValueConverter[List[Long]]

    Permalink
    Definition Classes
    DefaultConverters
  31. implicit val longPropsConverter: ValueConverter[Map[String, Long]]

    Permalink
    Definition Classes
    DefaultConverters
  32. def numberHandler[T](name: String): PartialFunction[Throwable, Either[String, Option[T]]]

    Permalink

    Handler function for numeric types which expects a NumberFormatException and prints a more helpful error message.

    Handler function for numeric types which expects a NumberFormatException and prints a more helpful error message.

    name

    the type name to display

    Definition Classes
    DefaultConverters
  33. def optDefault[A](default: A)(implicit conv: ValueConverter[A]): ValueConverter[A]

    Permalink

    Creates a converter for an option with single optional argument (it will parse both --opt and --opt arg command lines).

    Creates a converter for an option with single optional argument (it will parse both --opt and --opt arg command lines).

    default

    The default value to use if argument wasn't provided.

    conv

    Converter instance to use if argument was provided.

    returns

    A ValueConverter instance.

    Definition Classes
    DefaultConverters
  34. object overrideColorOutput extends DynamicVariable[Option[Boolean]]

    Permalink
  35. def propsConverter[A](conv: ValueConverter[A]): ValueConverter[Map[String, A]]

    Permalink

    Creates a converter for a property option.

    Creates a converter for a property option.

    conv

    The converter function to use on each value. May throw an exception on error.

    returns

    A ValueConverter instance.

    Definition Classes
    DefaultConverters
  36. implicit val shortConverter: ValueConverter[Short]

    Permalink
    Definition Classes
    DefaultConverters
  37. implicit val shortListConverter: ValueConverter[List[Short]]

    Permalink
    Definition Classes
    DefaultConverters
  38. implicit val shortPropsConverter: ValueConverter[Map[String, Short]]

    Permalink
    Definition Classes
    DefaultConverters
  39. def singleArgConverter[A](conv: (String) ⇒ A, handler: PartialFunction[Throwable, Either[String, Option[A]]] = PartialFunction.empty): ValueConverter[A]

    Permalink

    Creates a converter for an option with a single argument.

    Creates a converter for an option with a single argument.

    conv

    The conversion function to use. May throw an exception on error.

    handler

    An error handler function for writing custom error messages.

    returns

    A ValueConverter instance.

    Definition Classes
    DefaultConverters
  40. implicit val stringConverter: ValueConverter[String]

    Permalink
    Definition Classes
    DefaultConverters
  41. implicit val stringListConverter: ValueConverter[List[String]]

    Permalink
    Definition Classes
    DefaultConverters
  42. implicit val stringPropsConverter: ValueConverter[Map[String, String]]

    Permalink
    Definition Classes
    DefaultConverters
  43. val tallyConverter: ValueConverter[Int] { val argType: org.rogach.scallop.ArgType.FLAG.type }

    Permalink

    Converter for a tally option, used in ScallopConf.tally

    Converter for a tally option, used in ScallopConf.tally

    Definition Classes
    DefaultConverters
  44. object throwError extends DynamicVariable[Boolean]

    Permalink
  45. package tokenize

    Permalink

Inherited from DefaultConverters

Inherited from AnyRef

Inherited from Any

Ungrouped