From 6ca4d3d1328556b7ff1d994001451dd473b40ccb Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sat, 28 Dec 2019 20:55:43 -0500 Subject: Syntax highlight example code in README --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 922b583..64d6e8d 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,22 @@ Tools to handle Gerber and Excellon files in Python. Usage Example: --------------- - import gerber - from gerber.render import GerberCairoContext - # Read gerber and Excellon files - top_copper = gerber.read('example.GTL') - nc_drill = gerber.read('example.txt') +```py +import gerber +from gerber.render import GerberCairoContext - # Rendering context - ctx = GerberCairoContext() +# Read gerber and Excellon files +top_copper = gerber.read('example.GTL') +nc_drill = gerber.read('example.txt') - # Create SVG image - top_copper.render(ctx) - nc_drill.render(ctx, 'composite.svg') +# Rendering context +ctx = GerberCairoContext() +# Create SVG image +top_copper.render(ctx) +nc_drill.render(ctx, 'composite.svg') +``` Rendering Examples: ------------------- -- cgit