Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F217176
manifold.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
manifold.py
View Options
#!/usr/bin/python3
# Licensed under copyleft-next 0.3.1
# Import standard modules
import
json
,
os.path
# Requires python3-requests
import
requests
# Lets make this all GUI!
from
PySide2.QtGui
import
QGuiApplication
from
PySide2.QtQml
import
QQmlApplicationEngine
from
PySide2.QtQml
import
qmlRegisterType
from
PySide2.QtCore
import
QStringListModel
if
__name__
==
"__main__"
:
print
(
"Here we go..."
)
apitoken
=
open
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
+
"/phabricator-apitoken"
,
'r'
)
.
read
()
.
rstrip
()
mqurl
=
"https://phabricator.keithzg.ca/api/maniphest.query"
r
=
requests
.
post
(
mqurl
,
data
=
{
"api.token"
:
apitoken
,
"order"
:
"order-priority"
,
"status"
:
"status-open"
})
taskdetails
=
json
.
loads
(
r
.
text
)
tasklist
=
[]
tds
=
taskdetails
[
"result"
]
for
t
in
tds
:
tasklist
.
append
(
tds
[
t
][
"objectName"
]
+
": "
+
tds
[
t
][
"title"
])
app
=
QGuiApplication
()
engine
=
QQmlApplicationEngine
()
model
=
QStringListModel
()
model
.
setStringList
(
tasklist
)
context
=
engine
.
rootContext
()
context
.
setContextProperty
(
"myModel"
,
model
)
context
.
setContextProperty
(
"taskJson"
,
tds
)
engine
.
load
(
"manifold.qml"
)
if
len
(
engine
.
rootObjects
())
==
0
:
quit
()
app
.
exec_
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sun, Apr 27, 1:12 PM (19 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
153993
Default Alt Text
manifold.py (1 KB)
Attached To
Mode
rMANIFOLD Manifold
Attached
Detach File
Event Timeline
Log In to Comment