From 2d539a1b9588f0c6abe3bdc3a8a531fdd53030c2 Mon Sep 17 00:00:00 2001 From: Jesse Cirimelli-Low Date: Sat, 20 Oct 2018 14:13:18 -0700 Subject: [PATCH] moved css into a seperate file to organize and disambiguate docstrings from multiline strings --- compiler/datasheet/assets/datasheet.css | 26 +++++++++++++++++++++ compiler/datasheet/datasheet.py | 30 +++---------------------- 2 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 compiler/datasheet/assets/datasheet.css diff --git a/compiler/datasheet/assets/datasheet.css b/compiler/datasheet/assets/datasheet.css new file mode 100644 index 00000000..5d5a04e5 --- /dev/null +++ b/compiler/datasheet/assets/datasheet.css @@ -0,0 +1,26 @@ + + diff --git a/compiler/datasheet/datasheet.py b/compiler/datasheet/datasheet.py index 543c75fa..f9edb5da 100644 --- a/compiler/datasheet/datasheet.py +++ b/compiler/datasheet/datasheet.py @@ -20,34 +20,10 @@ class datasheet(): def generate_html(self): - self.html = """""" + with open(os.path.abspath(os.environ.get("OPENRAM_HOME")) + '/datasheet/assets/datasheet.css', 'r') as datasheet_css: + self.html += datasheet_css.read() + self.html +='

'+ self.name + '.html' + '

' -# self.html +='

{0}

' -# self.html +='

{0}

' self.html +='

Ports and Configuration (DEBUG)

' self.html += in_out(self.io,table_id='data').__html__().replace('<','<').replace('"','"').replace('>',">")