diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,14 +27,6 @@
find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS CoreAddons I18n Config Kirigami2)
-# Debian is a special snow flake and uses nodejs as binary name
-# https://lists.debian.org/debian-devel-announce/2012/07/msg00002.html
-if(EXISTS "/etc/debian_version") # is debian system?
- set(NODEJS_BINARY "nodejs" CACHE PATH "The binary name for the nodejs interpreter")
-else() # sane system
- set(NODEJS_BINARY "node" CACHE PATH "The binary name for the nodejs interpreter")
-endif()
-
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX PURPOSE
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/purpose_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5PurposeConfigVersion.cmake"
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -39,11 +39,6 @@
add_subdirectory(ktp-sendfile)
if (KAccounts_FOUND)
add_subdirectory(youtube)
-
- file(COPY twitter DESTINATION ${CMAKE_CURRENT_BINARY_DIR} PATTERN "main.js.in" EXCLUDE)
- configure_file(twitter/contents/code/main.js.in ${CMAKE_CURRENT_BINARY_DIR}/twitter/contents/code/main.js @ONLY)
- kpackage_install_package(${CMAKE_CURRENT_BINARY_DIR}/twitter Twitter Purpose)
- kaccounts_add_service(${CMAKE_CURRENT_SOURCE_DIR}/twitter-microblog.service.in)
add_subdirectory(nextcloud)
endif()
add_subdirectory(kdeconnect)
diff --git a/src/plugins/twitter-microblog.service.in b/src/plugins/twitter-microblog.service.in
deleted file mode 100644
--- a/src/plugins/twitter-microblog.service.in
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
\ No newline at end of file
diff --git a/src/plugins/twitter/Messages.sh b/src/plugins/twitter/Messages.sh
deleted file mode 100644
--- a/src/plugins/twitter/Messages.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-$XGETTEXT `find . -not -path \*/tests/\* -name \*.cpp -o -name \*.qml -o -name \*.cc -o -name \*.h` -o $podir/purpose_twitter.pot
-
diff --git a/src/plugins/twitter/contents/code/main.js.in b/src/plugins/twitter/contents/code/main.js.in
deleted file mode 100755
--- a/src/plugins/twitter/contents/code/main.js.in
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/env @NODEJS_BINARY@
-
-function processArgs() {
- var ret = {};
- var last;
- var argv = process.argv.slice(2);
- for (var v in argv) {
- var curr = argv[v];
- if (curr.indexOf("--")==0) {
- last = curr;
- } else {
- ret[last] = curr;
- }
- }
- return ret;
-}
-
-function Communication(doStuff) {
- var argsMap = processArgs();
- var path = argsMap["--server"];
-
- var net = require('net');
- var client = new net.Socket();
- client.connect({path: path});
- client.on('data', function(dataStr) {
- doStuff(JSON.parse(dataStr));
- });
- client.on('end', function() { console.warn('disconnected from server'); });
-
- this.send = function(obj) { client.write(JSON.stringify(obj)+'\n'); };
-
- this.setError = function(code, errorText) {
- console.warn('ERROR [%s]', errorText);
- this.send( { error: code, errorText: errorText } );
- process.exit(1);
- };
-
- this.setOutput = function(data) {
- this.send(data);
- process.exit(0);
- };
-}
-
-//-------------------
-
-var comm = new Communication(main);
-
-//Callback functions
-var error = function (err, response, body) {
- comm.setError(1, JSON.stringify(err));
-};
-var postSuccess = function (dataString) {
- var data = JSON.parse(dataString);
- var outputUrl = ("https://twitter.com/"+data.user.screen_name+"/status/"+data.id_str);
- comm.setOutput(comm.send({percent: 100, output: {url: outputUrl} }));
-};
-
-var Twitter = require('twitter-node-client').Twitter;
-
-var twitter = null;
-var message;
-var inputUrls;
-var uploaded = [];
-
-function postIfDone()
-{
- if (uploaded.length === inputUrls.length) {
- comm.send({percent: 90});
- twitter.postTweet({
- status: message,
- media_ids: uploaded
- }
- , error
- , postSuccess
- );
- }
-}
-
-function mediaUploaded(dataString) {
- var data = JSON.parse(dataString)
- uploaded.push(data.media_id_string);
- comm.send({percent: 60});
- postIfDone();
-};
-
-function readUrl(url) {
- var spawn = require('child_process').spawn;
- var kiocat = spawn("kioclient5", ["cat", url], { stdio: ['ignore', 'pipe', 'ignore']});
-
- var contents = []; //array of buffers
- kiocat.stdout.on('data', function (data) { contents.push(data); });
-
- kiocat.on('exit', function (exitCode) {
- if (exitCode!=0) {
- setError(exitCode, "couldn't read: " + url);
- return;
- }
- comm.send({percent: 20});
-
- var allData = Buffer.concat(contents);
- twitter.postMedia(
- { media_data: allData.toString("base64") }
- , error
- , mediaUploaded
- );
- });
-}
-
-function main(data)
-{
- message = data.tweetText;
- inputUrls = data.urls;
- console.log("Connected!");
-
- var config = {
- consumerKey: data.consumerKey,
- consumerSecret: data.consumerSecret,
- accessToken: data.accessToken,
- accessTokenSecret: data.accessTokenSecret,
- callBackUrl: ""
- }
-
- for(var v in config) {
- if (v!="callBackUrl" && config[v]=="") {
- console.log("auth...", config);
- comm.setError(2, "Missing auth information");
- }
- }
-
- twitter = new Twitter(config);
-
- for (var v in inputUrls) {
- readUrl(inputUrls[v])
- }
- postIfDone();
-}
diff --git a/src/plugins/twitter/contents/code/package.json b/src/plugins/twitter/contents/code/package.json
deleted file mode 100644
--- a/src/plugins/twitter/contents/code/package.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "purpose-twitter",
- "version": "1.0.0",
- "description": "",
- "main": "twitter.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "keywords": [],
- "author": "",
- "license": "ISC"
-}
diff --git a/src/plugins/twitter/contents/config/config.qml b/src/plugins/twitter/contents/config/config.qml
deleted file mode 100644
--- a/src/plugins/twitter/contents/config/config.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- Copyright 2015 Aleix Pol Gonzalez
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library. If not, see .
-*/
-
-import QtQuick 2.2
-import QtQuick.Controls 1.2
-import QtQuick.Layouts 1.1
-import org.kde.kquickcontrolsaddons 2.0 as KQCA
-import Ubuntu.OnlineAccounts 0.1 as OA
-
-ColumnLayout
-{
- id: root
-
- property alias tweetText: tweet.text
- property string consumerKey: accts.authData.parameters.ConsumerKey
- property string consumerSecret: accts.authData.parameters.ConsumerSecret
- property var accessToken
- property var accessTokenSecret
-
- property var urls
- property var mimeType
-
- OA.AccountService {
- id: accts
- objectHandle: accountsCombo.enabled && accountsCombo.currentIndex>=0 ? serviceModel.get(accountsCombo.currentIndex, "accountServiceHandle") : null
- onAuthenticated: {
-// console.log("Access token is ", JSON.stringify(reply))
- root.accessToken = reply.AccessToken
- root.accessTokenSecret = reply.TokenSecret
- }
- onAuthenticationError: { console.log("Authentication failed, code " + error.code) }
-
- onAuthDataChanged: {
- authenticate(accts.authData);
- }
- }
-
- Label { text: i18nd("purpose_twitter", "Account:") }
- RowLayout {
- Layout.fillWidth: true
- ComboBox {
- id: accountsCombo
-
- Layout.fillWidth: true
- textRole: "displayName"
- enabled: count>0
- model: OA.AccountServiceModel {
- id: serviceModel
- serviceType: "twitter-microblog"
- }
- }
- Button {
- iconName: "settings-configure"
- onClicked: KQCA.KCMShell.open("kcm_kaccounts");
- }
- }
-
- TextField {
- id: tweet
- Layout.fillWidth: true
- Layout.fillHeight: true
- placeholderText: i18nd("purpose_twitter","What's happening?")
- }
-}
diff --git a/src/plugins/twitter/metadata.json b/src/plugins/twitter/metadata.json
deleted file mode 100644
--- a/src/plugins/twitter/metadata.json
+++ /dev/null
@@ -1,158 +0,0 @@
-{
- "KPlugin": {
- "Authors": [
- {
- "Name": "Aleix Pol",
- "Name[ar]": "Aleix Pol",
- "Name[ca@valencia]": "Aleix Pol",
- "Name[ca]": "Aleix Pol",
- "Name[cs]": "Aleix Pol",
- "Name[da]": "Aleix Pol",
- "Name[de]": "Aleix Pol",
- "Name[el]": "Aleix Pol",
- "Name[en_GB]": "Aleix Pol",
- "Name[es]": "Aleix Pol",
- "Name[et]": "Aleix Pol",
- "Name[eu]": "Aleix Pol",
- "Name[fi]": "Aleix Pol",
- "Name[fr]": "Aleix Pol",
- "Name[gl]": "Aleix Pol",
- "Name[hu]": "Aleix Pol",
- "Name[id]": "Aleix Pol",
- "Name[it]": "Aleix Pol",
- "Name[ko]": "Aleix Pol",
- "Name[lt]": "Aleix Pol",
- "Name[nl]": "Aleix Pol",
- "Name[nn]": "Aleix Pol",
- "Name[pl]": "Aleix Pol",
- "Name[pt]": "Aleix Pol",
- "Name[pt_BR]": "Aleix Pol",
- "Name[ru]": "Aleix Pol",
- "Name[sk]": "Aleix Pol",
- "Name[sv]": "Aleix Pol",
- "Name[tg]": "Алекс Пол (Aleix Pol)",
- "Name[tr]": "Aleix Pol",
- "Name[uk]": "Aleix Pol",
- "Name[x-test]": "xxAleix Polxx",
- "Name[zh_CN]": "Aleix Pol",
- "Name[zh_TW]": "Aleix Pol"
- }
- ],
- "Category": "Utilities",
- "Description": "Shares media on Twitter.",
- "Description[ar]": "شارِك الوسائط على «تويتر».",
- "Description[ca@valencia]": "Comparteix fitxers multimèdia al Twitter.",
- "Description[ca]": "Comparteix fitxers multimèdia al Twitter.",
- "Description[cs]": "Sdílí média na Twitteru.",
- "Description[da]": "Deler medier på Twitter.",
- "Description[de]": "Gibt die Medien auf Twitter frei.",
- "Description[el]": "Διαμοιρασμός πολυμέσων στο Twitter.",
- "Description[en_GB]": "Shares media on Twitter.",
- "Description[es]": "Comparte el medio en Twitter.",
- "Description[et]": "Meedia jagamine Twitteris.",
- "Description[eu]": "Partekatu multimedia edukia Twitterren.",
- "Description[fi]": "Jakaa Twitteriin mediaa.",
- "Description[fr]": "Partager le contenu sur Twitter.",
- "Description[gl]": "Comparte contido en Twitter.",
- "Description[hu]": "Média megosztása Twitteren.",
- "Description[id]": "Membagikan media di Twitter.",
- "Description[it]": "Condividi contenuto su Twitter.",
- "Description[ko]": "트위터로 미디어를 공유합니다.",
- "Description[lt]": "Bendrina mediją Twitter tinkle.",
- "Description[nl]": "Deelt media op Twitter.",
- "Description[nn]": "Del mediefil på Twitter.",
- "Description[pl]": "Udostępnia multimedia na Twitterze.",
- "Description[pt]": "Partilha conteúdos no Twitter.",
- "Description[pt_BR]": "Compartilha mídias no Twitter.",
- "Description[ru]": "Отправка файлов в Twitter.",
- "Description[sk]": "Zdieľa médiu na Twitteri.",
- "Description[sv]": "Dela media på Twitter.",
- "Description[tg]": "Вocитаи аxбopи oммаро дар Twitter мубодила мекунад.",
- "Description[tr]": "Twitter'da medya dosyası paylaşır.",
- "Description[uk]": "Оприлюднює мультимедійні дані на Twitter.",
- "Description[x-test]": "xxShares media on Twitter.xx",
- "Description[zh_CN]": "在 Twitter 上分享媒体。",
- "Description[zh_TW]": "在 Twitter 上分想多媒體。",
- "Icon": "im-twitter",
- "Id": "twitterplugin",
- "License": "GPL",
- "Name": "Twitter",
- "Name[ar]": "تويتر",
- "Name[ca@valencia]": "Twitter",
- "Name[ca]": "Twitter",
- "Name[cs]": "Twitter",
- "Name[da]": "Twitter",
- "Name[de]": "Twitter",
- "Name[el]": "Twitter",
- "Name[en_GB]": "Twitter",
- "Name[es]": "Twitter",
- "Name[et]": "Twitter",
- "Name[eu]": "Twitter",
- "Name[fi]": "Twitter",
- "Name[fr]": "Twitter",
- "Name[gl]": "Twitter",
- "Name[hu]": "Twitter",
- "Name[ia]": "Twitter",
- "Name[id]": "Twitter",
- "Name[it]": "Twitter",
- "Name[ko]": "트위터",
- "Name[lt]": "Twitter",
- "Name[ml]": "ട്വിറ്റര്",
- "Name[nl]": "Twitter",
- "Name[nn]": "Twitter",
- "Name[pl]": "Twitter",
- "Name[pt]": "Twitter",
- "Name[pt_BR]": "Twitter",
- "Name[ru]": "Twitter",
- "Name[sk]": "Twitter",
- "Name[sv]": "Twitter",
- "Name[tg]": "Twitter",
- "Name[tr]": "Twitter",
- "Name[uk]": "Twitter",
- "Name[x-test]": "xxTwitterxx",
- "Name[zh_CN]": "Twitter",
- "Name[zh_TW]": "Twitter",
- "X-Purpose-ActionDisplay": "Twitter...",
- "X-Purpose-ActionDisplay[ca]": "Twitter...",
- "X-Purpose-ActionDisplay[cs]": "Twitter...",
- "X-Purpose-ActionDisplay[da]": "Twitter...",
- "X-Purpose-ActionDisplay[de]": "Twitter ...",
- "X-Purpose-ActionDisplay[en_GB]": "Twitter...",
- "X-Purpose-ActionDisplay[es]": "Twitter...",
- "X-Purpose-ActionDisplay[et]": "Twitter ...",
- "X-Purpose-ActionDisplay[eu]": "Twitter...",
- "X-Purpose-ActionDisplay[fi]": "Twitter…",
- "X-Purpose-ActionDisplay[fr]": "Twitter...",
- "X-Purpose-ActionDisplay[gl]": "Twitter…",
- "X-Purpose-ActionDisplay[ia]": "Twitter...",
- "X-Purpose-ActionDisplay[id]": "Twitter...",
- "X-Purpose-ActionDisplay[it]": "Twitter...",
- "X-Purpose-ActionDisplay[ko]": "트위터...",
- "X-Purpose-ActionDisplay[lt]": "Twitter...",
- "X-Purpose-ActionDisplay[ml]": "ട്വിറ്റര്... ",
- "X-Purpose-ActionDisplay[nl]": "Twitter...",
- "X-Purpose-ActionDisplay[nn]": "Twitter …",
- "X-Purpose-ActionDisplay[pl]": "Twitter...",
- "X-Purpose-ActionDisplay[pt]": "Twitter...",
- "X-Purpose-ActionDisplay[pt_BR]": "Twitter...",
- "X-Purpose-ActionDisplay[ru]": "Twitter...",
- "X-Purpose-ActionDisplay[sk]": "Twitter...",
- "X-Purpose-ActionDisplay[sv]": "Twitter...",
- "X-Purpose-ActionDisplay[tg]": "Twitter...",
- "X-Purpose-ActionDisplay[uk]": "Twitter…",
- "X-Purpose-ActionDisplay[x-test]": "xxTwitter...xx",
- "X-Purpose-ActionDisplay[zh_CN]": "Twitter...",
- "X-Purpose-ActionDisplay[zh_TW]": "Twitter…"
- },
- "X-Purpose-Configuration": [
- "tweetText",
- "consumerKey",
- "consumerSecret",
- "accessToken",
- "accessTokenSecret"
- ],
- "X-Purpose-Constraints": [],
- "X-Purpose-PluginTypes": [
- "Export"
- ]
-}