aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 93f352ca8291e48d5ce41ce545ec94b3314b52bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# APKDOC

Document generator for alpine's index format v2 file[^1].

## Usage example

```sh
apkdoc \
	-t text \
	-u https://alpine.mirror.wearetriple.com/v3.18/main/x86_64/APKINDEX.tar.gz \
	-f example.md \
	-o index.txt
```

## Data 

`apkdoc` offers a list of the following struct to the template:

```go
type Entry struct {
	Checksum         string     // C
	Version          string     // V
	Name             string     // P
	Architecture     *string    // A
	PackageSize      int        // S
	InstalledSize    int        // I
	Description      string     // T
	Url              string     // U
	License          string     // L
	Origin           *string    // o
	Maintainer       *string    // m
	BuildTime        *time.Time // t
	Commit           *string    // c
	ProviderPriority *int       // k
	Dependencies     []string   // D
	Provides         []string   // p
	InstallIf        []string   // i
}
```

## Functions

`apkdoc` also offers a couple help functions.

### `DerefI`

Deref int pointer.

### `DerefS`

Deref string pointer.

### `Properties`

A `Entry` function that generate a map of with lower cased space separated
property name.

[^1]: https://wiki.alpinelinux.org/wiki/Apk_spec