This repository was archived by the owner on Jan 7, 2025. It is now read-only.
File tree 1 file changed +9
-3
lines changed 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,10 @@ func getSpeechlyConfig() (*Config, error) {
71
71
72
72
if err := viper .ReadInConfig (); err != nil {
73
73
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 ])))
77
78
log .Print ("Learn more: https://docs.speechly.com/dev-tools/command-line-tool" )
78
79
os .Exit (1 )
79
80
}
@@ -92,3 +93,8 @@ func getSpeechlyConfig() (*Config, error) {
92
93
}
93
94
return & conf , nil
94
95
}
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