This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32com.client as c | |
vsApp = c.gencache.EnsureDispatch('Visio.Application') | |
vsApp.Visible = True | |
path = r'https://woodsideenergy-my.sharepoint.com/personal/ricardo_dapaz_woodside_com_au/Documents/Desktop/ABB Transmittal-AU-33220002-AUABB-WSE-00001/LNADs/VA6000DJ0076.XXX1~.vsd' | |
dwg = vsApp.Documents.Open(path) | |
pge = dwg.Pages('Drawing') | |
x_diff = 144.64 | |
x_steps = 24.0 | |
x_step_diff = float(x_diff/x_steps) | |
x_start_step = 9.84 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32com.client as c | |
vsApp = c.gencache.EnsureDispatch('Visio.Application') | |
vsApp.Visible = True | |
path = r'<file and path>.vsd' | |
dwg = vsApp.Documents.Open(path) | |
# TODO this range gets changed depending on the guides which need to be dragged and dropped on the sheet | |
guides = [f'Sheet.{x}' for x in range(1474, 1492)] | |
print(guides) | |
print(dwg.Pages('<TheSheet>').Name) | |
refShape = 'REFGUIDE' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
rex = re.compile(r'([A-Za-z ]+)(?:[\., ]+)?([pPaAgGeE]{4},?(?:[\., ])?\d\d?\d?)') | |
# Info below comes from Otter text export (no reader ID, no timestamp) | |
# Topics are read out and then Page Number are read at the end | |
# Does reasonable job | |
data = """ | |
ICS concepts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32com.client as c | |
import pprint | |
import re | |
class Util: | |
@staticmethod | |
def pretty_printer(o): | |
pp = pprint.PrettyPrinter(indent=4) | |
pp.pprint(o) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import os | |
import sys | |
import pprint | |
import win32com.client | |
import yaml | |
def pretty_printer(o): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import win32com.client as c | |
subs = """ | |
One|1 | |
Two|2 | |
""".splitlines() | |
subs = {k: v for k, v in [y.split('|') for y in subs if len(y) > 0]} | |
xlApp = c.gencache.EnsureDispatch('Excel.Application') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import win32com.client as c | |
from jinja2 import FileSystemLoader, Environment, Template | |
xlApp = c.gencache.EnsureDispatch('Excel.Application') | |
xlApp.Visible = True | |
path = r'path.xlsx' | |
wk = xlApp.Workbooks.Open(path) | |
sh = wk.Worksheets('Sheet1 (2)') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import win32com.client as c | |
class VisioDrawing: | |
def __init__(self, path, pageName): | |
self.path = path | |
self.vsdApp = c.gencache.EnsureDispatch('Visio.Application') | |
self.vsdApp.Visible = True | |
self.vsd = self.vsdApp.Documents.Open(path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set cli pager off | |
set cli config-output-format set | |
configure | |
show |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/osoyoo-robot/cam-robot/mjpg-streamer/ | |
sudo ./start.sh | |
sudo webiopi -d -c /etc/webiopi/config | |
Then navigate to http:10.11.12.122:8000 |