diff --git a/README.md b/README.md index 0ec2b9e..d4ad2b9 100644 --- a/README.md +++ b/README.md @@ -192,39 +192,39 @@ Implementations of full algorithms: Popular projects using `avo`: - [klauspost / **compress**](https://github.com/klauspost/compress) / **s2** + [klauspost / **compress**](https://github.com/klauspost/compress) / **s2** :star: 2702 > Optimized Go Compression Packages - [golang / **crypto**](https://github.com/golang/crypto) / **curve25519** + [golang / **crypto**](https://github.com/golang/crypto) / **curve25519** :star: 2391 > [mirror] Go supplementary cryptography libraries - [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon) + [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon) :star: 1428 > Reed-Solomon Erasure Coding in Go - [segmentio / **asm**](https://github.com/segmentio/asm) + [segmentio / **asm**](https://github.com/segmentio/asm) :star: 681 > Go library providing algorithms optimized to leverage the characteristics of modern CPUs - [zeebo / **blake3**](https://github.com/zeebo/blake3) + [zeebo / **blake3**](https://github.com/zeebo/blake3) :star: 288 > Pure Go implementation of BLAKE3 with AVX2 and SSE4.1 acceleration - [lukechampine / **blake3**](https://github.com/lukechampine/blake3) + [lukechampine / **blake3**](https://github.com/lukechampine/blake3) :star: 278 > A pure-Go implementation of the BLAKE3 cryptographic hash function - [zeebo / **xxh3**](https://github.com/zeebo/xxh3) + [zeebo / **xxh3**](https://github.com/zeebo/xxh3) :star: 235 > XXH3 algorithm in Go - [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex) + [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex) :star: 111 > Bloom-filter based search index - [minio / **md5-simd**](https://github.com/minio/md5-simd) + [minio / **md5-simd**](https://github.com/minio/md5-simd) :star: 107 > Accelerate aggregated MD5 hashing performance up to 8x for AVX512 and 4x for AVX2. Useful for server applications that need to compute many MD5 sums in parallel. diff --git a/doc/adopters.md b/doc/adopters.md index bdca067..0a1af31 100644 --- a/doc/adopters.md +++ b/doc/adopters.md @@ -1,89 +1,89 @@ # Adopters - [klauspost / **compress**](https://github.com/klauspost/compress) / **s2** + [klauspost / **compress**](https://github.com/klauspost/compress) / **s2** Optimized Go Compression Packages - [golang / **crypto**](https://github.com/golang/crypto) / **curve25519** + [golang / **crypto**](https://github.com/golang/crypto) / **curve25519** [mirror] Go supplementary cryptography libraries - [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon) + [klauspost / **reedsolomon**](https://github.com/klauspost/reedsolomon) Reed-Solomon Erasure Coding in Go - [segmentio / **asm**](https://github.com/segmentio/asm) + [segmentio / **asm**](https://github.com/segmentio/asm) Go library providing algorithms optimized to leverage the characteristics of modern CPUs - [zeebo / **blake3**](https://github.com/zeebo/blake3) + [zeebo / **blake3**](https://github.com/zeebo/blake3) Pure Go implementation of BLAKE3 with AVX2 and SSE4.1 acceleration - [lukechampine / **blake3**](https://github.com/lukechampine/blake3) + [lukechampine / **blake3**](https://github.com/lukechampine/blake3) A pure-Go implementation of the BLAKE3 cryptographic hash function - [zeebo / **xxh3**](https://github.com/zeebo/xxh3) + [zeebo / **xxh3**](https://github.com/zeebo/xxh3) XXH3 algorithm in Go - [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex) + [dgryski / **go-bloomindex**](https://github.com/dgryski/go-bloomindex) Bloom-filter based search index - [minio / **md5-simd**](https://github.com/minio/md5-simd) + [minio / **md5-simd**](https://github.com/minio/md5-simd) Accelerate aggregated MD5 hashing performance up to 8x for AVX512 and 4x for AVX2. Useful for server applications that need to compute many MD5 sums in parallel. - [phoreproject / **bls**](https://github.com/phoreproject/bls) + [phoreproject / **bls**](https://github.com/phoreproject/bls) Go implementation of the BLS12-381 pairing - [FiloSottile / **edwards25519**](https://github.com/FiloSottile/edwards25519) + [FiloSottile / **edwards25519**](https://github.com/FiloSottile/edwards25519) filippo.io/edwards25519 — A safer, faster, and more powerful low-level edwards25519 Go implementation. - [lukechampine / **us**](https://github.com/lukechampine/us) / **merkle/blake2b** + [lukechampine / **us**](https://github.com/lukechampine/us) / **merkle/blake2b** An alternative interface to Sia - [oasisprotocol / **curve25519-voi**](https://github.com/oasisprotocol/curve25519-voi) + [oasisprotocol / **curve25519-voi**](https://github.com/oasisprotocol/curve25519-voi) High-performance Curve25519/ristretto255 for Go - [dgryski / **go-sip13**](https://github.com/dgryski/go-sip13) + [dgryski / **go-sip13**](https://github.com/dgryski/go-sip13) siphash 1-3 - [orisano / **wyhash**](https://github.com/orisano/wyhash) + [orisano / **wyhash**](https://github.com/orisano/wyhash) A pure-Go wyhash implementation. - [oasisprotocol / **deoxysii**](https://github.com/oasisprotocol/deoxysii) + [oasisprotocol / **deoxysii**](https://github.com/oasisprotocol/deoxysii) Go Deoxys-II-256-128 - [mmcloughlin / **md4**](https://github.com/mmcloughlin/md4) + [mmcloughlin / **md4**](https://github.com/mmcloughlin/md4) Assembly-optimized MD4 hash algorithm in Go - [dgryski / **go-marvin32**](https://github.com/dgryski/go-marvin32) + [dgryski / **go-marvin32**](https://github.com/dgryski/go-marvin32) Assembly-optimized Marvin32 hash function - [dgryski / **go-speck**](https://github.com/dgryski/go-speck) + [dgryski / **go-speck**](https://github.com/dgryski/go-speck) SPECK cipher - [dgryski / **go-chaskey**](https://github.com/dgryski/go-chaskey) + [dgryski / **go-chaskey**](https://github.com/dgryski/go-chaskey) go-chaskey: an implementation of chaskey, an efficient MAC for microcontrollers - [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **ascon** + [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **ascon** NIST Lightweight Cryptography finalists - [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **grain** + [ericlagergren / **lwcrypto**](https://github.com/ericlagergren/lwcrypto) / **grain** NIST Lightweight Cryptography finalists diff --git a/internal/cmd/docgen/main.go b/internal/cmd/docgen/main.go index 0fb500a..b48c341 100644 --- a/internal/cmd/docgen/main.go +++ b/internal/cmd/docgen/main.go @@ -10,8 +10,10 @@ import ( "fmt" "io/ioutil" "log" + "net/url" "os" "regexp" + "strconv" "strings" "text/template" @@ -166,7 +168,26 @@ func snippet(filename, start, end string) (string, error) { } // avatar returns HTML for a Github user avatar. -func avatar(owner string) (string, error) { - format := `` - return fmt.Sprintf(format, owner), nil +func avatar(owner string, size int) (string, error) { + // Origin avatar URL from Github. + u := fmt.Sprintf("https://github.com/%s.png", owner) + + // Use images.weserv.nl service to resize and apply circle mask. + v := url.Values{} + v.Set("url", u) + v.Set("w", strconv.Itoa(size)) + v.Set("h", strconv.Itoa(size)) + v.Set("fit", "cover") + v.Set("mask", "circle") + v.Set("maxage", "7d") + + src := url.URL{ + Scheme: "https", + Host: "images.weserv.nl", + RawQuery: v.Encode(), + } + + // Build tag. + format := `` + return fmt.Sprintf(format, src.String(), size, size), nil } diff --git a/internal/cmd/docgen/templates/adopters.tmpl b/internal/cmd/docgen/templates/adopters.tmpl index 9c370b3..6bfb685 100644 --- a/internal/cmd/docgen/templates/adopters.tmpl +++ b/internal/cmd/docgen/templates/adopters.tmpl @@ -1,6 +1,6 @@ # Adopters {{ range .Packages.Ranked }} -{{ avatar .Repository.Owner }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }}) +{{ avatar .Repository.Owner 28 }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }}) {{- if .SubPackage }} / **{{ .SubPackage}}**{{ end }} {{ .Metadata.Description }} diff --git a/internal/cmd/docgen/templates/readme.tmpl b/internal/cmd/docgen/templates/readme.tmpl index 452226d..ad5e857 100644 --- a/internal/cmd/docgen/templates/readme.tmpl +++ b/internal/cmd/docgen/templates/readme.tmpl @@ -107,7 +107,7 @@ Popular projects using `avo`: {{ range .Packages.Top 10 -}} {{ if lt .Metadata.Stars 100 }}{{break}}{{ end -}} -{{ avatar .Repository.Owner }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }}) +{{ avatar .Repository.Owner 24 }} [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }}) {{- if .SubPackage }} / **{{ .SubPackage}}**{{ end }} :star: {{ .Metadata.Stars }} > {{ .Metadata.Description }}