-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmajExtFiles.py
More file actions
31 lines (27 loc) · 820 Bytes
/
majExtFiles.py
File metadata and controls
31 lines (27 loc) · 820 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
#!/usr/bin/python3.6
# -*- coding: utf-8 -*-
from fileJs import FileJs
# comparer les fichiers copiés entre les extensions et site-dp
textFctFiles =[
's/library-js\\textFct.js',
'w/all-md-perso-va\\textFct 2025.js',
'w/all-md-perso-va\\textFct 2023.js'
]
htmlFctFiles =[
's/library-js\\htmlFct.js',
'w/all-md-perso-va\\htmlFct 2025.js',
'w/all-md-perso-va\\htmlFct 2023.js'
]
def compareFiles (fileNameList):
fileRange = range (len (fileNameList))
fileList =[]
# ouvrir les fichiers
for f in fileRange:
fileList.append (FileJs (fileNameList[f]))
fileList[-1].read()
fileList[-1].title = fileList[-1].title +" "+ str(f)
fileList[-1].toPath()
# faire les comparaisons deux à deux
for f in fileRange[:-1]:
for g in fileRange[f+1:]: fileList[f].comparer (fileList[g])
compareFiles (textFctFiles)