<commit_before>import 'package:graphql/client.dart';
import 'package:flutter_github_scripts/github_datatypes.dart';
import 'package:flutter_github_scripts/github_queries.dart';
import 'package:args/args.dart';
import 'dart:io';

class Options {
  final _parser = ArgParser(allowTrailingOptions: false);
  ArgResults _results;
  String get login => _results.rest[0];
  int get exitCode => _results == null
      ? -1
      : _results['help']
          ? 0
          : null;
  bool get tsv => _results['tsv'];
  Options(List<String> args) {
    _parser
      ..addFlag('help',
          defaultsTo: false, abbr: 'h', negatable: false, help: 'get usage');
    //..addFlag('tsv', defaultsTo: false, abbr: 't', negatable: true, help: 'show results as TSV');
    try {
      _results = _parser.parse(args);
      if (_results['help']) _printUsage();
      if (_results.rest.length != 1) throw ('invalid organization!');
    } on ArgParserException catch (e) {
      print(e.message);
      _printUsage();
    }
  }

  void _printUsage() {
    print('Usage: pub run organization login');
    print('\te.g., dart run bin/team.dart flutter=');
    print(_parser.usage);
  }
}

void main(List<String> args) async {
  final opts = Options(args);
  if (opts.exitCode != null) exit(opts.exitCode);
  final token = Platform.environment['GITHUB_TOKEN'];
  final github = GitHub(token);

  var org = await github.organization(opts.login);

  print('id:\t${org.id}');
  print('name:\t${org.name}');
  print('c:\t${org.createdAt}');
  print('aUrl:\t${org.avatarUrl}');
  print('email:\t${org.email}');
  print('login:\t${org.login}');
  print('description:\n-----');
  print('${org.description}');
  print('-----\tTeams\n-----');

  var teams = '';
  await for (var team in org.teamsStream) {
    teams = '${teams}${team.name}, ';
  }
  print(teams);<commit_msg>Fix help message.<commit_after>import 'package:graphql/client.dart';
import 'package:flutter_github_scripts/github_datatypes.dart';
import 'package:flutter_github_scripts/github_queries.dart';
import 'package:args/args.dart';
import 'dart:io';

class Options {
  final _parser = ArgParser(allowTrailingOptions: false);
  ArgResults _results;
  String get login => _results.rest[0];
  int get exitCode => _results == null
      ? -1
      : _results['help']
          ? 0
          : null;
  bool get tsv => _results['tsv'];
  Options(List<String> args) {
    _parser
      ..addFlag('help',
          defaultsTo: false, abbr: 'h', negatable: false, help: 'get usage');
    //..addFlag('tsv', defaultsTo: false, abbr: 't', negatable: true, help: 'show results as TSV');
    try {
      _results = _parser.parse(args);
      if (_results['help']) _printUsage();
      if (_results.rest.length != 1) throw ('invalid organization!');
    } on ArgParserException catch (e) {
      print(e.message);
      _printUsage();
    }
  }

  void _printUsage() {
    print('Usage: pub run organization login');
    print('\te.g., dart run bin/organization.dart flutter');
    print(_parser.usage);
  }
}

void main(List<String> args) async {
  final opts = Options(args);
  if (opts.exitCode != null) exit(opts.exitCode);
  final token = Platform.environment['GITHUB_TOKEN'];
  final github = GitHub(token);

  var org = await github.organization(opts.login);

  print('id:\t${org.id}');
  print('name:\t${org.name}');
  print('c:\t${org.createdAt}');
  print('aUrl:\t${org.avatarUrl}');
  print('email:\t${org.email}');
  print('login:\t${org.login}');
  print('description:\n-----');
  print('${org.description}');
  print('-----\tTeams\n-----');

  var teams = '';
  await for (var team in org.teamsStream) {
    teams = '${teams}${team.name}, ';
  }
  print(teams);
{'fraction_non_alphanumeric': 0.18383346850500135, 'fraction_numerical': 0.0021627466882941336, 'mean_word_length': 3.5792079207920793, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '5409066', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1249, 'n_words': 265}