#!/usr/bin/python
# -*- coding: utf-8 -*-

import os
from file_manager.vhdl_reader import Vhdl_reader
from decorator.pdfdrawer import PdfDrawer

import sys

print 'Number of arguments:', len(sys.argv), 'arguments.'
print 'Argument List:', str(sys.argv)

filename = str(sys.argv[1])

reader = Vhdl_reader(filename)

drawer = PdfDrawer("%s.pdf" % reader.entity.name, reader.entity)
#!/usr/bin/python
# -*- coding: utf-8 -*-

import os
from file_manager.vhdl_reader import Vhdl_reader
from decorator.pdfdrawer import PdfDrawer

import sys

try:
	filename = str(sys.argv[1])
except:
	filename = "datas/test_files/demo.vhd"

reader = Vhdl_reader(filename)

drawer = PdfDrawer("%s.pdf" % reader.entity.name, reader.entity)

print "The schematic was generated and named : %s.pdf" % reader.entity.name
Add a demo mode : if no vhdl file is given the demo one is used datas/test_files/demo.vhd
Add a demo mode :
if no vhdl file is given the demo one is used
datas/test_files/demo.vhd
