<commit_before>optimist = require 'optimist'
open = require 'open'

View = require './view'
config = require './config'

module.exports =
class Docs extends View
  @commandNames: ['docs', 'home', 'open']

  parseOptions: (argv) ->
    options = optimist(argv)
    options.usage """

      Usage: apm docs [options] <package_name>

      Opens a package's homepage in the default browser.
    """
    options.alias('h', 'help').describe('help', 'Print this usage message')
    options.boolean('p').alias('p', 'print').describe('print', 'Print the URL instead of opening it')

  openRepositoryUrl: (repositoryUrl) ->
    open(repositoryUrl)

  run: (options) ->
    {callback} = options
    options = @parseOptions(options.commandArgs)
    [packageName] = options.argv._

    unless packageName
      callback("Missing required package name")
      return<commit_msg>Keep tense of other command descriptions<commit_after>optimist = require 'optimist'
open = require 'open'

View = require './view'
config = require './config'

module.exports =
class Docs extends View
  @commandNames: ['docs', 'home', 'open']

  parseOptions: (argv) ->
    options = optimist(argv)
    options.usage """

      Usage: apm docs [options] <package_name>

      Open a package's homepage in the default browser.
    """
    options.alias('h', 'help').describe('help', 'Print this usage message')
    options.boolean('p').alias('p', 'print').describe('print', 'Print the URL instead of opening it')

  openRepositoryUrl: (repositoryUrl) ->
    open(repositoryUrl)

  run: (options) ->
    {callback} = options
    options = @parseOptions(options.commandArgs)
    [packageName] = options.argv._

    unless packageName
      callback("Missing required package name")
      return
{'fraction_non_alphanumeric': 0.1378132118451025, 'fraction_numerical': 0.0, 'mean_word_length': 3.7231182795698925, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4391215', 'n_tokens_mistral': 515, 'n_tokens_neox': 490, 'n_words': 148}