Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Index files

An index file is a list of files that you write by hand or with a script. Use one when the server shows no file list, when the files are on different servers, or when you want to give the files other names.

Format

An index is a UTF-8 text file with one file per line, and a tab between the columns. The first line is #kiln-index 1.

ColumnRequiredMeaning
1. nameyesThe name of the file in the folder. It can contain / for a subfolder.
2. sizeyesThe size in bytes.
3. urlnoThe address of the file. Kiln resolves a relative URL against the index’s own URL. An empty column means the index’s folder followed by the name.
4. crc32noThe file’s CRC32, as eight hex digits. Kiln checks the download against it.
5. labelnoA label for this row, in place of the source’s label.

A line can omit empty columns at its end.

Example

The file https://example.org/homebrew/index.tsv, with tabs between the columns:

#kiln-index 1
Tobu Tobu Girl (World).zip	291640
Dangan GB (World).zip	198112	https://mirror.example.net/dangan-gb.zip	1a2b3c4d
Infinity (World).zip	524288	files/infinity.zip		Homebrew
  • Kiln downloads the first file from https://example.org/homebrew/Tobu Tobu Girl (World).zip.
  • Kiln downloads the second file from another server, and checks its CRC32.
  • Kiln downloads the third file from https://example.org/homebrew/files/infinity.zip, and shows the label “Homebrew” on its row. Its CRC32 column is empty.

The source for this index:

format = 1

[[source]]
url = "https://example.org/homebrew/index.tsv"
as = "index"

include and exclude also apply to the names of an index.

Kiln checks an index for changes once a day at most. When the server sends ETag or Last-Modified headers, Kiln downloads the index again only after a change.