ephigenia / mite-cli Goto Github PK
View Code? Open in Web Editor NEWcommand line interface for time tracking service mite.yo.lk
License: MIT License
command line interface for time tracking service mite.yo.lk
License: MIT License
tbd
I'm trying to install autocomplete, with the command mite autocomplete install
.
I should be able to choose the right shell type and go on with the installation.
The choice is shown, but I cannot choose the shell type, because the installation script stops before I can do anything.
Dannys-MacBook-Pro:~ danny$ mite autocomplete install
? Which Shell do you use ? (Use arrow keys)
❯ bash
zsh
fish Usage: mite-autocomplete [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
install Installs auto-completion for most of the mite subcommands,
options and arguments. Compatible with bash, fish and zsh. No
support for windows systems. Also note that it will only work
when mite is installed globally.
uninstall removes the auto-completion for mite
Dannys-MacBook-Pro:~ danny$
Just run mite autocomplete install
, from bash or szh is the same.
Some of the colors shown in the table and reports are using the chalk npm package which has more dependencies than ansi-colors and should get replaced to safe some bits of space.
Trying to update the "table" package to latest 6.7.0 version.
When the package is updated, there are errors thrown when running mite list
:
{
message: 'must NOT have additional properties',
params: { additionalProperty: 'attribute' },
schemaPath: '#/additionalProperties'
},
{
message: 'must NOT have additional properties',
params: { additionalProperty: 'format' },
schemaPath: '#/additionalProperties'
},
{
message: 'must match exactly one schema in oneOf',
params: { passingSchemas: null },
schemaPath: '#/oneOf'
}
]
/Users/ephigenia/Development/mite-cli/node_modules/table/dist/validateConfig.js:22
throw new Error('Invalid config.');
^
Error: Invalid config.
at Object.validateConfig (/Users/ephigenia/Development/mite-cli/node_modules/table/dist/validateConfig.js:22:15)
at Object.makeTableConfig (/Users/ephigenia/Development/mite-cli/node_modules/table/dist/makeTableConfig.js:50:22)
at table (/Users/ephigenia/Development/mite-cli/node_modules/table/dist/table.js:17:38)
at Object.formatData (/Users/ephigenia/Development/mite-cli/source/lib/data-output.js:147:14)
at getReport (/Users/ephigenia/Development/mite-cli/source/mite-list.js:234:21)
at /Users/ephigenia/Development/mite-cli/source/mite-list.js:262:20
at handleResponse (/Users/ephigenia/Development/mite-cli/node_modules/mite-api/lib/mite-api.js:77:14)
at Request._callback (/Users/ephigenia/Development/mite-cli/node_modules/mite-api/lib/mite-api.js:95:16)
at Request.self.callback (/Users/ephigenia/Development/mite-cli/node_modules/request/request.js:185:22)
at Request.emit (events.js:315:20)
Piping the newly created entry id from f.e. "mite new" to "mite amend" and accepting the id via stdin doesn’t work and results in the following error:
mite new "testnote" Ephigenia Programmierung 1+ | mite amend --editor
EAGAIN: resource temporarily unavailable, read
My account is my email address with, of course, the top level domain. When I try to do something with mite-cli I get Hostname/IP does not match certificate's altnames: Host: ****.de.mite.yo.lk. is not in the cert's altnames: DNS:*.mite.yo.lk
I should set my account with mite config set account
and use mite-cli also with an email address as account name.
I get Hostname/IP does not match certificate's altnames: Host: ****.de.mite.yo.lk. is not in the cert's altnames: DNS:*.mite.yo.lk
Set an email address as username and try to use one command of mite-cli.
I saw in mite-tracker.js
on line 11 that the BASE_URL
is set with the account saved in config.
The problem, in my case, is that the top domain level .de
is wrong, the domain mite should use is the same like my account but without .de
.
Maybe is possible to find the top domain level and remove it from the account configuration?
Maybe removing the top domain level from the account with regex and then setting it as BASE_URL
?
Or, another solution could be to add a configuration information with the right domain to use.
The Idea was to try to fix the bug described in the issue #90 .
I uninstalled the mite-cli and cloned the repository. When I run npm start
I get the same error described in the issue #90 , but I can't change the configuration because mite-cli is actually uninstalled.
npm start
I still have the configuration of my old uninstalled mite-cli
npm install -g mite-cli
npm uninstall -g mite-cli
npm start
At this point, you still use the configuration set up at point 2
This issue provides visibility into Renovate updates and their statuses. Learn more
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
When using mite config set [key] [value]
mite-cli stores the given values in a config.json file lovated inside node_modules/mite-cli. This has two issues:
The file config.json is world-readable by any user/process on my system and contains sensitive informations. The permissions should be 640 or even better just 600.
The file is located outside of my users home folder. Other users using the same machine will see/overwrite my mite-cli file. Maybe it would be better to use a file in ~/.mite-cli.json instead?
When the env-variable MITE_CLI_DEMO
is not empty there should be all money values obfuscated or randomized so that it’s easy to create screenshots or screencasts as demos.
There should be a command to see if there’s a currently active tracker. It‘s not clear yet what this command should return.
npm start
, npm stop
, npm amend
mite list
with the ability to set output format, columns etc. (can also be combined with other commands)mite show <entry-id>
…The idea in combination with #77 #78 would be to make it easier to use the CLI tool for simpler time-tracking.
For people using tmux it would be super-nice to have a tmux plugin which displays the currently tracked time (if there’s one) in the status bar. #79 could help here.
Suggestions for status bar interpolation strings
mite_id
displays current tracked entry idmite_duration
displays current tracked entry duration in human readable formatmite_status
displays current tracking status, f.e. play ("▶") symbol for "entry running" and "■" for stopped or not running entrymite_today_duration
displays the today's total durationmite_today_revenue
displays the today’s revenue totalmite_month_duration
displays the monthly duration totalmite_month_revenue
displays the month revenue totalUseful resources:
I use this CLI a lot but I see 7 PRs and no new commit from the maintainer since 2022. @Ephigenia do you plan to keep this project active?
The auto-completion for projects and services is kind of slow and obstructive when a new entry should be created pretty fast. There should be a cache with a configurable ttl of 180 minutes.
There should be an additional command to refresh those lists in case a service or project was added. There also could be an automatically refresh or purge when npm project create
or similar was used.
Right now it’s easy to edit or restart the last created entries note using xargs:
mite list today --limit 1 --tracking true --columns id --format text | xargs -n1 mite amend --editor
mite list today --limit 1 --tracking true --columns id --format text | xargs -n1 mite start
But it would be even easier if npm start
and npm amend
accept a -l
/ --last
option which then uses the last created entry.
master
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
The npm token configured in the NPM_TOKEN
environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/
.
If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.
Please make sure to set the NPM_TOKEN
environment variable in your CI with the exact value of the npm token.
Good luck with your project ✨
Your semantic-release bot 📦🚀
tbd
Mite amend without any specific entry id should also search for the last created entry. It already tries to get the currently actively tracked entry by the current user but exits when this entry is not running.
mite-cli amend --editor
There are some URLs printed in various commands. They could use the ansi-escape sequence as mentioned here:
printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
(from https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)
to be clickable in some terminal emulators.
Doesn’t work in some emulators. tmux-users will need to keep alt or shift pressed to open urls.
tbds
Support for YYYY-MM-DD, PROJECT, SERVICE etc.
To be defined.
Add caching for making auto-completion faster. Cached data could be stored in "~/.mite-cache" …
mite list
always returns all time entries of all users in a multiuser mite account. You should send the parameter user_id
set to current
with every request to time_entries.json to only return the time entries of the current user. Maybe there could be some way to overwrite this if needed?
The mite api also support authentication using user and password: https://mite.yo.lk/api/index.html#authentication
This could be supported by two new config parameters: "username" and "password". Maybe this makes it easier for some to setup the CLI tool. (see #90)
mite config set username <[email protected]>;
mite config set password <password>;
mite list
In case username & password are setup the cli uses these values instead of the apiKey.
Please upvote if you like to have this feature implemented.
The "output" option doesn’t follow standards described in https://clig.dev/#output
Current Options and their possible successor(s)
mite list --json | jq '.[] | @csv'
mite list --json
mite list --json | jq '.[] | @csv' | npx csv2md
(using csv2md to convert the csv input to markdown)mite list --pretty
mite list --plain
outputs tabular data, seperated with 3 spacesmite list --plain | column -t
mite list --json | jq '.[] | @csv'
tbd
Add "debug" package, scope and add more debugging messages.
The mite-list command supports showing entries from shot names of periods like "1m" (1month), "1d" (1day) but not years. Especially for grouped reports the notation for years using "y" should be added.
The summary row at the end of the output is not always needed. So there should be a command-line option to enable/disable it like: mite list --summary
In addition to #77 there should be a shortcut for starting the last entry with mite resume
debian 12/bookworm mite
mite 1.11.0
Node.js v18.19.0
Unable to create new task/tracker with the interactive dialog.
When no arguments or just the "note" is given mite new asks for more details of the time-entry that should be created. Project, service and duration can be entered in an interactive survey.
mite new
/usr/local/lib/node_modules/mite-cli/source/mite-new.js:5
const inquirer = require('inquirer');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /usr/local/lib/node_modules/mite-cli/node_modules/inquirer/lib/inquirer.js from /usr/local/lib/node_modules/mite-cli/source/mite-new.js not supported.
Instead change the require of inquirer.js in /usr/local/lib/node_modules/mite-cli/source/mite-new.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/usr/local/lib/node_modules/mite-cli/source/mite-new.js:5:18) {
code: 'ERR_REQUIRE_ESM'
}
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)
Node.js v10 has been going out of LTS.
See stats: https://nodejs.org/metrics/summaries/version.png
there should be a breaking release using node 14 LTS
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.