1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

gcode-comments command-line tool (CLI)

Discussion in 'Software' started by OutsourcedGuru, Jan 7, 2018.

  1. OutsourcedGuru

    OutsourcedGuru Active Member

    Jun 3, 2017
    Likes Received:
    In case it's useful, I've created a command-line tool (CLI) in Node.js/JavaScript that will create a commented version of a GCODE file. It will add one comment per line which isn't already a one-line comment itself.


    Assuming that you have Node installed on your computer, you could put this script somewhere that's in your path and then just...

    $ gcode-comments file.gcode
    ;Generated with Cura_SteamEngine 2.3.1
    M104 S205                                         ; Set extruder temperature
    M109 S205                                         ; Set extruder temperature and wait (blocking)
    M107                                              ; Turn off fan
    M205 X10                                          ; Adjust jerk speed
    G1 F2400 E-1                                      ; Move and/or extrude to the indicated point
    Input:   file.gcode
    Output:  file_commented.gcode
    ...and it will do the rest.
    mark tomlinson likes this.

Share This Page