Update manifests and modules

This commit is contained in:
erinhmclark
2025-01-24 12:58:16 +00:00
parent ba4b330881
commit aa7ca93a43
95 changed files with 172 additions and 115 deletions

View File

@@ -0,0 +1 @@
from .gdrive_storage import GDriveStorage

View File

@@ -1,4 +1,4 @@
m = {
{
"name": "Google Drive Storage",
"type": ["storage"],
"requires_setup": True,
@@ -12,15 +12,16 @@ m = {
],
},
"configs": {
"path_generator": {
"default": "url",
"help": "how to store the file in terms of directory structure: 'flat' sets to root; 'url' creates a directory based on the provided URL; 'random' creates a random directory.",
},
"filename_generator": {
"default": "random",
"help": "how to name stored files: 'random' creates a random string; 'static' uses a replicable strategy such as a hash.",
},
# TODO: get base storage configs
"path_generator": {
"default": "url",
"help": "how to store the file in terms of directory structure: 'flat' sets to root; 'url' creates a directory based on the provided URL; 'random' creates a random directory.",
"choices": ["flat", "url", "random"],
},
"filename_generator": {
"default": "random",
"help": "how to name stored files: 'random' creates a random string; 'static' uses a replicable strategy such as a hash.",
"choices": ["random", "static"],
},
"root_folder_id": {"default": None, "help": "root google drive folder ID to use as storage, found in URL: 'https://drive.google.com/drive/folders/FOLDER_ID'"},
"oauth_token": {"default": None, "help": "JSON filename with Google Drive OAuth token: check auto-archiver repository scripts folder for create_update_gdrive_oauth_token.py. NOTE: storage used will count towards owner of GDrive folder, therefore it is best to use oauth_token_filename over service_account."},
"service_account": {"default": "secrets/service_account.json", "help": "service account JSON file path, same as used for Google Sheets. NOTE: storage used will count towards the developer account."},

View File

@@ -10,7 +10,7 @@ from google.oauth2.credentials import Credentials
from google.auth.transport.requests import Request
from auto_archiver.core import Media
from auto_archiver.base_modules import Storage
from auto_archiver.base_processors import Storage
class GDriveStorage(Storage):