Skip to main content

the cidex manual/doc indexing specification

Project description

cidex

cidex is a convention used in my rtfm indexes repository as a way of conveying information to my rtfm lookup repository for displaying rtfm results for docs/manuals that don't follow convention.

As the cidex convention allows for customization than other conventions allow, it is also possible to use a custom cidex index file by putting it at the root of your domain, and naming it index.cidex. For example: https://google.com/index.cidex. If you have multiple versions, you can return a VariantManifest

Current Specifications

You should put a file called index.cidex in the root of your domain, for example: https://google.com/index.cidex. This can be any data structure specified in these specifications.

VariantManifest

This is a manifest that can point to different versions of docs that are available on your domain.

This can also be recursive, so if you had multiple projects with multiple versions, you can have manifests pointing to other manifests.

{
    "variants": [
        // list of variants, which can be accessed by querying `index-{variant}.cidex
        "stable", // can be accessed with `index-stable.cidex`
        "latest", // can be accessed with `index-latest.cidex`
        "v1", // can be accessed with `index-v1.cidex`
        "v2", // can be accessed with `index-v2.cidex`
    ],
    "version": "2.1" // this must be set to 2.1 for this version of the specification
}

CacheIndex

This data structure shows the entire cache that should be used when querying your doc/manual.

{
    "name": "the name of the project the index is for",
    "favicon_url": "a direct link to the icon to show when displaying the entries. This can also be `null`",
    "cache": { // the cache's keys should be used for searching/matching, however it should never be displayed. The information in the EntryObject should be used when displaying the results
        "entry-1": EntryObject,
        "entry-2": EntryObject,
    },
    "version": "2.1", // this must be set to 2.1 for this version of the specification
    "type": "cache-index" // this indicates that this is a cache index
}

ApiIndex

This data structure should be used when you want to use an api instead of a static cache.

Note: When using this index, the api is responsible for sorting & matching the entries.

{
    "name": "the name of the project the index is for",
    "favicon_url": "a direct link to the icon to show when displaying the entries. This can also be `null`",
    "url": "the url that should be used when sending a POST request to the api",
    "options": {
        // any information that the api might use to determine how to process the request and return the correct entruies
    },
    "version": "2.1", // this must be set to 2.1 for this version of the specification
    "type": "api-index" // this indicates that this is an api index
}

When sending a request to the api, you should use the following payload:

{
    "query": "the text that you are searching for",
    "options": {
        // the options from the options key in the ApiIndex
    },
    "version": "2.1", // this must be set to 2.1 for this version of the specification
}

and as a response, the api should return a CacheIndex with the same version as the payload.

Entry

The entry object is the object that actually includes the information to display for each result.

{
    "text": "the title/text to display",
    "url": "the url to go to when selected/clicked",
    "options": EntryOptions // extra options for customizing how the result should be displayed.
}

EntryOptions

The options available for entry objects isn't well defined yet, but here are the keys that my rtfm plugin for flow launcher accepts:

Note: All of these are optional

{
    "sub": "the subtitle to display",
    "icon": "a url to an icon for this specific entry",
    "title_highlight_data": [], // a list of ints that corospond to which characters in the result's text should be highlighted
    "title_tooltip": "the text that should appear when hovering over the title",
    "sub_tooltip": "the text that should appear when hovering over the subtitle",
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cidex-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cidex-0.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file cidex-0.1.1.tar.gz.

File metadata

  • Download URL: cidex-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for cidex-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cb65d085ec843d07482facca6ab9254bd69655e82dc3bad58556e45e20b8a726
MD5 f2744a23e14eb24354b28eb4dbcf788f
BLAKE2b-256 a4ab04f79c9d7cc63d6921e854bb7e9e2bfd292f10b133eed79eeba14e8ed506

See more details on using hashes here.

File details

Details for the file cidex-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cidex-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for cidex-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad379e749571cec78501230370afe62bf53e873fc2b5c16306a449b4964c1c06
MD5 3190bedc245927b97cf5a92447fce6bc
BLAKE2b-256 6e6ddf4e1d65b3d89a2f8816b70aae24c1d3058b21cd381bc34bf4150fa5f558

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page