textpattern / textpattern-curated-plugins-list

A curated list of Textpattern plugins, in JSON format.
MIT License
2 stars 1 forks source link
textpattern-plugin

textpattern-curated-plugins-list

A curated list of Textpattern CMS plugins listed in the Textpattern plugins website.

JSON structure

Each plugin has a JSON-formatted 'library card', located within the library-of-plugins directory of this repository.

The Textpattern plugins website digests the information for each card to provide the relevant details of the plugin. Each card expects a set of required entries plus any optional entries as appropriate. It is recommended that you complete as many fields as possible in the JSON file, as this helps provide the most information to users within the Textpattern plugins site and assists with ongoing maintenance.

Example structure

{
  "name": "abc_example",
  "repositories": [
    {
      "repoType": "homepage",
      "repoUrl": "https://example.com/abc_example.html"
    },
    {
      "repoType": "github",
      "repoUrl": "https://github.com/exampleuser/abc_example"
    },
    {
      "repoType": "bitbucket",
      "repoUrl": "https://bitbucket.org/exampleuser/abc_example"
    },
    {
      "repoType": "gitlab",
      "repoUrl": "https://gitlab.com/exampleuser/abc_example"
    }
  ],
  "require": {
    "abc_extra_example": ">=2.0.0"
  },
  "beta": {
    "version": "3.7.1-beta.3",
    "datePublished": "2020-06-26",
    "downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.1-beta.3.zip",
    "phpHasManifest": 1
  },
  "stable": {
    "version": "3.7.0",
    "datePublished": "2020-02-14",
    "downloadUrlTxt": "https://github.com/exampleuser/abc_example/releases/download/3.7.0/abc_example_v3.7.0.txt",
    "downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.0.zip",
    "phpHasManifest": 1
  },
  "legacy": [
    {
      "4.6": {
        "version": "v2.5.3",
        "datePublished": "2018-10-18",
        "downloadUrlTxt": "https://github.com/exampleuser/abc_example/archive/v2.5.3.txt",
        "downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/v2.5.3.tar.gz",
        "phpHasManifest": 0
      }
    },
    {
      "4.5": {
        "version": "v1.4.0-beta.4",
        "downloadUrlTxt": "https://github.com/exampleuser/abc_example/archive/v1.4.0-beta.4_zip.txt"
      }
    }
  ]
}

A JSON template is provided as a useful starting point.

Required entries

Example minimum structure

This is the minimum that is required in each JSON file. Note that, as described above, stable or beta could be stated on line 3. phpHasManifest is required when a downloadUrlPhp entry is provided (not required if only a downloadUrlTxt is provided):

{
  "name": "abc_example",
  "stable": {
    "version": "3.7.0",
    "downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.0.zip",
    "phpHasManifest": 1
  }
}

Optional (but recommended) entries

Manifests for PHP versions of plugins

In order to allow PHP versions of a plugin to be upgraded via auto-update functionality directly within (future) Textpattern, a manifest.json file in the following format is expected to reside within the root directory of the plugin folder:

{
  "name": "abc_example",
  "description": "An example plugin description here.",
  "version": "0.1.0",
  "type": 5,
  "author": "Aaron A. Aardvark",
  "author_uri": "https://example.com/",
  "order": 5,
  "flags": 2,
  "help": {"file" : ["./README.textile"]},
  "code": {"file" : ["./abc_example.php"]},
  "textpack": {"file" : ["./textpack.txp"]},
  "data": {"file" : ["./data.txp"]}
}

Plugins that do not follow the above format, and/or that do not have an alternative TXT file available, will be excluded from auto-update functionality.

Linting

You can run a linter over the JSON files to check validity as follows (requires Node.js):

$ cd textpattern-curated-plugins-list
$ npm install
$ npm run jsonlint

License

Licensed under MIT license.