Get wordpress posting working via xml-rpc
whoops
This commit is contained in:
parent
fccec5faa6
commit
bbca33246a
@ -7,6 +7,8 @@ $modules = $(
|
|||||||
"com.fasterxml.jackson.core",
|
"com.fasterxml.jackson.core",
|
||||||
"com.fasterxml.jackson.dataformat.xml",
|
"com.fasterxml.jackson.dataformat.xml",
|
||||||
"com.fasterxml.jackson.datatype.jsr310",
|
"com.fasterxml.jackson.datatype.jsr310",
|
||||||
|
#"com.tearsofaunicorn.wordpress.api",
|
||||||
|
"wordpress.xmlrpc.client",
|
||||||
"result",
|
"result",
|
||||||
"javafx.controls",
|
"javafx.controls",
|
||||||
"javafx.fxml",
|
"javafx.fxml",
|
||||||
|
@ -6,6 +6,8 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
|||||||
import com.jcraft.jsch.JSch;
|
import com.jcraft.jsch.JSch;
|
||||||
import com.jcraft.jsch.JSchException;
|
import com.jcraft.jsch.JSchException;
|
||||||
import com.jcraft.jsch.Session;
|
import com.jcraft.jsch.Session;
|
||||||
|
import com.tearsofaunicorn.wordpress.api.model.Post;
|
||||||
|
import com.tearsofaunicorn.wordpress.api.WordpressClient;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@ -457,6 +459,13 @@ public class StationSettingsController {
|
|||||||
connectionTestStatus.set(ConnectionStatus.FAILURE);
|
connectionTestStatus.set(ConnectionStatus.FAILURE);
|
||||||
logger.log(Level.SEVERE, "SFTP connection failed", e);
|
logger.log(Level.SEVERE, "SFTP connection failed", e);
|
||||||
}
|
}
|
||||||
|
} else if (messageMethod.get() == StationSettings.MessageMethod.WORDPRESS) {
|
||||||
|
System.setProperty("wordpress.username", username.get());
|
||||||
|
System.setProperty("wordpress.password", password.get());
|
||||||
|
System.setProperty("wordpress.url", stationAddress.get());
|
||||||
|
Post post = new Post("Title of post", "content to post");
|
||||||
|
WordpressClient client = new WordpressClient();
|
||||||
|
String newPostId = client.newPost(post);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,13 @@ $modules = $(
|
|||||||
"com.fasterxml.jackson.core",
|
"com.fasterxml.jackson.core",
|
||||||
"com.fasterxml.jackson.dataformat.xml",
|
"com.fasterxml.jackson.dataformat.xml",
|
||||||
"com.fasterxml.jackson.datatype.jsr310",
|
"com.fasterxml.jackson.datatype.jsr310",
|
||||||
"result",
|
"com.jcraft.jsch",
|
||||||
"javafx.controls",
|
"javafx.controls",
|
||||||
"javafx.fxml",
|
"javafx.fxml",
|
||||||
"org.apache.commons.cli",
|
"org.apache.commons.cli",
|
||||||
"com.jcraft.jsch"
|
"xmlrpc.common",
|
||||||
|
"result",
|
||||||
|
"wordpress.xmlrpc.client"
|
||||||
)
|
)
|
||||||
$addModules = $modules -join ","
|
$addModules = $modules -join ","
|
||||||
java --module-path $modulePath --add-modules $addModules -cp out name.nathanmcrae.numbersstation.Main @args
|
java --module-path $modulePath --add-modules $addModules -cp out name.nathanmcrae.numbersstation.Main @args
|
||||||
|
Loading…
x
Reference in New Issue
Block a user