File tree 1 file changed +18
-8
lines changed
1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 1
- import sys
2
- import traceback
3
- import os
1
+ #!/usr/bin/env python3
2
+ # vim: set fileencoding=utf-8:
3
+
4
+ """
5
+ Deduplicate the files in www/l by moving unique files up a level and symlinking
6
+ to them
7
+ """
8
+
9
+ # Standard library
4
10
from pathlib import Path
5
- import hashlib
6
11
from shutil import copyfile
12
+ import hashlib
13
+ import os
14
+ import sys
15
+ import traceback
16
+
7
17
8
18
EURO = [
9
19
"b9f4175382a404007e19d3566061e36c" ,
@@ -45,8 +55,8 @@ def main():
45
55
relative = Path (f ).relative_to (path )
46
56
47
57
# Joins the first and last part of the file parts
48
- # so it can be used moving the file to the parent license folder
49
- # because some files are under 2 sub-directories.
58
+ # so it can be used moving the file to the parent license
59
+ # folder because some files are under 2 sub-directories.
50
60
# by-nc/1.0/80x15.png --> by-nc - first
51
61
# x 1.0
52
62
# --> 80x15.png - last
@@ -56,8 +66,8 @@ def main():
56
66
)
57
67
)
58
68
59
- # If the file contains an euro symbol, add -e tag to the end of file
60
- # to avoid the overwriting.
69
+ # If the file contains an euro symbol, add -e tag to the end of
70
+ # the file to avoid the overwriting.
61
71
if digest in EURO :
62
72
parent = Path (str (parent ).replace (".png" , "-e.png" ))
63
73
You can’t perform that action at this time.
0 commit comments