Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7539048
sources.py
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
421 B
Referenced Files
None
Subscribers
None
sources.py
View Options
import
sys
,
os
,
glob
,
json
data
=
json
.
load
(
open
(
sys
.
argv
[
1
]))
group
=
data
[
sys
.
argv
[
2
]]
base
=
sys
.
argv
[
3
]
if
len
(
sys
.
argv
)
>
3
else
''
matched
=
set
()
for
p
in
group
[
'patterns'
]:
full
=
os
.
path
.
join
(
base
,
p
)
if
base
else
p
matched
.
update
(
glob
.
glob
(
full
,
recursive
=
True
))
excluded
=
set
(
os
.
path
.
join
(
base
,
e
)
if
base
else
e
for
e
in
group
.
get
(
'exclude'
,
[]))
matched
-=
excluded
print
(
'
\n
'
.
join
(
sorted
(
matched
)))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 17, 1:12 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
517887
Default Alt Text
sources.py (421 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment