This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('cross-fetch/polyfill'); | |
const ENDOMONDO = require('endomondo-api-handler'); | |
const FITBIT = require('fitbit-api-handler'); | |
const { | |
FITBIT_CLIENT_ID, | |
FITBIT_SECRET, | |
FITBIT_TOKEN, | |
ENDOMONDO_LOGIN, | |
ENDOMONDO_PASSWORD, | |
ENDOMONDO_WORKOUT_ID, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const createGpx = require('gps-to-gpx').default; | |
const program = require('commander'); | |
program | |
.version('0.1.0') | |
.command('parse <inputFile>') | |
.option('--from <from>', 'From which date parse data YYYY-MM-DDTHH:ii.') | |
.option('--to <to>', 'To which date parse data YYYY-MM-DDTHH:ii.') | |
.option('--accuracy <accuracy>', 'Minimal accuracy.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import facebookLocales from './locales'; | |
import { | |
LocaleResolver, | |
NavigatorDetector, | |
FallbacksTransformer, | |
DefaultLocaleTransformer, | |
AllowOnlyTransformer, | |
} from 'locales-detector'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import locales from './locales'; | |
function loadFB(locale) { | |
return new Promise((resolve) => { | |
(function(d, s, id){ | |
let js; | |
const fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) {return;} | |
js = d.createElement(s); js.id = id; | |
js.src = `https://connect.facebook.net/${locale}/sdk.js`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"so_SO":"Af-Soomaali", | |
"af_ZA":"Afrikaans", | |
"az_AZ":"Azərbaycan dili", | |
"id_ID":"Bahasa Indonesia", | |
"ms_MY":"Bahasa Melayu", | |
"jv_ID":"Basa Jawa", | |
"cx_PH":"Bisaya", | |
"bs_BA":"Bosanski", | |
"br_FR":"Brezhoneg", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from 'moment'; | |
import { | |
LocaleResolver, | |
NavigatorDetector, | |
FallbacksTransformer, | |
DefaultLocaleTransformer, | |
} from 'locales-detector'; | |
// moment locales are in lowercase, need it change en-GB to en-gb | |
class LowerCaseTransformer { |