This repository was archived by the owner on Jan 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,9 +71,10 @@ func getSpeechlyConfig() (*Config, error) {
7171
7272 if err := viper .ReadInConfig (); err != nil {
7373 if len (os .Args ) < 2 || (os .Args [1 ] != "config" && os .Args [1 ] != "projects" ) {
74- log .Print ("Please add a project first:\n \n " )
75- log .Print (" 1. Create a new API token in Speechly Dashboard (https://api.speechly.com/dashboard)\n " )
76- log .Printf (" 2. Copy the token and run: %s projects add --apikey <api_token>\n \n " , os .Args [0 ])
74+ log .Print ("Please add a project:\n \n " )
75+ log .Print (" 1. Log in to Speechly Dashboard (https://api.speechly.com/dashboard)\n " )
76+ log .Printf (" 2. Go to %s and create a new token\n " , infoString ("Project Settings → API tokens" ))
77+ log .Printf (" 2. Copy the token and run: %s\n \n " , infoString (fmt .Sprintf ("%s projects add <api_token>" , os .Args [0 ])))
7778 log .Print ("Learn more: https://docs.speechly.com/dev-tools/command-line-tool" )
7879 os .Exit (1 )
7980 }
@@ -92,3 +93,8 @@ func getSpeechlyConfig() (*Config, error) {
9293 }
9394 return & conf , nil
9495}
96+
97+ func infoString (str string ) string {
98+ color := "\033 [1;36m%s\033 [0m"
99+ return fmt .Sprintf (color , str )
100+ }
You can’t perform that action at this time.
0 commit comments