-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add a boilerplate cmd for HTML generation
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/Slug-Boi/aion-cli/html" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// generateCmd represents the generate command | ||
var generateCmd = &cobra.Command{ | ||
Use: "generate <FilePath>", | ||
Short: "Generates an HTML file that is populated with CSV data", | ||
Long: `This command reads from a given CSV file, and then generates an HTML file populated with the CSV data. | ||
The FilePath refers to the designated path. An example would be: 'C://Program/MyCSVFile.csv'`, | ||
Args: cobra.MinimumNArgs(1), | ||
Run: func(cmd *cobra.Command, args []string) { | ||
// TODO: Retrieve args after Strawpoll feat | ||
//specs := Reader.CsvToString(args[0]) | ||
html.GenerateHTML() | ||
}, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(generateCmd) | ||
} |