diff --git a/rangitaki-sync.h b/rangitaki-sync.h index 731e472..2d583a8 100644 --- a/rangitaki-sync.h +++ b/rangitaki-sync.h @@ -1,37 +1,18 @@ -/* Rangitaki Sync Library +/* + * Rangitaki Sync Library * - * A program for downloading and uploading blog posts, - * blogs file and media files from a rangitaki blog. + * A program for downloading and uploading files over ssh. + * Written for the Rangitaki blogging engine. * * Proudly written in C and with use of libssh (libssh.org) * * Version: 0.1 * - * Authors: + * COPYRIGHT (c) 2015 - 2016 The Rangitaki Project + * COPYRIGHT (c) 2015 - 2016 Marcel Kapfer (mmk2410) + * * - * COPYRIGHT (c) 2015 The Rangitaki Project - * COPYRIGHT (c) 2015 Marcel Kapfer (mmk2410) - * - * License: MIT License - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * MIT License * */ diff --git a/rsl-download-test.c b/rsl-download-test.c index 0b40946..875f32e 100644 --- a/rsl-download-test.c +++ b/rsl-download-test.c @@ -1,39 +1,20 @@ -/* Rangitaki Sync Library +/* + * Rangitaki Sync Library * - * Download Test + * Download Test / Example * - * A program for downloading and uploading blog posts, - * blogs file and media files from a rangitaki blog. + * A program for downloading and uploading files over ssh. + * Written for the Rangitaki blogging engine. * * Proudly written in C and with use of libssh (libssh.org) * * Version: 0.1 * - * Authors: + * COPYRIGHT (c) 2015 - 2016 The Rangitaki Project + * COPYRIGHT (c) 2015 - 2016 Marcel Kapfer (mmk2410) + * * - * COPYRIGHT (c) 2015 The Rangitaki Project - * COPYRIGHT (c) 2015 Marcel Kapfer (mmk2410) - * - * License: MIT License - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * MIT License * */ @@ -47,7 +28,8 @@ #define MAX_DATA 512 -int run(const char *host, const char *user, const char *password, const char *remote_dir, const int port) +int run(const char *host, const char *user, const char *password, + const char *remote_dir, const int port) { // Print the ssh struct ssh_data *data = malloc(sizeof(ssh_data)); @@ -101,8 +83,9 @@ int main(int argc, char *argv[]) printf("RANGITAKI SYNC LIBRARY\n"); printf("Version: 0.1\n"); - printf("COPYRIGHT (c) 2015 The Rangitaki Project\n"); - printf("COPYRIGHT (c) 2015 Marcel Kapfer (mmk2410) \n"); + printf("COPYRIGHT (c) 2015 - 2016 The Rangitaki Project\n"); + printf("COPYRIGHT (c) 2015 - 2016 Marcel Kapfer (mmk2410)" + " \n"); printf("MIT License\n\n"); printf("RSL Download test\n\n"); @@ -142,6 +125,8 @@ int main(int argc, char *argv[]) run(host, user, password, remote_dir, port); + printf("\nFile downloaded to /tmp/rangitaki-sync.\n"); + return 0; error: diff --git a/rsl-upload-test.c b/rsl-upload-test.c index ddf76f5..72a9fd4 100644 --- a/rsl-upload-test.c +++ b/rsl-upload-test.c @@ -1,6 +1,7 @@ -/* Rangitaki Sync Library +/* + * Rangitaki Sync Library * - * Upload Test + * Upload Test / Example * * A program for downloading and uploading blog posts, * blogs file and media files from a rangitaki blog. @@ -9,31 +10,11 @@ * * Version: 0.1 * - * Authors: + * COPYRIGHT (c) 2015 - 2016 The Rangitaki Project + * COPYRIGHT (c) 2015 - 2016 Marcel Kapfer (mmk2410) + * * - * COPYRIGHT (c) 2015 The Rangitaki Project - * COPYRIGHT (c) 2015 Marcel Kapfer (mmk2410) - * - * License: MIT License - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * MIT License * */ @@ -43,13 +24,14 @@ #include #include #include + #include "rangitaki-sync.h" #include "dbg.h" #define MAX_DATA 512 - int run(const char *host, const char *user, const char *password, const char *remote_dir, - const char *local_dir, const int port) + int run(const char *host, const char *user, const char *password, + const char *remote_dir, const char *local_dir, const int port) { // Print the ssh struct ssh_data *data = malloc(sizeof(ssh_data)); @@ -106,7 +88,7 @@ int main(int argc, char *argv[]) printf("COPYRIGHT (c) 2015 The Rangitaki Project\n"); printf("COPYRIGHT (c) 2015 Marcel Kapfer (mmk2410) \n"); printf("MIT License\n\n"); - printf("RSL Download test\n\n"); + printf("RSL Upload test\n\n"); char *in = NULL; int rc = 0;