-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplyRegexesToFolder.py
42 lines (31 loc) · 1.5 KB
/
applyRegexesToFolder.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import applyRegexToFolder as Apply
import shutil
#inputFolder = 'test'
outputFolder = r'/Users/luxionkeyshot/work/source/luxion/src'
#shutil.rmtree(outputFolder, True)
#shutil.copytree(inputFolder, outputFolder)
Apply.setExtensionFilter(['cpp', 'hpp', 'h', 'c', 'cc'])
Apply.setParameters(outputFolder, outputFolder, r'(LUX_(SVG_)?ICON)\("([^"]+?)(\.svg)?(\.png)?"\)', r'\1("\3")', False, True)
Apply.run()
#flow
#['Connection', 'DataModelRegistry', 'Graph', 'Node', 'NodeData', 'NodeDataModel', 'NodeInput', 'NodeModelBase', 'NodeOutput', 'NodeState', 'PortType']
#nodeeditor
#['ConnectionBlurEffect', 'ConnectionGeometry', 'ConnectionGraphicsObject', 'ConnectionPainter', 'ConnectionState', 'ConnectionStyle', 'Export', 'FlowScene', 'FlowView', 'FlowViewDragHelper', 'FlowViewStyle', 'NodeConnectionInteraction', 'NodeGeometry', 'NodeGraphics', 'NodeGraphics_ViewFrameworkImpl', 'NodePainter', 'NodePainterDelegate', 'NodeStyle', 'Properties', 'Style', 'StyleCollection']
'''
(
{
{ "Ô",OperatorData().type(), Flow::NodeInput::REQUIRED },
{ "ψ",StateData().type(), Flow::NodeInput::REQUIRED }
},
{
{ "",StateData().type() }
}
)
'''
'''
for className in ['ConnectionBlurEffect']:
#Apply.setParameters(outputFolder, outputFolder, r'([^a-zA-Z/])' + className + r'([^a-zA-Z\.])', r'\1QtNodes::' + className + r'\2')
#Apply.run()
Apply.setParameters(outputFolder, outputFolder, r'(Flow::NodeDataModel.*?\t\(.*[^\t\n])(.*?\t\))', r'\1,\n\t\tgraphManager\2', _isDotMatchingAll=True)
Apply.run()
'''