Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92819683
get_phid.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 23, 23:09
Size
412 B
Mime Type
text/x-python
Expires
Mon, Nov 25, 23:09 (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
22490753
Attached To
rPHAPI Phabricator API scripts
get_phid.py
View Options
#!/usr/bin/env python2
import
sys
from
phabricator
import
Phabricator
arg
=
sys
.
argv
[
1
:]
if
len
(
arg
)
==
0
:
print
(
'''Usage:
%s <name> [<name>]
Examples:
./get_phid.py @username
./get_phid.py rPHCODE
./get_phid.py D29 D23 D15
'''
%
sys
.
argv
[
0
])
sys
.
exit
(
0
)
phab
=
Phabricator
()
phids
=
phab
.
phid
.
lookup
(
names
=
arg
)
for
i
in
phids
.
items
():
print
(
'
%s
:
%s
'
%
(
i
[
0
],
i
[
1
][
'phid'
]))
Event Timeline
Log In to Comment