Modify flag descriptions
All checks were successful
Build and push Probo image on the registry / login (push) Successful in 3m1s

This commit is contained in:
Andrea Fazzi 2025-05-26 09:04:31 +02:00
commit f9b7109bcc
2 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,6 @@ import (
"git.andreafazzi.eu/andrea/probo/pkg/store/file/quiz"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
// importCmd represents the import command
@ -19,8 +18,9 @@ var importCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(importCmd)
importCmd.Flags().StringP("type", "t", "quizzes", "Import a file containing entities (participants or quizzes)")
importCmd.Flags().StringP("delim", "d", "<hr/>", "Set the quizzes separator.")
importCmd.Flags().StringP("type", "t", "quizzes", "Specify whether to import participants or quizzes.")
importCmd.Flags().StringP("delim", "d", "<hr/>", "Define the separator for quizzes in Markdown format.")
importCmd.Flags().StringP("output", "o", ".", "Set the destination folder where imported entities will be stored.")
}
func importEntity(cmd *cobra.Command, args []string) {
@ -35,9 +35,9 @@ func importEntity(cmd *cobra.Command, args []string) {
switch t {
case "participants":
pStore, err := participant.NewWithPath(viper.Get("participants_path").(string))
pStore, err := participant.New(participant.DefaultConfig())
if err != nil {
panic(err)
log.Fatal(err)
}
participants, err := pStore.ImportFromCSV(args[0])

View file

@ -39,9 +39,9 @@ func init() {
sessionCmd.Flags().StringP("start", "s", "", "When the session starts.")
sessionCmd.Flags().StringP("end", "e", "", "When the session ends.")
sessionCmd.Flags().StringP("program", "p", "programs/shuffled.js", "Specify the program file to use for creating the session.")
sessionCmd.Flags().IntP("duration", "d", int(60*time.Minute), "Sets the duration of the session in minutes.")
sessionCmd.Flags().BoolP("always-active", "", true, "Determines if the session is always active.")
sessionCmd.Flags().BoolP("update", "u", false, "Update an existing session.")
sessionCmd.Flags().IntP("duration", "d", int(60*time.Minute), "Sets the duration of the session in minutes.")
}
func createSession(cmd *cobra.Command, args []string) {