New formatters: nice_duration() and join_list() (#1988)
* New formatters: nice_duration() and join_list()
Adding two new formatting functions:
* nice_duration(duration, lang="en-us", speech=True)
Accept seconds or duration and produce a nice sounding duration.
Example: nice_duration(61) == "one minute one second"
nice_duration(61, speech=False) == "1:01"
* join_list(items, connector, sep=None, lang="en-us")
Example: join_list(["a", "b", "c"], "and") == "a, b and c"
This includes a translation helper that uses text files in the
mycroft/res/text/LANG/ directory, such as "second.word".
2019-02-13 11:52:35 +00:00
|
|
|
dev.env
|
2018-12-31 13:05:09 +00:00
|
|
|
.dev_opts.json
|
2016-05-20 19:28:20 +00:00
|
|
|
.idea
|
2019-09-28 21:00:27 +00:00
|
|
|
*.code-workspace
|
2016-05-20 19:28:20 +00:00
|
|
|
*.pyc
|
|
|
|
*.swp
|
|
|
|
*~
|
|
|
|
mimic
|
2019-03-04 20:42:54 +00:00
|
|
|
/skills
|
2016-05-20 19:28:20 +00:00
|
|
|
pocketsphinx-python
|
|
|
|
*.egg-info/
|
|
|
|
build
|
|
|
|
dist
|
|
|
|
tornado.web
|
|
|
|
tornado.ioloop
|
|
|
|
mycroft/__version__.py
|
2016-08-10 19:28:37 +00:00
|
|
|
scripts/logs/*
|
2016-06-20 15:50:39 +00:00
|
|
|
logs/*
|
2017-04-22 15:35:37 +00:00
|
|
|
.coverage
|
2019-09-28 21:00:27 +00:00
|
|
|
/htmlcov
|
2020-02-03 07:59:11 +00:00
|
|
|
test/audio_accuracy/data
|
2017-06-15 22:42:56 +00:00
|
|
|
scripts/*.screen
|
2017-08-28 22:42:17 +00:00
|
|
|
doc/_build/
|
2017-09-05 20:46:24 +00:00
|
|
|
.installed
|
2018-01-31 15:42:44 +00:00
|
|
|
.mypy_cache
|
2018-04-26 19:39:53 +00:00
|
|
|
.vscode
|
2020-03-31 07:33:04 +00:00
|
|
|
.theia
|
2018-02-08 21:39:39 +00:00
|
|
|
.venv/
|
2017-12-02 00:31:46 +00:00
|
|
|
|
|
|
|
# Created by unit tests
|
|
|
|
test/unittests/skills/test_skill/settings.json
|
|
|
|
test_conf.json
|
2018-03-20 23:21:08 +00:00
|
|
|
.pytest_cache/
|