Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mostly admin updates #137

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
fitsum marked this conversation as resolved.
Show resolved Hide resolved
"es2021": true,
"node": true
},
"extends": "standard",
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
fitsum marked this conversation as resolved.
Show resolved Hide resolved
"array-bracket-spacing": [2, "always"],
"computed-property-spacing": [2, "always"],
"object-curly-spacing": [2, "always"],
"template-curly-spacing": ["error", "always"],
"space-in-parens": ["error", "always"]
fitsum marked this conversation as resolved.
Show resolved Hide resolved
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.?**.sw*
fitsum marked this conversation as resolved.
Show resolved Hide resolved
node_modules
bundle*
*.log
Expand Down
2 changes: 2 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# NOTES
- TBD
fitsum marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 21 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# TODO
- TODO MVP

## TODO MVP
- TODO APP
- TODO UI
- TODO SERVICES

## TODO APP
- FEATURE: update bin/[app] to take options per CB0, ie. set center to options.lat, options.lon
- FEATURE: add args for liveDataURL [string: url] and liveDataType [string: wss url | sse url | ...],
- eg. send old geoy data to mapscii via SEE
- RESEARCH: options for tileSource
- RESEARCH: stories: animated map + espeak TTS script
- RESEARCH: add narrative/realtime detail to footer

## TODO UI
- TBD

## TODO SERVICES
- FEATURE: use app-stack
fitsum marked this conversation as resolved.
Show resolved Hide resolved
82 changes: 41 additions & 41 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
/*#
/* #
MapSCII - Terminal Map Viewer
by Michael Strassburger <[email protected]>
Discover the planet in your console!

This scripts boots up the application.

TODO: params parsing and so on
#*/
'use strict';
const config = require('./src/config');
const Mapscii = require('./src/Mapscii');
const argv = require('yargs')
.option('latitude', {
# */
'use strict'
const config = require( './src/config' )
const Mapscii = require( './src/Mapscii' )
const argv = require( 'yargs' )
.option( 'latitude', {
alias: 'lat',
description: 'Latitude of initial centre',
default: config.initialLat,
type: 'number',
})
.option('longitude', {
type: 'number'
} )
.option( 'longitude', {
alias: 'lon',
description: 'Longitude of initial centre',
default: config.initialLon,
type: 'number',
})
.option('zoom', {
type: 'number'
} )
.option( 'zoom', {
alias: 'z',
description: 'Initial zoom',
default: config.initialZoom,
type: 'number',
})
.option('width', {
type: 'number'
} )
.option( 'width', {
alias: 'w',
description: 'Fixed width of rendering',
type: 'number',
})
.option('height', {
type: 'number'
} )
.option( 'height', {
alias: 'h',
description: 'Fixed height of rendering',
type: 'number',
})
.option('braille', {
type: 'number'
} )
.option( 'braille', {
alias: 'b',
description: 'Activate braille rendering',
default: config.useBraille,
type: 'boolean',
})
.option('headless', {
type: 'boolean'
} )
.option( 'headless', {
alias: 'H',
description: 'Activate headless mode',
default: config.headless,
type: 'boolean',
})
.option('tile_source', {
type: 'boolean'
} )
.option( 'tile_source', {
alias: 'tileSource',
description: 'URL or path to osm2vectortiles source',
default: config.source,
type: 'string',
})
.option('style_file', {
type: 'string'
} )
.option( 'style_file', {
alias: 'style',
description: 'path to json style file',
default: config.styleFile,
type: 'string',
})
type: 'string'
} )
.strict()
.argv;
.argv

const options = {
initialLat: argv.latitude,
Expand All @@ -77,11 +77,11 @@ const options = {
useBraille: argv.braille,
headless: argv.headless,
source: argv.tile_source,
styleFile: argv.style_file,
};
styleFile: argv.style_file
}

const mapscii = new Mapscii(options);
mapscii.init().catch((err) => {
console.error('Failed to start MapSCII.');
console.error(err);
});
const mapscii = new Mapscii( options )
mapscii.init().catch( ( err ) => {
console.error( 'Failed to start MapSCII.' )
console.error( err )
} )
Loading