2017-12-08 10:28:04 +00:00
|
|
|
const chalk = require('chalk')
|
2018-06-07 22:20:29 +00:00
|
|
|
const boxen = require('boxen')
|
2017-12-08 10:28:04 +00:00
|
|
|
|
|
|
|
const DOCS_URL = chalk.green('https://thumbsup.github.io/docs')
|
|
|
|
const ISSUES_URL = chalk.green('https://github.com/thumbsup/thumbsup/issues')
|
2017-12-07 13:04:16 +00:00
|
|
|
|
2018-06-07 22:20:29 +00:00
|
|
|
function box (str) {
|
|
|
|
const lines = str.split('\n').map(s => ` ${s} `).join('\n')
|
|
|
|
return boxen(lines)
|
|
|
|
}
|
|
|
|
|
2017-12-07 13:04:16 +00:00
|
|
|
exports.USAGE = () => `
|
|
|
|
Usages:
|
|
|
|
thumbsup [required] [options]
|
2018-05-14 20:09:40 +00:00
|
|
|
thumbsup --config config.json
|
2017-12-07 13:04:16 +00:00
|
|
|
`
|
|
|
|
|
|
|
|
exports.CONFIG_USAGE = () => `
|
|
|
|
The optional JSON config should contain a single object with one key
|
|
|
|
per argument, not including the leading "--". For example:
|
|
|
|
{ "sort-albums-by": "start-date" }
|
|
|
|
`
|
|
|
|
|
2018-06-07 22:49:03 +00:00
|
|
|
exports.BINARIES_REQUIRED = (list) => `
|
|
|
|
Error: the following programs are required to run thumbsup.
|
|
|
|
Please make sure they are installed and available in the system path.\n
|
|
|
|
${list.join('\n')}
|
|
|
|
`
|
|
|
|
|
2018-06-07 22:20:29 +00:00
|
|
|
exports.SUCCESS = (stats) => box(`
|
|
|
|
Gallery generated successfully!
|
2017-12-07 13:04:16 +00:00
|
|
|
${stats.albums} albums, ${stats.photos} photos, ${stats.videos} videos
|
2018-06-07 22:20:29 +00:00
|
|
|
`)
|
2017-12-07 13:04:16 +00:00
|
|
|
|
2018-06-08 22:20:29 +00:00
|
|
|
exports.PROBLEMS = (count) => chalk.yellow(`
|
|
|
|
Warning: there was an issue with ${count} file${count > 1 ? 's' : ''}.
|
|
|
|
Please check the full log for more detail.
|
|
|
|
`)
|
|
|
|
|
2018-06-07 22:20:29 +00:00
|
|
|
exports.GREETING = () => box(`
|
|
|
|
Thanks for using thumbsup!
|
|
|
|
Don't forget to check out the docs at ${DOCS_URL}.
|
|
|
|
Enjoy!
|
|
|
|
`)
|
|
|
|
|
2020-12-30 12:29:09 +00:00
|
|
|
exports.SORRY = (logFile) => box(`
|
2018-06-07 22:20:29 +00:00
|
|
|
Something went wrong!
|
|
|
|
|
|
|
|
An unexpected error occurred and the gallery didn't build successfully.
|
|
|
|
This is most likely an edge-case that hasn't been tested before.
|
|
|
|
|
2020-12-30 12:29:09 +00:00
|
|
|
Please check the logs at ${chalk.green(logFile)}.
|
2018-06-07 22:20:29 +00:00
|
|
|
To help improve thumbsup and hopefully resolve your problem,
|
2018-07-04 21:41:57 +00:00
|
|
|
you can raise an issue at ${ISSUES_URL}.
|
2018-06-07 22:20:29 +00:00
|
|
|
`)
|