Skip to content

mpwillson/pcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pCloud Utilities

This project hosts a number (well, two) of utilities for users of pCloud.

They are:

playlist.py : Converts m3u playlists to pCloud collection playlists. See the README_playlist.md file for details.

token.py : Manages pCloud authentication tokens. See the README_token.md file for details.

REQUIREMENTS

  • Requires Python version 3.8 or later.
  • Operates on UNIX platforms (Linux, FreeBSD).

COMMON OPTIONS

These options are supported by each pcloud utility:

-e endpoint : Set endpoint for pCloud API. Default is https://eapi.pcloud.com

-f config-file : Set name of configuration file. The default is ~/.config/pcloud.json. If the configuration file does not exist, it will be created with the default options. See CONFIGURATION, below.

-r : Force login reauthentication. Specify this option if use of the existing authentication token produces a 'Login failed' message. The auth token may have been deleted from the pCloud server. A username (if not already provided in the config-file) and password will be requested. If a username is not present in the config-file, the one entered will be saved.

-t timeout : Set timeout for connections to the pCloud endpoint. Default value is 2, which equates to approximately 10 seconds.

-u username : Set pCloud username. If not set, or the value is empty, a prompt will be issued for the username when it is required. The username entered will be saved to the config-file.

-v : Cause the utility to issue messages on its actions. Default is False.

CONFIGURATION

The default configuration file is ~/.config/pcloud.json. Here's an example with the core configuration options:

{
  "config-file": "~/.config/pcloud.json",
  "endpoint": "https://eapi.pcloud.com",
  "timeout": 2,
  "username": "[email protected]",
  "verbose": false
}

Authentication token details will be added to the configuration file once a successful login is effected. Username and password will not be requred again, until the authentication token expires (one year).

The authentication details are held as:

"auth": {
  "token": "some random string",
  "expires": "Sat Mar 18 21:39:17 2023"
}

The configuration file location can be overridden by the -f command option. Options provided on the command line override those obtained from the configuration file.

If the named config-file does not exist, the default internal configuration options will be written to the file.

Utility programs may add their own specific configuration elements to the config-file. See their README files for details.

About

Clients for pCloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages