What is DitaBase?

DitaBase is on a quest to solve the problem of disparate data.
It's weapon is dit, a totally new style of container file.
Dit can hold any data, with scripts and objects to organize it.

With DitaBase, competing formats can work together.
Unrelated industries can share datasets with ease.
Complex questions can be answered with a single query.

Someday, there will be no file extensions: every file will be a dit.

The dit container file

One File Type to Rule Them All

The dit object model.
  • A dit is made of a series of fields.
  • Each field describes a payload.
  • Payloads can contain text, binary, files, or even other fields.
  • Validation scripts can check the payload for accuracy.
  • Conversion scripts can change the payload to match a different object.
  • Object relations can make fields extend or override other objects.
Validation Scripts
  • All fields must have validators.
  • Ensures data is always correct, no matter its origin.
  • Anyone can work with obscure formats by using the validators as unit tests.
  • JavaScript and Python scripts supported out of the box, any language can be added.
<field>
  <name>RamModules</name>
  <payload>1 x 8GB</payload>
  <validator>
    if not PAYLOAD.endswith("GB"):
      return "'" + PAYLOAD + "' was missing it's 'GB' identifier."
        
    modules = PAYLOAD[0:-2]
    modulesEnum = ["1 x 8", "2 x 4", "1 x 16", "2 x 8", "2 x 16"]
    
    if not modules in modulesEnum:
      return "'" + modules + "' not found in enum."
        
    return True
  </validator>
</field>
              
Conversion Scripts
  • Change a payload to match a different field.
  • Convert JSON to XML, English to Metric units, nuanced date formats, and anything in between.
  • Convert massive objects, like ecommerce platforms. Shopify to Amazon?
  • Data can use any format, because it can be easily converted to a different one.
converter:
  name: dollarToUSD
  example: $5.99 -> 5,99 USD
  in: moneyDollarSign
  out: moneyUSDNoSign
  code: |
    return `${IN.replace('$', '').replace('.', ',')} USD`;
converter:
  name: USDToDollar
  example: 5,99 USD -> $5.99
  in: moneyUSDNoSign
  out: moneyDollarSign
  code: |
    return `$${value.replace(' USD', '').replace(',', '.')}`;

              
Object Orientation
  • Fully customizable objects.
  • Objects are exactly like fields, but with no payloads.
  • Allows for componentization, code reuse, shareable open source objects.
  • Extend an object, add fields and additional validation to match your production data.
  • Override an object and change it's structure, while still leveraging it's validators.
  • Objects will distribute the load of writing validation code.
  • In the future, objects will be available for all data.
  "object": {
  "name": "ProductShopify",
  "extends": [
    { "name": "Product" },
    { "name": "FormatCSVRow" }
  ],
  "overrides": [
    { 
      "name": "ProductAlternate",
      "code": {{ // Override code }}
    }
  ],
  "converter": {
    "name": "ShopifyToAmazon",
    "in": "ProductShopify",
    "out": "ProductAmazon",
    "code" {{ // Conversion code }}
  },
  "contains": [
    { "name": "Handle" },
    { "name": "Title" },
    { "name": "Body" }
    // etc. Shopify has over 30 fields
  ],
  "validator" : {{ // Validation Code }}
}