import sys

from parser import read_board, read_geometries


def print_instruction():
    print("Simple board and component file parser into json. Usage:\r\n\r\n"
          "python3 parser.py <component_file> <board_file>\r\n\r\n"
          "output can be streamed into a file manually.")

if len(sys.argv) != 3:
    print_instruction()
    exit()

components_file = sys.argv[1]
components_lines = [line.rstrip('\n') for line in open(components_file)]
board_file = sys.argv[2]
board_lines = [line.rstrip('\n') for line in open(board_file)]

component_geometries = read_geometries(components_lines)
component_board = read_board(board_lines, component_geometries)
print(component_board.to_json())

4cec345d9ff480f825f9e3245ef5a0608c7a2bb1
<mask token>


def print_instruction():
    print(
        'Simple board and component file parser into json. Usage:\r\n\r\npython3 parser.py <component_file> <board_file>\r\n\r\noutput can be streamed into a file manually.'
        )


<mask token>

<mask token>


def print_instruction():
    print(
        'Simple board and component file parser into json. Usage:\r\n\r\npython3 parser.py <component_file> <board_file>\r\n\r\noutput can be streamed into a file manually.'
        )


if len(sys.argv) != 3:
    print_instruction()
    exit()
<mask token>
print(component_board.to_json())

<mask token>


def print_instruction():
    print(
        'Simple board and component file parser into json. Usage:\r\n\r\npython3 parser.py <component_file> <board_file>\r\n\r\noutput can be streamed into a file manually.'
        )


if len(sys.argv) != 3:
    print_instruction()
    exit()
components_file = sys.argv[1]
components_lines = [line.rstrip('\n') for line in open(components_file)]
board_file = sys.argv[2]
board_lines = [line.rstrip('\n') for line in open(board_file)]
component_geometries = read_geometries(components_lines)
component_board = read_board(board_lines, component_geometries)
print(component_board.to_json())

import sys
from parser import read_board, read_geometries


def print_instruction():
    print(
        'Simple board and component file parser into json. Usage:\r\n\r\npython3 parser.py <component_file> <board_file>\r\n\r\noutput can be streamed into a file manually.'
        )


if len(sys.argv) != 3:
    print_instruction()
    exit()
components_file = sys.argv[1]
components_lines = [line.rstrip('\n') for line in open(components_file)]
board_file = sys.argv[2]
board_lines = [line.rstrip('\n') for line in open(board_file)]
component_geometries = read_geometries(components_lines)
component_board = read_board(board_lines, component_geometries)
print(component_board.to_json())

import sys

from parser import read_board, read_geometries


def print_instruction():
    print("Simple board and component file parser into json. Usage:\r\n\r\n"
          "python3 parser.py <component_file> <board_file>\r\n\r\n"
          "output can be streamed into a file manually.")

if len(sys.argv) != 3:
    print_instruction()
    exit()

components_file = sys.argv[1]
components_lines = [line.rstrip('\n') for line in open(components_file)]
board_file = sys.argv[2]
board_lines = [line.rstrip('\n') for line in open(board_file)]

component_geometries = read_geometries(components_lines)
component_board = read_board(board_lines, component_geometries)
print(component_board.to_json())
