A python script that allows for pushing to Join by Joaoapps from the command line.
Project description
A python script that allows for pushing to Join by Joaoapps from the command line.
Requires
Python3
A Join Account
Setup
Run pip3 install joinpython or pip3 install git+https://github.com/Rayquaza01/JoinPython
Run join.py --setup to start the setup (optional)
The Config File
Sample config file:
{
"version": "VERSION",
"apikey": "YOUR_API_KEY",
"default_device": "Phone",
"contacts": {
"Name 1": "5555555555"
},
"devices": {
"Phone": "PHONE_DEVICE_ID",
"Tablet": "TABLET_DEVICE_ID"
}
}
Contacts Setup
{
"Name 1": "5555555555",
"Name 2": "(555) 555-5555",
"Name 3": "+1 555.555.5555"
}
--smscontactname can be used instead of contact setup, but contact setup is still required for --callnumber and --smsnumber
Usage
Run join.py with arguments corresponding to what you want to do. Arguments correspond directly to the Join API (Ex: The clipboard parameter is --clipboard). join.py --help gives a list of accepted arguments.
Irregularities
The deviceNames parameter is used when --deviceId is given a comma separated list of names. deviceIds is never used.
Including a comma anywhere in the --deviceId parameter will force it to use deviceNames, even if you only list one device. join.py -d Phone -c test won’t work without a config file, but join.py -d Phone, -c test will.
--deviceId can take device names (with a config file or comma), groups (group.android, group.all, etc.), or use an ID directly.
--deviceId can be ommitted if you provide a default device in the config file.
--apikey can take an API key or be ommitted to use the key in the config file.
--generateURL prints the Join API URL without actually calling it.
--config allows you to choose what config file to use
As a module
joinpython.listDevices( apikey )
Returns a JSON object of devices from the Join API. It directly returns the response of https://joinjoaomgcd.appspot.com/_ah/api/registration/v1/listDevices
joinpython.request( args )
Example:
#!/usr/bin/env python3
import joinpython
args = {
"deviceId": "DEVICE_ID_HERE",
"apikey": "API_KEY_HERE",
"clipboard": "Clipboard Text",
"find": True
}
response = joinpython.request(args)
Old Version
The older versions did not have version numbers
The contact and device data was stored in two separate files
The config file was stored in the installation directory, not the home folder
It can now be imported as a module without copying the join.py file
Pip handles adding the script to the path automatically
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for joinpython-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 438463075ad0913b64e9932d38ee3ca80bf2afeac9f26cd0909121bb1fb16c6d |
|
MD5 | 3d670aa1005be5a3eaea0763ad51c74a |
|
BLAKE2b-256 | 33456180b3f8a8cd0b9372ee2b4e249feacb42506fd75786bf7ce6cbc408d17f |