MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / UI

Function UI

src/bitmessagecli.py:1296–1735  ·  view source on GitHub ↗
(usrInput)

Source from the content-addressed store, hash-verified

1294
1295
1296def UI(usrInput): #Main user menu
1297 global usrPrompt
1298
1299 if usrInput == "help" or usrInput == "h" or usrInput == "?":
1300 print ' '
1301 print ' -------------------------------------------------------------------------'
1302 print ' | https://github.com/Dokument/PyBitmessage-Daemon |'
1303 print ' |-----------------------------------------------------------------------|'
1304 print ' | Command | Description |'
1305 print ' |------------------------|----------------------------------------------|'
1306 print ' | help | This help file. |'
1307 print ' | apiTest | Tests the API |'
1308 print ' | addInfo | Returns address information (If valid) |'
1309 print ' | bmSettings | BitMessage settings |'
1310 print ' | exit | Use anytime to return to main menu |'
1311 print ' | quit | Quits the program |'
1312 print ' |------------------------|----------------------------------------------|'
1313 print ' | listAddresses | Lists all of the users addresses |'
1314 print ' | generateAddress | Generates a new address |'
1315 print ' | getAddress | Get determinist address from passphrase |'
1316 print ' |------------------------|----------------------------------------------|'
1317 print ' | listAddressBookEntries | Lists entries from the Address Book |'
1318 print ' | addAddressBookEntry | Add address to the Address Book |'
1319 print ' | deleteAddressBookEntry | Deletes address from the Address Book |'
1320 print ' |------------------------|----------------------------------------------|'
1321 print ' | subscribe | Subscribes to an address |'
1322 print ' | unsubscribe | Unsubscribes from an address |'
1323 #print' | listSubscriptions | Lists all of the subscriptions. |'
1324 print ' |------------------------|----------------------------------------------|'
1325 print ' | create | Creates a channel |'
1326 print ' | join | Joins a channel |'
1327 print ' | leave | Leaves a channel |'
1328 print ' |------------------------|----------------------------------------------|'
1329 print ' | inbox | Lists the message information for the inbox |'
1330 print ' | outbox | Lists the message information for the outbox |'
1331 print ' | send | Send a new message or broadcast |'
1332 print ' | unread | Lists all unread inbox messages |'
1333 print ' | read | Reads a message from the inbox or outbox |'
1334 print ' | save | Saves message to text file |'
1335 print ' | delete | Deletes a message or all messages |'
1336 print ' -------------------------------------------------------------------------'
1337 print ' '
1338 main()
1339
1340 elif usrInput == "apitest": #tests the API Connection.
1341 if (apiTest() == True):
1342 print '\n API connection test has: PASSED\n'
1343 else:
1344 print '\n API connection test has: FAILED\n'
1345 main()
1346
1347 elif usrInput == "addinfo":
1348 tmp_address = userInput('\nEnter the Bitmessage Address.')
1349 address_information = api.decodeAddress(tmp_address)
1350 address_information = eval(address_information)
1351
1352 print '\n------------------------------'
1353

Callers 1

mainFunction · 0.85

Calls 15

apiTestFunction · 0.85
userInputFunction · 0.85
bmSettingsFunction · 0.85
listAddFunction · 0.85
genAddFunction · 0.85
getAddressFunction · 0.85
subscribeFunction · 0.85
unsubscribeFunction · 0.85
listSubscriptionsFunction · 0.85
createChanFunction · 0.85
joinChanFunction · 0.85
leaveChanFunction · 0.85

Tested by

no test coverage detected