X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=cmd%2Fwarc-extract%2Fmain.go;h=d207273e2ee95f8d349ae3ae16607ce2bcf09c07;hb=HEAD;hp=7389e069d29d0027d513a62cd955ab5635cec790;hpb=29146b48a23355805345a7b7a656809cf624bb85;p=tofuproxy.git diff --git a/cmd/warc-extract/main.go b/cmd/warc-extract/main.go index 7389e06..c9d2a36 100644 --- a/cmd/warc-extract/main.go +++ b/cmd/warc-extract/main.go @@ -1,19 +1,17 @@ -/* -warc-extract -- WARC files data extractor -Copyright (C) 2021-2023 Sergey Matveev - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 3 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +// warc-extract -- WARC files data extractor +// Copyright (C) 2021-2024 Sergey Matveev +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . package main @@ -36,8 +34,10 @@ func main() { hdr := flag.Bool("hdr", false, "Also extract WARC's header") idx := flag.Bool("idx", false, "Save WARC indices") recompress := flag.Bool("for-enzstd", false, "Output for enzstd utility") + unzstdPath := flag.String("unzstd", "cmd/zstd/unzstd", "Path to unzstd utility") flag.Parse() log.SetFlags(log.Lshortfile) + warc.UnZSTDPath = *unzstdPath if *recompress { var hdr bytes.Buffer @@ -117,5 +117,4 @@ func main() { io.Copy(os.Stdout, r) } } - return }