vengi-voxel / vengi

free and open source voxel art tools - editor, thumbnailer and format converter
http://vengi-voxel.github.io/vengi/
Other
1.08k stars 90 forks source link

MAKE: automatically create or update Formats.md and application.plist.in with formatprinter tool #354

Closed mgerhardy closed 10 months ago

mgerhardy commented 10 months ago

The makefile got support for generating a few files automatically for supported formats (see b34369d54a6eb7d8f67ac8d5299844214e34a8be and bf4c55be9e50905e917a73c42bd2bba31e621d59)

it would be nice to also generate docs/Formats.md with that tool to reduce maintenance costs

contrib/installer/osx/application.plist.in is another candidate. Here is an example of how it should look like https://github.com/musescore/MuseScore/blob/f2bd3546408ed53eb95707d600f7e88475ee6a6f/build/MacOSXBundleInfo.plist.in#L135 - and here are the specs: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html

The makefile target is formats

mgerhardy commented 10 months ago

vengi-formatprinter --voxel --image --palette output

{
  "palettes": [
    {
      "name": "Gimp Palette",
      "extensions": [
        "gpl"
      ]
    },
    {
      "name": "Qubicle Palette",
      "extensions": [
        "qsm"
      ]
    },
    {
      "name": "JASC Palette",
      "extensions": [
        "pal"
      ]
    },
    {
      "name": "Photoshop Palette",
      "extensions": [
        "ase"
      ]
    },
    {
      "name": "RGB Palette",
      "extensions": [
        "pal"
      ]
    },
    {
      "name": "CSV Palette",
      "extensions": [
        "csv"
      ]
    },
    {
      "name": "Portable Network Graphics",
      "extensions": [
        "png"
      ]
    }
  ],
  "images": [
    {
      "name": "Portable Network Graphics",
      "extensions": [
        "png"
      ]
    },
    {
      "name": "JPEG",
      "extensions": [
        "jpeg",
        "jpg"
      ]
    },
    {
      "name": "Targa image file",
      "extensions": [
        "tga"
      ]
    },
    {
      "name": "DDS",
      "extensions": [
        "dds"
      ]
    },
    {
      "name": "PKM",
      "extensions": [
        "pkm"
      ]
    },
    {
      "name": "PVR",
      "extensions": [
        "pvr"
      ]
    },
    {
      "name": "Bitmap",
      "extensions": [
        "bmp"
      ]
    },
    {
      "name": "Photoshop",
      "extensions": [
        "psd"
      ]
    },
    {
      "name": "Graphics Interchange Format",
      "extensions": [
        "gif"
      ]
    },
    {
      "name": "Radiance rgbE",
      "extensions": [
        "hdr"
      ]
    },
    {
      "name": "Softimage PIC",
      "extensions": [
        "pic"
      ]
    },
    {
      "name": "Portable Anymap",
      "extensions": [
        "pnm"
      ]
    }
  ],
  "voxels": [
    {
      "name": "Vengi",
      "extensions": [
        "vengi"
      ],
      "mimetype": "application/x-vengi",
      "animation": true,
      "save": true
    },
    {
      "name": "Qubicle Binary",
      "extensions": [
        "qb"
      ],
      "mimetype": "application/x-qubicle-binary",
      "animation": false,
      "save": true
    },
    {
      "name": "MagicaVoxel",
      "extensions": [
        "vox"
      ],
      "mimetype": "application/x-magicavoxel",
      "animation": false,
      "save": true
    },
    {
      "name": "Qubicle Binary Tree",
      "extensions": [
        "qbt"
      ],
      "mimetype": "application/x-qubicle-binary-tree",
      "animation": false,
      "save": true
    },
    {
      "name": "Qubicle Project",
      "extensions": [
        "qbcl"
      ],
      "mimetype": "application/x-qubicle-project",
      "animation": false,
      "save": true
    },
    {
      "name": "Sandbox VoxEdit Tilemap",
      "extensions": [
        "vxt"
      ],
      "mimetype": "application/x-sandbox-voxedit-tilemap",
      "animation": false,
      "save": false
    },
    {
      "name": "Sandbox VoxEdit Collection",
      "extensions": [
        "vxc"
      ],
      "mimetype": "application/x-sandbox-voxedit-collection",
      "animation": false,
      "save": false
    },
    {
      "name": "Sandbox VoxEdit Model",
      "extensions": [
        "vxm"
      ],
      "mimetype": "application/x-sandbox-voxedit-model",
      "animation": false,
      "save": true
    },
    {
      "name": "Sandbox VoxEdit Hierarchy",
      "extensions": [
        "vxr"
      ],
      "mimetype": "application/x-sandbox-voxedit-hierarchy",
      "animation": true,
      "save": true
    },
    {
      "name": "BinVox",
      "extensions": [
        "binvox"
      ],
      "mimetype": "application/x-binvox",
      "animation": false,
      "save": true
    },
    {
      "name": "Goxel",
      "extensions": [
        "gox"
      ],
      "mimetype": "application/x-goxel",
      "animation": false,
      "save": true
    },
    {
      "name": "CubeWorld",
      "extensions": [
        "cub"
      ],
      "mimetype": "application/x-cubeworld",
      "animation": false,
      "save": true
    },
    {
      "name": "Minetest",
      "extensions": [
        "mts"
      ],
      "mimetype": "application/x-minetest",
      "animation": false,
      "save": false
    },
    {
      "name": "Minecraft region",
      "extensions": [
        "mca",
        "mcr"
      ],
      "mimetype": "application/x-minecraft-region",
      "animation": false,
      "save": false
    },
    {
      "name": "Minecraft level dat",
      "extensions": [
        "dat"
      ],
      "mimetype": "application/x-minecraft-level-dat",
      "animation": false,
      "save": false
    },
    {
      "name": "Minecraft schematic",
      "extensions": [
        "schematic",
        "schem",
        "nbt"
      ],
      "mimetype": "application/x-minecraft-schematic",
      "animation": false,
      "save": false
    },
    {
      "name": "Quake BSP",
      "extensions": [
        "bsp"
      ],
      "mimetype": "application/x-quake-bsp",
      "mesh": true,
      "animation": false,
      "save": false
    },
    {
      "name": "Quake 2 Model",
      "extensions": [
        "md2"
      ],
      "mimetype": "application/x-quake-2-model",
      "mesh": true,
      "animation": false,
      "save": false
    },
    {
      "name": "FBX",
      "extensions": [
        "fbx"
      ],
      "mimetype": "application/x-fbx",
      "mesh": true,
      "animation": false,
      "save": true
    },
    {
      "name": "Sproxel csv",
      "extensions": [
        "csv"
      ],
      "mimetype": "application/x-sproxel-csv",
      "animation": false,
      "save": true
    },
    {
      "name": "Magicavoxel XRAW",
      "extensions": [
        "xraw"
      ],
      "mimetype": "application/x-magicavoxel-xraw",
      "animation": false,
      "save": true
    },
    {
      "name": "StarMade",
      "extensions": [
        "sment"
      ],
      "mimetype": "application/x-starmade",
      "animation": false,
      "save": false
    },
    {
      "name": "AnimaToon",
      "extensions": [
        "scn"
      ],
      "mimetype": "application/x-animatoon",
      "animation": true,
      "save": false
    },
    {
      "name": "VoxelBuilder",
      "extensions": [
        "vbx"
      ],
      "mimetype": "application/x-voxelbuilder",
      "animation": false,
      "save": false
    },
    {
      "name": "Wavefront Object",
      "extensions": [
        "obj"
      ],
      "mimetype": "application/x-wavefront-object",
      "mesh": true,
      "animation": false,
      "save": true
    },
    {
      "name": "GL Transmission Format",
      "extensions": [
        "gltf",
        "glb",
        "vrm"
      ],
      "mimetype": "application/x-gl-transmission-format",
      "mesh": true,
      "animation": true,
      "save": true
    },
    {
      "name": "Standard Triangle Language",
      "extensions": [
        "stl"
      ],
      "mimetype": "application/x-standard-triangle-language",
      "mesh": true,
      "animation": false,
      "save": true
    },
    {
      "name": "Polygon File Format",
      "extensions": [
        "ply"
      ],
      "mimetype": "application/x-polygon-file-format",
      "mesh": true,
      "animation": false,
      "save": true
    },
    {
      "name": "Build engine",
      "extensions": [
        "kvx"
      ],
      "mimetype": "application/x-build-engine",
      "animation": false,
      "save": true
    },
    {
      "name": "Particubes",
      "extensions": [
        "pcubes",
        "particubes"
      ],
      "mimetype": "application/x-particubes",
      "animation": false,
      "save": false
    },
    {
      "name": "Cubzh",
      "extensions": [
        "3zh"
      ],
      "mimetype": "application/x-cubzh",
      "animation": false,
      "save": true
    },
    {
      "name": "Voxel3D",
      "extensions": [
        "v3a"
      ],
      "mimetype": "application/x-voxel3d",
      "animation": false,
      "save": true
    },
    {
      "name": "AceOfSpades",
      "extensions": [
        "kv6"
      ],
      "mimetype": "application/x-aceofspades",
      "animation": false,
      "save": true
    },
    {
      "name": "Tiberian Sun",
      "extensions": [
        "vxl"
      ],
      "mimetype": "application/x-tiberian-sun",
      "animation": true,
      "save": true
    },
    {
      "name": "AceOfSpades",
      "extensions": [
        "vxl"
      ],
      "mimetype": "application/x-aceofspades-vxl",
      "animation": false,
      "save": true
    },
    {
      "name": "Qubicle Exchange",
      "extensions": [
        "qef"
      ],
      "mimetype": "application/x-qubicle-exchange",
      "animation": false,
      "save": true
    },
    {
      "name": "Chronovox",
      "extensions": [
        "csm"
      ],
      "mimetype": "application/x-chronovox",
      "animation": false,
      "save": false
    },
    {
      "name": "Nicks Voxel Model",
      "extensions": [
        "nvm"
      ],
      "mimetype": "application/x-nicks-voxel-model",
      "animation": false,
      "save": false
    },
    {
      "name": "SLAB6 vox",
      "extensions": [
        "vox"
      ],
      "mimetype": "application/x-slab6-vox",
      "animation": false,
      "save": true
    },
    {
      "name": "VoxelMax",
      "extensions": [
        "vmax.zip",
        "vmaxb"
      ],
      "mimetype": "application/x-voxelmax",
      "animation": false,
      "save": false
    }
  ]
}