Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90367351
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
Fri, Nov 1, 00:43
Size
424 B
Mime Type
text/x-python
Expires
Sun, Nov 3, 00:43 (2 d)
Engine
blob
Format
Raw Data
Handle
22063131
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