diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 6737775..8ae2d86 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -20,7 +20,7 @@ builds: # Note: We only use goreleaser for the CLI, # so we have to go into the "cli" directory. - dir: cli + dir: cli/html2markdown binary: html2markdown archives: diff --git a/README.md b/README.md index 22df180..227f713 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ Binaries are automatically built via [GoReleaser](https://goreleaser.com/) and a To build locally (requires Go): ```bash -go build -o html2markdown ./cli +go build ./cli/html2markdown ``` ### Version diff --git a/cli/cmd/cli_run.go b/cli/html2markdown/cmd/cli_run.go similarity index 100% rename from cli/cmd/cli_run.go rename to cli/html2markdown/cmd/cli_run.go diff --git a/cli/cmd/cmd_convert.go b/cli/html2markdown/cmd/cmd_convert.go similarity index 100% rename from cli/cmd/cmd_convert.go rename to cli/html2markdown/cmd/cmd_convert.go diff --git a/cli/cmd/cmd_help.go b/cli/html2markdown/cmd/cmd_help.go similarity index 100% rename from cli/cmd/cmd_help.go rename to cli/html2markdown/cmd/cmd_help.go diff --git a/cli/cmd/cmd_version.go b/cli/html2markdown/cmd/cmd_version.go similarity index 100% rename from cli/cmd/cmd_version.go rename to cli/html2markdown/cmd/cmd_version.go diff --git a/cli/cmd/errors.go b/cli/html2markdown/cmd/errors.go similarity index 100% rename from cli/cmd/errors.go rename to cli/html2markdown/cmd/errors.go diff --git a/cli/cmd/exec.go b/cli/html2markdown/cmd/exec.go similarity index 100% rename from cli/cmd/exec.go rename to cli/html2markdown/cmd/exec.go diff --git a/cli/cmd/exec_test.go b/cli/html2markdown/cmd/exec_test.go similarity index 100% rename from cli/cmd/exec_test.go rename to cli/html2markdown/cmd/exec_test.go diff --git a/cli/cmd/flags.go b/cli/html2markdown/cmd/flags.go similarity index 100% rename from cli/cmd/flags.go rename to cli/html2markdown/cmd/flags.go diff --git a/cli/cmd/flags_categorize.go b/cli/html2markdown/cmd/flags_categorize.go similarity index 100% rename from cli/cmd/flags_categorize.go rename to cli/html2markdown/cmd/flags_categorize.go diff --git a/cli/cmd/print.go b/cli/html2markdown/cmd/print.go similarity index 100% rename from cli/cmd/print.go rename to cli/html2markdown/cmd/print.go diff --git a/cli/cmd/testdata/.gitattributes b/cli/html2markdown/cmd/testdata/.gitattributes similarity index 100% rename from cli/cmd/testdata/.gitattributes rename to cli/html2markdown/cmd/testdata/.gitattributes diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_html/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_html/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_html/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_html/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_html/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_html/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_html/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_html/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_list_of_files/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_long_string/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_long_string/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_long_string/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_long_string/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_long_string/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_long_string/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_long_string/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_long_string/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_version/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_version/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_version/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_version/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[argument_unknown]_version/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_version/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[argument_unknown]_version/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[argument_unknown]_version/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_collapse/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_collapse/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_collapse/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_collapse/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_collapse/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_collapse/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_collapse/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_collapse/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_strong_default/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_default/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_strong_default/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_default/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_strong_default/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_default/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_strong_default/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_default/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_equal_underscore/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[convert]_strong_space_underscore/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[exclude-selector]_exclude_multiple/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[flag_misspelled]_underscore/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_pipe/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[flag_unknown]_with_terminal/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_help_pipe/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_help_pipe/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_help_pipe/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_help_pipe/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_help_pipe/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_help_pipe/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_help_pipe/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_help_pipe/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_help_terminal/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_help_terminal/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_help_terminal/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_help_terminal/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_help_terminal/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_help_terminal/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_help_terminal/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_help_terminal/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_no_content/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_no_content/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_no_content/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_no_content/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_no_content/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_no_content/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_no_content/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_no_content/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_version_pipe/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_version_pipe/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_version_pipe/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_version_pipe/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_version_pipe/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_version_pipe/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_version_pipe/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_version_pipe/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_version_terminal/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_version_terminal/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_version_terminal/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_version_terminal/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[general]_version_terminal/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[general]_version_terminal/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[general]_version_terminal/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[general]_version_terminal/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_empty_string/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_empty_string/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_empty_string/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_empty_string/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_empty_string/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_empty_string/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_empty_string/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_empty_string/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_invalid/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_invalid/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_invalid/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_invalid/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_invalid/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_invalid/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_invalid/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_invalid/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_multiple_matches/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_one_match/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_one_match/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_one_match/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_one_match/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[include-selector]_one_match/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_one_match/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[include-selector]_one_match/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[include-selector]_one_match/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[validation]_discouraged_value/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[validation]_discouraged_value/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[validation]_discouraged_value/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[validation]_discouraged_value/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[validation]_discouraged_value/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[validation]_discouraged_value/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[validation]_discouraged_value/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[validation]_discouraged_value/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[validation]_invalid_value/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[validation]_invalid_value/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[validation]_invalid_value/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[validation]_invalid_value/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[validation]_invalid_value/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[validation]_invalid_value/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[validation]_invalid_value/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[validation]_invalid_value/stdout.golden diff --git a/cli/cmd/testdata/TestExecute/[validation]_no_value/stderr.golden b/cli/html2markdown/cmd/testdata/TestExecute/[validation]_no_value/stderr.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[validation]_no_value/stderr.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[validation]_no_value/stderr.golden diff --git a/cli/cmd/testdata/TestExecute/[validation]_no_value/stdout.golden b/cli/html2markdown/cmd/testdata/TestExecute/[validation]_no_value/stdout.golden similarity index 100% rename from cli/cmd/testdata/TestExecute/[validation]_no_value/stdout.golden rename to cli/html2markdown/cmd/testdata/TestExecute/[validation]_no_value/stdout.golden diff --git a/cli/cmd/util_pipe.go b/cli/html2markdown/cmd/util_pipe.go similarity index 100% rename from cli/cmd/util_pipe.go rename to cli/html2markdown/cmd/util_pipe.go diff --git a/cli/main.go b/cli/html2markdown/main.go similarity index 80% rename from cli/main.go rename to cli/html2markdown/main.go index cc9dc8e..5589283 100644 --- a/cli/main.go +++ b/cli/html2markdown/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/JohannesKaufmann/html-to-markdown/v2/cli/cmd" + "github.com/JohannesKaufmann/html-to-markdown/v2/cli/html2markdown/cmd" ) var (