Commit Graph
6 Commits
Author SHA1 Message Date
Olivier Meunier 791174eefa Improved image "content negotiation"
Currently, there's no real content negotiation for images in srcset or
source tags, only something based on the optional type attribute.

Part of the conversion process consists of converting picture elements
to img with an srcset attribute.

Before archival, every img[srcset] attribute is reconstructed
in order to sort the list and have the biggest candidates first (and
discard images that will be way too big)

The archiver will then try to download every image in the given order
and, once successful, set an src attribute to the image (with the winner)
and remove the srcset.

Finally, this adds 2 new steps in the CleanDomProcessor:

- remove empty id attributes
- remove img with no src and not srcset attribute
2025-07-04 23:14:57 +02:00
Olivier Meunier 3b6a674f87 Lint all the things!
- golangci-lint configuration
- gofumpt on all go files
- added package comments
- added missing comments on exported functions
- do not check for bodyclose on http testing responses.
- check for errors on triggered tasks
- check for errors in acls
- check for errors during policy loading
- check for errors in password recovery process
- better error checking in pkg/extract/contentscripts
- nolint rules for errcheck when it's not needed
  (mostly defer calls for file reader closing)
2023-11-28 20:26:05 +01:00
Olivier Meunier 70b9f4678e Moved everything in src/* back to the root folder.
This was a mistake to use go.work since it might be needed on a
specific dev setup (with different "use" directives).
It results in a codebase that really matches the main readeck
module fqdn.
2023-09-12 20:12:02 +02:00
Olivier Meunier dda91020d3 Moved all the source files to ./src 2023-08-13 23:37:48 +02:00
Olivier Meunier 8a23cbad74 License prefix in all go files 2023-08-13 20:29:43 +02:00
Olivier Meunier c59cae7612 Added a pkg/extract/srcset package.
This is a parser for srcset attribute value.
Fork of https://github.com/lukasbob/srcset (Mads Jacobsen, MIT License)
2023-05-24 20:34:54 +02:00