OCaml implementation of the Mozilla Public Suffix service
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-linkedin: apply dune fmt

Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.

+27 -8
+20 -8
README.md
··· 14 14 15 15 ```ocaml 16 16 (* Create a PSL instance *) 17 - let psl = Publicsuffix.v () in 18 - 17 + let psl = Publicsuffix.v () 19 18 (* Determine the registrable domain (public suffix + one label) *) 20 19 match Publicsuffix.registrable_domain psl "www.example.com" with 21 20 | Ok reg_domain -> Format.printf "Registrable: %s\n" reg_domain ··· 53 52 54 53 ## Installation 55 54 55 + Install with opam: 56 + 57 + ```sh 58 + $ opam install publicsuffix 56 59 ``` 57 - opam install publicsuffix 60 + 61 + If opam cannot find the package, it may not yet be released in the public 62 + `opam-repository`. Add the overlay repository, then install it: 63 + 64 + ```sh 65 + $ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git 66 + $ opam update 67 + $ opam install publicsuffix 58 68 ``` 59 69 60 70 ## Updating the Public Suffix List Data 61 71 62 72 The `data/public_suffix_list.dat` file contains the PSL data, which is compiled into the library at build time. To update to the latest version: 63 73 64 - ```bash 65 - curl -o data/public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat 66 - opam exec -- dune build 74 + <!-- $MDX non-deterministic=command --> 75 + ```sh 76 + $ curl -o data/public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat 77 + $ opam exec -- dune build 67 78 ``` 68 79 69 80 ## Documentation ··· 77 88 78 89 Or build locally: 79 90 80 - ```bash 81 - opam exec -- dune build @doc 91 + <!-- $MDX non-deterministic=command --> 92 + ```sh 93 + $ opam exec -- dune build @doc 82 94 ``` 83 95 84 96 ## Technical Standards
+4
dune
··· 7 7 ; Ignore third_party directory (for fetched dependency sources) 8 8 9 9 (data_only_dirs third_party) 10 + 11 + (mdx 12 + (files README.md) 13 + (libraries publicsuffix publicsuffix.cmd publicsuffix.data))
+2
dune-project
··· 1 1 (lang dune 3.21) 2 + (using mdx 0.4) 2 3 (name publicsuffix) 3 4 4 5 (generate_opam_files true) ··· 20 21 (fmt (>= 0.9.0)) 21 22 punycode 22 23 (cmdliner (>= 1.3.0)) 24 + (mdx :with-test) 23 25 (alcotest :with-test)))
+1
publicsuffix.opam
··· 16 16 "fmt" {>= "0.9.0"} 17 17 "punycode" 18 18 "cmdliner" {>= "1.3.0"} 19 + "mdx" {with-test} 19 20 "alcotest" {with-test} 20 21 "odoc" {with-doc} 21 22 ]