ASPDM Database (WIP)

June 8, 2016 ยท View on GitHub

Package metadata format

The package metadata (manifest) format is a JSON document. The package repository (aka database) format is a JSON array of package metadata documents.

All attributes are mandatory, unless otherwise stated.

AttributeDescription
idA short name used for identification purposes (Should be a valid AutoHotkey identifier)
versionPackage version (must follow AHK-flavored Semantic Versioning)
typePackage type (lib, tool, other)
ahkbranchAutoHotkey branch the package is developed for (v1.1, v2-alpha, ahk_h, ...)
ahkversionVersion number of AutoHotkey the package was developed with (Internal, Automatic)
ahkflavourComma-separated list of supported AutoHotkey flavours (a32, u32, u64)
requiredComma-separated list of dependencies' package identifiers (leave empty if none)
nameThe human-friendly name of the package
descriptionDescription of the package (Optional, Recommended)
authorThe author(s) of the package
license(Optional) Name of the license under which the package is released
tagsComma-separated tags (Optional, Recommended)
forumurl(Optional, Recommended) ahkscript.org forum topic URL
screenshot(Optional) URL of the screenshot image to be displayed

Licenses : packages submitted to ahkscript.org without the license attribute filled in are assumed to be released under the ASPDM Default Package License (ADPL).

Package Repository-only attributes

AttributeDescription
isstdlib(Internal, Moderated) True if the package has been selected to be part of the official StdLib distribution
Categories
ArraysGraphicsNetwork
CallGuiObjects
COMINIParser
ConsoleHardwareProcess
ControlHashRegular Expressions
DynamicHotstringsSound
DatabaseJSONStrings
DateTimeKeyboardSystem
EditorMathText
EncryptionMediaVariables
FileMemoryWindow
FileSystemMenuYAML
FormatMS WindowsOther

Package Structure

'Library' packages

Library packages should have a standard package structure consisting of the following folders:

  • Lib\ (Mandatory) : StdLib files
  • Doc\ : Documentation
  • Root folder : Examples, etc.

Note: When installing a package into a StdLib folder, the files in the package's Lib\ folder would be copied to it.

'Tool/Other' packages

Tool/Other packages should have a standard package structure consisting of the following:

  • Install.ahk (Mandatory) : Executed on package installation
  • Remove.ahk (Mandatory) : Executed on package removal
  • Execute.ahk (Mandatory) : Execute the tool
  • Doc\ : Documentation
  • Root folder : Examples, etc.

Package File Format

The packages will have the .ahkp file extension. The compression format is LZNT (a.k.a LZ compression). The Magic Number is AHKPKG00. The uncompressed JSON metadata is stored at offset 0xC, with its string length stored as a UInt at offset 0x8 (Right after the magic number).