This is a minimal language and interpreter for quickly generating config files (or fragments thereof) for Cisco networking devices. It implements the following rules:
#define something something_else... will set up a global value "something" that contains the data "something else"
interface FastEthernet0/{11-20} switchport access vlan {patron_vlan} no shutdown interface FastEthernet0/{21-25} switchport access vlan {visitor_vlan} no shutdown #define visitor_vlan 200 #define staff_vlan 100
interface FastEthernet0/11 switchport access vlan 200 no shutdown interface FastEthernet0/12 switchport access vlan 200 no shutdown interface FastEthernet0/13 switchport access vlan 200 no shutdown interface FastEthernet0/14 switchport access vlan 200 no shutdown interface FastEthernet0/15 switchport access vlan 200 no shutdown interface FastEthernet0/16 switchport access vlan 200 no shutdown interface FastEthernet0/17 switchport access vlan 200 no shutdown interface FastEthernet0/18 switchport access vlan 200 no shutdown interface FastEthernet0/19 switchport access vlan 200 no shutdown interface FastEthernet0/20 switchport access vlan 200 no shutdown interface FastEthernet0/21 switchport access vlan 100 no shutdown interface FastEthernet0/22 switchport access vlan 100 no shutdown interface FastEthernet0/23 switchport access vlan 100 no shutdown interface FastEthernet0/24 switchport access vlan 100 no shutdown interface FastEthernet0/25 switchport access vlan 100 no shutdown
Download (plain text) - console version
Download - Tkinter (gui) version - Windows
The Tkinter version is windows only due to its use of the win32 clipboard and dialog boxes. If you want to rip all that stuff out it will probably work on Linux etc as well without too much trouble.