Code Monkey home page Code Monkey logo

heymars's Introduction

Heymars

image

Heymars is a small, configurable launcher GUI for technical users.

Commands can be listed in a .txt, .json or .jsonnet file.

Overview

Here's what it looks like:

image

This was created from input json file:

{
   "commands": [
      {
         "fgcolor": "Blue",
         "id": "",
         "runtags": [
            "build"
         ],
         "title": "Basic heymars commands"
      },
      {
         "c": "dotnet build -c release Heymars.sln",
         "matchers": [
            {
               "log": true,
               "patterns": [
                  "^.*\\(\\d+,\\d+\\): error [A-Z]+\\d+: .*"
               ],
               "say": "Build failed",
               "status": "Build error"
            }
         ],
         "shell": true,
         "tags": [
            "build"
         ],
         "title": "Release build"
      },
      {
         "c": "jsonnet heymars_sample.jsonnet -o heymars_sample.json",
         "cwd": "Examples",
         "shell": true,
         "tags": [
            "build"
         ]
      },
      {
         "c": "npx quicktype heymars_sample.json --just-types --out=heymars_schema.ts",
         "cwd": "Examples",
         "shell": true,
         "title": "Create type definition with quicktype"
      },
      {
         "bgcolor": "yellow",
         "c": "code Examples/heymars_schema.ts",
         "shell": true
      }
   ],
   "root": ".."
}

Heymars directly supports running jsonnet files if you have jsonnet.exe installed. This json was generated with this jsonnet file:

{
    local Bat(cmd) = {
        c: cmd,
        shell: true
    },
    local Comm(title) = {
        title: title,
        fgcolor: "Blue",
        id: ""
    },

    local Msbuild(title, command) = {
        title: title,
        c: command,
        shell: true,
        matchers: [
            {

                patterns: [@"^.*\(\d+,\d+\): error [A-Z]+\d+: .*"],
                log: true,
                status: "Build error",
                say: "Build failed"
            }

        ]  
    },
    local sample = "heymars_sample",
    root: @"..",
    local tbuild = {
        tags: ["build"]
    },
    commands: [
        Comm("Basic heymars commands") + {runtags: ["build"]},
        Msbuild("Release build", "dotnet build -c release Heymars.sln") + tbuild,
        Bat("jsonnet %s.jsonnet -o %s.json" % [sample, sample]) + { cwd: "Examples" } + tbuild,
        Bat("npx quicktype heymars_sample.json --just-types --out=heymars_schema.ts") + {title: "Create type definition with quicktype", cwd: "Examples"},
        Bat("code Examples/heymars_schema.ts") + { bgcolor: "yellow"}
   ]
}

It is recommended to create your json files with jsonnet, to avoid repetition and e.g. reuse "C# error matchers" for different projects.

Here is the generated typescript schema you can use for quick reference.

For casual use, you can use plain text file as input. This file creates 4 commands:

echo hello
echo world
ls
pwd

You can gradually update to full blown json config by interleaving lines containing commands in json format:

echo hello
echo world
ls
{ "title": "More complex stuff you can fit on one line", "c": "echo foobar!", "fgcolor": "green", "id": "" }
pwd

License

MIT

heymars's People

Contributors

vivainio avatar

Stargazers

Jari Lehtinen avatar Olli-Pekka Valtonen avatar

Watchers

 avatar

heymars's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.