<commit_before>var menubar = require('menubar')
var OAuth2 = require('../shared/OAuth2')
var BrowserWindow = require('browser-window')
var ipc = require('ipc')
var Configstore = require('configstore');
var conf = new Configstore('menu-calendar');
var path = require('path');

var secrets = require('../secrets.json');

var oauth = new OAuth2(Object.assign({}, secrets.oauth, {
  scopes: ["profile", "email", "https://www.googleapis.com/auth/calendar.readonly"]
}));

conf.clear();

/*
 * Start up the menubar app
 */

var mb = menubar({
  'always-on-top': true,
  'transparent': true,
  'dir': 'client/',
  height: 600,
  width: 400
});


/*
 * Gets the auth token, via either:
 *   An existing, unexpired token
 *   an expired token, which will then be refreshed
 *   A new token from a new oauth browser window
 */

var getToken = async function () {
  var token = conf.get('auth');
  if (token) {
    if (token.expires_at < new Date().getTime()) {
      var result = await oauth.refresh(token)<commit_msg>Remove conf clear<commit_after>var menubar = require('menubar')
var OAuth2 = require('../shared/OAuth2')
var BrowserWindow = require('browser-window')
var ipc = require('ipc')
var Configstore = require('configstore');
var conf = new Configstore('menu-calendar');
var path = require('path');

var secrets = require('../secrets.json');

var oauth = new OAuth2(Object.assign({}, secrets.oauth, {
  scopes: ["profile", "email", "https://www.googleapis.com/auth/calendar.readonly"]
}));

// conf.clear();

/*
 * Start up the menubar app
 */

var mb = menubar({
  'always-on-top': true,
  'transparent': true,
  'dir': 'client/',
  height: 600,
  width: 400
});


/*
 * Gets the auth token, via either:
 *   An existing, unexpired token
 *   an expired token, which will then be refreshed
 *   A new token from a new oauth browser window
 */

var getToken = async function () {
  var token = conf.get('auth');
  if (token) {
    if (token.expires_at < new Date().getTime()) {
      var result = await oauth.refresh(token)
{'fraction_non_alphanumeric': 0.16411270390509144, 'fraction_numerical': 0.008897676717745922, 'mean_word_length': 3.888888888888889, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5127599', 'n_tokens_mistral': 686, 'n_tokens_neox': 660, 'n_words': 195}