diff options
| author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-17 19:13:39 +0200 | 
|---|---|---|
| committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-17 19:13:39 +0200 | 
| commit | 9b4b5c2fe3aa1042d4bab8cef94b154ae85cad24 (patch) | |
| tree | 91a47d0c6ef10ba48501298dd6308a2e3eddb3ee | |
| parent | 5f2b62e776aaab6b8c3acbbf39ba2e9f88538298 (diff) | |
| download | apkdoc-9b4b5c2fe3aa1042d4bab8cef94b154ae85cad24.tar.gz apkdoc-9b4b5c2fe3aa1042d4bab8cef94b154ae85cad24.tar.bz2 apkdoc-9b4b5c2fe3aa1042d4bab8cef94b154ae85cad24.zip | |
doc: Add README
| -rw-r--r-- | README.md | 58 | ||||
| -rw-r--r-- | example.md (renamed from example.txt) | 0 | 
2 files changed, 58 insertions, 0 deletions
| diff --git a/README.md b/README.md new file mode 100644 index 0000000..93f352c --- /dev/null +++ b/README.md @@ -0,0 +1,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 | 
