This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env ruby | |
# convert a string into macro syntax for TMK firmware | |
# be sure to escape quotes e.g. ruby macro.rb "Pass\"word1" | |
# usage: ruby macro.rb "STRING" NAME_OF_MACRO | |
# Example: | |
# prompt# ruby macro.rb "this\"is aPa33word" name | |
# "T(T), T(H), T(I), T(S), D(LSFT), T(QUOT), U(LSFT), T(I), T(S), D(LSFT),/ | |
# T(SPC), U(LSFT), T(A), D(LSFT), T(P), U(LSFT), T(A), T(3), T(3), T(W),/ | |
# T(O), T(R), T(D), " | |
# |