-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsian-flux.py
More file actions
35 lines (29 loc) · 838 Bytes
/
Copy pathsian-flux.py
File metadata and controls
35 lines (29 loc) · 838 Bytes
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
#!/usr/bin/python3.6
# -*- coding: utf-8 -*-
from fileCls import File
from folderCls import Folder
folderFlux = Folder ('b/rnpp flux')
print (folderFlux.path)
def nettoyerFlux (self):
self.replace ('\t', " ")
self.replace ('\n', " ")
while " " in self.text: self.replace (" "," ")
self.replace (" <", '\n<')
self.replace ('\n</', '</')
self.replace ('></', '>\n</')
Setattr (File, 'nettoyerFlux', nettoyerFlux)
def renommerNvFlux():
folderFlux.get ('flux_pass')
# folderFlux.get ('recapPDF')
folderFlux.read()
for flux in folderFlux:
flux.title = "rnpp o "+ flux.path[28:-9] +" flux"
flux.path = folderFlux.path +'\t.xml'
flux.nettoyerFlux()
folderFlux.write()
def nettoyerFluxList():
folderFlux.get ('flux.xml')
folderFlux.read()
for flux in folderFlux: flux.nettoyerFlux()
folderFlux.write()
renommerNvFlux()