mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 15:41:13 +02:00
2023-04-12 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDUpload::createDestinationDirs()' method. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Test Rivendell file uploading.
|
||||
//
|
||||
// (C) Copyright 2010-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -36,6 +36,7 @@ MainObject::MainObject(QObject *parent)
|
||||
password="";
|
||||
RDUpload::ErrorCode conv_err;
|
||||
use_identity_file=false;
|
||||
create_dirs=false;
|
||||
|
||||
//
|
||||
// Open the Database
|
||||
@@ -66,6 +67,10 @@ MainObject::MainObject(QObject *parent)
|
||||
use_identity_file=true;
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--create-dirs") {
|
||||
create_dirs=true;
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--source-file") {
|
||||
source_filename=rda->cmdSwitch()->value(i);
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
@@ -100,6 +105,7 @@ MainObject::MainObject(QObject *parent)
|
||||
RDUpload *conv=new RDUpload(rda->config(),this);
|
||||
conv->setSourceFile(source_filename);
|
||||
conv->setDestinationUrl(destination_url);
|
||||
conv->createDestinationDirs(create_dirs);
|
||||
printf("Uploading...\n");
|
||||
conv_err=conv->
|
||||
runUpload(username,password,ssh_identity_filename,use_identity_file,
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Test Rivendell file uploading
|
||||
//
|
||||
// (C) Copyright 2010,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#define UPLOAD_TEST_USAGE "[options]\n\nTest the Rivendell upload routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--source-file=<filename>\n\n--destination-url=<url>\n\n"
|
||||
#define UPLOAD_TEST_USAGE "[options]\n\nTest the Rivendell upload routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--create-dirs\n\n--source-file=<filename>\n\n--destination-url=<url>\n\n"
|
||||
|
||||
class MainObject : public QObject
|
||||
{
|
||||
@@ -35,6 +35,7 @@ class MainObject : public QObject
|
||||
private:
|
||||
QString username;
|
||||
QString password;
|
||||
bool create_dirs;
|
||||
QString source_filename;
|
||||
QString destination_url;
|
||||
QString ssh_identity_filename;
|
||||
|
Reference in New Issue
Block a user