Skip to content

Conversation

@repparw
Copy link

@repparw repparw commented Apr 11, 2025

started doing this but after sometime got frustrated with trying to standardize it. my own custom one works, you can check the history on that file for the caller i tried to this.

tried to make this one as similar to the zmk one as possible.

could also split it in parts, qmk c2json in a workflow, then json to svg here. dunno. if someone wants to follow this or has any ideas to try, all yours.

with a caller something like this for testing.

name: Generate Keymap Diagram

on:
  push:
    branches:
      - main  # Or your default branch
    paths:
      - 'keyboards/**/keymaps/**/keymap.c' # Watch for keymap.c files

  workflow_dispatch:

jobs:
  generate_diagram:
    name: Generate Keymap Diagram
    uses: <USERNAME>/<REPOSITORY>/.github/workflows/your_draw_workflow.yml@main # Replace with your workflow path
    with:
      # --- REQUIRED INPUTS - REPLACE WITH YOUR VALUES ---
      qmk_keymap_c_path: 'keyboards/your_keyboard/keymaps/default/keymap.c' # Replace this path
      qmk_keyboard: 'your_keyboard_name'                                    # Replace this name
      qmk_keymap: 'your_keymap_name'                                      # Replace this name

      # --- OPTIONAL INPUTS - UNCOMMENT AND CUSTOMIZE AS NEEDED ---
      output_folder: 'docs/keymaps'
      commit_message: 'docs: Update keymap diagram'

@caksoylar
Copy link
Owner

Hey, thank you for the contribution! I have been meaning to look at this and it makes sense, given QMK userspaces are a thing now. Unfortunately I have been a bit out of the loop with QMK so I want to invest some time into understanding things. I am sure this will come in handy even in its WIP form, so thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants