Skip to content

Commit 3cd9450

Browse files
committed
Update intro and URLs
1 parent c9527b1 commit 3cd9450

1 file changed

Lines changed: 24 additions & 11 deletions

File tree

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
A collection of ideas, programs and scripts to make [lychee](https://github.com/lycheeverse/lychee/) compatible with additional file formats.
1+
A collection of use-cases and scripts to make [lychee] compatible with additional file formats.
22

33
Out of the box lychee supports HTML, Markdown and plain text formats.
4-
More precisely, HTML files are parsed as HTML5 with the use of the [html5ever](https://github.com/servo/html5ever) parser
5-
and Markdown files are treated as [CommonMark](https://commonmark.org/) with the use of [pulldown-cmark](https://github.com/pulldown-cmark/pulldown-cmark/).
4+
More precisely, HTML files are parsed as HTML5 with the use of the [html5ever] parser.
5+
Markdown files are treated as [CommonMark] with the use of [pulldown-cmark].
66

77
For any other file format lychee falls back to a "plain text" mode.
8-
This means that [linkify](https://github.com/robinst/linkify) attempts to extract URLs on a best-effort basis.
9-
If invalid UTF-8 characters are encountered the input file is skipped.
8+
This means that [linkify] attempts to extract URLs on a best-effort basis.
9+
If invalid UTF-8 characters are encountered, the input file is skipped.
10+
This is because it is assumed that the file is in a binary format lychee cannot understand.
1011

1112
# Preprocess files
1213

@@ -20,7 +21,7 @@ as no parameters can be supplied from the CLI directly.
2021
lychee files/* --preprocess ./preprocess.sh
2122
```
2223

23-
Take a look at [preprocess.sh](./preprocess.sh) to see how this is done.
24+
Take a look at [preprocess.sh] to see how this is done.
2425

2526
# Converting file formats
2627

@@ -34,7 +35,7 @@ pandoc "$1" --to=html --wrap=none --markdown-headings=atx
3435

3536
## odp, pptx, ods, xlsx
3637

37-
LibreOffice can convert documents to various formats.
38+
[LibreOffice] can convert documents to various formats.
3839
Unfortunately, it does not support printing the result to stdout directly as of 2025,
3940
as the `--cat` option is not compatible with `--convert-to`.
4041
This makes usage a bit clumsy.
@@ -50,7 +51,7 @@ rm "$file"
5051

5152
## AsciiDoc
5253

53-
Using [asciidoctor](https://docs.asciidoctor.org/) we can convert AsciiDoc to HTML.
54+
Using [asciidoctor] we can convert AsciiDoc to HTML.
5455
This ensures that URLs are properly interpreted.
5556

5657
```bash
@@ -59,7 +60,7 @@ asciidoctor -a stylesheet! "$1" -o -
5960

6061
## PDF
6162

62-
Using poppler-utils we can convert PDFs to HTML:
63+
Using [poppler-utils] we can convert PDFs to HTML:
6364

6465
```bash
6566
pdftohtml -i -s -stdout "$1"
@@ -68,7 +69,7 @@ pdftohtml -i -s -stdout "$1"
6869
pdftotext "$1" -
6970
```
7071

71-
Alternatively, pdftk can be used to extract URI directives from PDFs.
72+
Alternatively, [pdftk] can be used to extract URI directives from PDFs.
7273
Source: https://unix.stackexchange.com/a/531883
7374

7475
```bash
@@ -90,10 +91,22 @@ Because of that, it's the user's responsibility to transform CSV into a format l
9091

9192
### csvtk
9293

93-
[csvtk](https://github.com/shenwei356/csvtk) is a toolkit to work with CSV data.
94+
[csvtk] is a toolkit to work with CSV data.
9495
Apart from many advanced features, it allows us to convert and pretty-print CSV.
9596
One possible way to transform the data is:
9697

9798
```bash
9899
csvtk csv2json "$1"
99100
```
101+
102+
[lychee]: https://github.com/lycheeverse/lychee/
103+
[linkify]: https://github.com/robinst/linkify
104+
[html5ever]: https://github.com/servo/html5ever
105+
[CommonMark]: https://commonmark.org/
106+
[pulldown-cmark]: https://github.com/pulldown-cmark/pulldown-cmark/
107+
[preprocess.sh]: ./preprocess.sh
108+
[asciidoctor]: https://docs.asciidoctor.org/
109+
[csvtk]: https://github.com/shenwei356/csvtk
110+
[LibreOffice]: https://help.libreoffice.org/latest/he/text/shared/guide/start_parameters.html
111+
[poppler-utils]: https://poppler.freedesktop.org/
112+
[pdftk]: https://gitlab.com/pdftk-java/pdftk

0 commit comments

Comments
 (0)