File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,9 @@ def give_hashblake(file_in, with_this):
22
22
23
23
if __name__ == '__main__' :
24
24
if len (sys .argv ) < 2 :
25
- print (
26
- "Usage: "
27
- + sys .argv [0 ]
28
- + " github-user [github-project]"
29
- )
25
+ print ( "Usage: hash.py files_to_copte_hash" )
30
26
exit (1 )
31
- file = sys .argv [1 ]
27
+ files = [ str ( i ) for i in sys .argv [1 :] if str ( i )[ - 3 :]. lower () != ".py" ]
32
28
33
29
header = (
34
30
" MD5"
@@ -53,7 +49,8 @@ def give_hashblake(file_in, with_this):
53
49
print (header )
54
50
print (line )
55
51
56
- print ("" +
52
+ for file in files :
53
+ print ("" +
57
54
f"{ give_hash (file , hashlib .md5 )} | " +
58
55
f"{ give_hash (file , hashlib .sha1 )} | " +
59
56
f"{ give_hash (file , hashlib .sha256 )} | " +
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ call C:\WPy64-3890\scripts\env.bat
3
3
cd %~dp0
4
4
5
5
rem echo %date% %time%>> gdc_counting.txt
6
- python hash.py %1 >> hash_counting_%date:/ =_ % .txt
6
+ python hash.py %* >> hash_counting_%date:/ =_ % .txt
7
7
8
8
start notepad.exe hash_counting_%date:/ =_ % .txt
You can’t perform that action at this time.
0 commit comments