Package Details: html2markdown 2.3.3-1

Git Clone URL: https://aur.archlinux.org/html2markdown.git (read-only, click to copy)
Package Base: html2markdown
Description: Convert HTML to Markdown. Even works with entire websites and can be extended through rules.
Upstream URL: https://html-to-markdown.com
Licenses: MIT
Submitter: vitaliikuzhdin
Maintainer: vitaliikuzhdin
Last Packager: vitaliikuzhdin
Votes: 0
Popularity: 0.000000
First Submitted: 2025-04-21 15:31 (UTC)
Last Updated: 2025-07-11 11:09 (UTC)

Latest Comments

vitaliikuzhdin commented on 2025-07-11 11:18 (UTC) (edited on 2025-07-11 16:17 (UTC) by vitaliikuzhdin)

@dreieck, it looks like I accidentally broke the logic while updating to 2.3.3, but when I previously commented that I had fixed the issue, it was indeed fixed.

Thanks for your suggestions, go get seems to download only the needed modules, unlike go mod download, which pulls in much more than necessary. I've also adopted the cleaner chmod.

In addition, I've added a custom GOCACHE export to keep the build cache inside $srcdir/ and avoid requiring a writable $HOME (it also prevents littering the host system). Alternatively, if we want to contain everything in $srcdir/, it might be easier to just export GOPATH, so that all other Go-related paths are automatically prefixed accordingly.

What do you think? Should these changes be added to the wiki?

dreieck commented on 2025-07-09 22:04 (UTC) (edited on 2025-07-09 22:04 (UTC) by dreieck)

Ahoj,

hm, yes, the Go packaging guidelines seem not to have (yet) that stuff, but the rust packaging guidelines have that.

Anyway, I still see that it downloads in build():

==> Starting build()...
go: downloading github.com/JohannesKaufmann/dom v0.2.0
go: downloading github.com/agnivade/levenshtein v1.2.1
go: downloading github.com/andybalholm/cascadia v1.3.3
go: downloading github.com/bmatcuk/doublestar/v4 v4.8.1
go: downloading github.com/muesli/termenv v0.16.0
go: downloading golang.org/x/net v0.39.0
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/rivo/uniseg v0.4.7
go: downloading golang.org/x/sys v0.32.0

About how to do it in go: I am also not knowledgeable about this, but I have here a few packages where I did stuff like

  export GOPATH="${srcdir}/.go"
  export GOBIN="${GOPATH}/bin"
  go get -v github.com/google/wuffs/cmd/...

or

  export GOPATH="${srcdir}/go"
  mkdir -p "${GOPATH}"
  go get ...

or

  export GOPATH="${srcdir}/.go"
  export GOCACHE="${GOPATH}/cache"
  export GOMODCACHE="${GOPATH}/pkg/mod"
  export GOENV="${GOPATH}/env"
  export GOBIN="${GOPATH}/bin"

  cd "${srcdir}/${_pkgname}"
  mkdir -p build/

  # download go modules so build() works offline
  #go mod download -x
  go get -v ./...

  # Add write permission to downloaded go files so that downloaded files can be removed again.
  chmod -R ug+Xwr "${GOPATH}"

in prepare().

Regards!

vitaliikuzhdin commented on 2025-04-23 10:35 (UTC)

@dreieck, I was aware of the issue, but I was honestly following the Go package guidelines, which do not provide a solution for this. I suspect they were written before Go added support for vendoring modules. In any case, the package no longer requires an internet connection in the build() function. Please let me know your thoughts on this, especially if you are knowledgeable about Go.

dreieck commented on 2025-04-23 07:53 (UTC)

This package downloads stuff in build().
This should not happen.
Please make sure that the go specific stuff to be downloaded, that cannot be downloaded in the source array, is downloaded in prepare(), so that build() and package() can run in an offline environment.

Regards and thanks for the package!

==> Starting build()...
go: downloading github.com/muesli/termenv v0.16.0
go: downloading github.com/bmatcuk/doublestar/v4 v4.8.1
go: downloading github.com/agnivade/levenshtein v1.2.1
go: downloading github.com/JohannesKaufmann/dom v0.2.0
go: downloading github.com/andybalholm/cascadia v1.3.3
go: downloading github.com/rivo/uniseg v0.4.7
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0