summaryrefslogtreecommitdiff
path: root/libs/ardour/export_handler.cc
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2013-10-07 20:28:13 +0100
committerColin Fletcher <colin.m.fletcher@googlemail.com>2013-10-07 20:28:13 +0100
commit2a93f7a25e63c796745c4a34ebc13239382ba2df (patch)
tree9ebc4a503ee4adf8cef24fedc9cdd1fe738fb261 /libs/ardour/export_handler.cc
parent8b9a1fae6a580b526b3fc784581e6d0c8031b6db (diff)
Rudimentary post-processing of exported files.
Export format contains a string to be passed to system() after expanding %1, %2, & %3 via string_compose() to the full path & filename, containing directory, and basename respectively. No error-checking or any niceties like that - real programmers will of course always type the command correctly, and know to watch Ardour's standard output for the results...
Diffstat (limited to 'libs/ardour/export_handler.cc')
-rw-r--r--libs/ardour/export_handler.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index 7ca6cb8c53..042edaf788 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -293,6 +293,16 @@ ExportHandler::finish_timespan ()
export_cd_marker_file (current_timespan, fmt, filepath, CDMarkerTOC);
}
+ if (!fmt->command().empty()) {
+ std::string command = string_compose(fmt->command(),
+ filepath,
+ Glib::path_get_dirname(filepath),
+ PBD::basename_nosuffix(filepath)
+ );
+ std::cerr << "running command: " << command << "..." << std::endl;
+ system(command.c_str());
+ }
+
if (fmt->upload()) {
SoundcloudUploader *soundcloud_uploader = new SoundcloudUploader;
std::string token = soundcloud_uploader->Get_Auth_Token(upload_username, upload_password);