From 6681017a6ef5fbb4c3f828cfaa3dac5ad930273a Mon Sep 17 00:00:00 2001
From: Apollo-Roboto <41392253+Apollo-Roboto@users.noreply.github.com>
Date: Sat, 6 May 2023 14:22:32 -0400
Subject: [PATCH 01/22] py-script experimentation
---
web/index.html | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 web/index.html
diff --git a/web/index.html b/web/index.html
new file mode 100644
index 0000000..2d109b3
--- /dev/null
+++ b/web/index.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+ packages = ["matplotlib", "pandas"]
+
+
+
+
+
+
+ from datetime import datetime
+
+ def current_time():
+ now = datetime.now()
+
+ # Get paragraph element by id
+ paragraph = Element('current-time')
+
+ # Add current time to the paragraph element
+ paragraph.write(now.strftime('%Y-%m-%d %H:%M:%S'))
+
+
+
+
+
+
\ No newline at end of file
From f8594fe521517f404156b1bc62560dde8c34c2d0 Mon Sep 17 00:00:00 2001
From: Apollo-Roboto <41392253+Apollo-Roboto@users.noreply.github.com>
Date: Mon, 17 Jul 2023 17:08:54 -0400
Subject: [PATCH 02/22] added pathschema to preview
---
web/index.html | 121 ++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 94 insertions(+), 27 deletions(-)
diff --git a/web/index.html b/web/index.html
index 2d109b3..2ff26df 100644
--- a/web/index.html
+++ b/web/index.html
@@ -1,37 +1,104 @@
-
-
-
-
- Document
-
-
-
-
-
-
- packages = ["matplotlib", "pandas"]
-
-
-
-
-
-
- from datetime import datetime
+
+
+
+
+ Document
+
+
+
+
+
+
+ packages = ["matplotlib", "pandas", "pathschema==0.2.0"]
+
+
+
+
+
+
+
+
+
+
- def current_time():
- now = datetime.now()
+
+
+ from pathlib import Path
+ from datetime import datetime
+ from pathschema import validate
+
+ schema_input_element = Element('schema-input')
+ schema_parse_error_element = Element('schema-parse-error')
+ validation_error_element = Element('validation-error')
- # Get paragraph element by id
- paragraph = Element('current-time')
+ def current_time():
+ now = datetime.now()
+
+ # Get paragraph element by id
+ paragraph = Element('current-time')
+
+ # Add current time to the paragraph element
+ paragraph.write(now.strftime('%Y-%m-%d %H:%M:%S'))
+
+ def do_the_validation():
+
+ results = None
+
+ try:
+
+ schema = schema_input_element.value
+
+ # TODO this wont work
+ results = validate(Path(''), schema)
+
+ except SchemaError as e:
+ # Error in the user schema
+ schema_parse_error_element.write(str(e))
+ return
+ except Exception as e:
+ # Other exceptions
+ print(str(e))
+ return
+
+ if(results.has_error()):
+ show_validation_errors(results)
+ else:
+ clear_validation_errors()
+
+ def clear_validation_errors():
+ validation_error_element.clear()
+
+ def show_validation_errors(errors):
+ text = ''
+
+ for path, errors in results.errors_by_path.items():
+ if(len(errors) > 0 ):
+ text += 'FAIL '
+ else:
+ text += 'OK '
+
+ text += path + '\n'
+
+ for error in errors:
+ text += ' ' + error + '\n'
+
+ validation_error_element.write(text)
- # Add current time to the paragraph element
- paragraph.write(now.strftime('%Y-%m-%d %H:%M:%S'))
+
-
+
+
+
-
+
\ No newline at end of file
From bba0f2ebb72fd842f77071dbc3818aa4238bc436 Mon Sep 17 00:00:00 2001
From: Apollo Roboto <41392253+Apollo-Roboto@users.noreply.github.com>
Date: Tue, 18 Jul 2023 10:35:10 -0400
Subject: [PATCH 03/22] added jstree
---
web/index.html | 156 ++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 142 insertions(+), 14 deletions(-)
diff --git a/web/index.html b/web/index.html
index 2ff26df..3ca04c2 100644
--- a/web/index.html
+++ b/web/index.html
@@ -6,31 +6,67 @@
Document
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- packages = ["matplotlib", "pandas", "pathschema==0.2.0"]
-
-
HERE LIES THE TREE
+
+
+ -
+ root
+
+ - file1
+ - file2
+ - file3
+ -
+ folder
+
+
+
+
+
+
-
+
+
-
-
-
+
+
+
+
+
+
+ packages = ["matplotlib", "pandas", "pathschema==0.2.0"]
+
from pathlib import Path
from datetime import datetime
@@ -95,10 +131,102 @@
-
-
-
+
-