[education/rkward] rkward/plugins/internal: Add missing files
Thomas Friedrichsmeier
null at kde.org
Mon May 9 20:18:17 BST 2022
Git commit b91c7ca7c02c60a8ba020fcbfd1a388ebcfc5dd7 by Thomas Friedrichsmeier.
Committed on 09/05/2022 at 19:18.
Pushed by tfry into branch 'master'.
Add missing files
A +68 -0 rkward/plugins/internal/Installfromgit.js
A +52 -0 rkward/plugins/internal/Installfromgit.rkh
A +52 -0 rkward/plugins/internal/Installfromgit.xml
https://invent.kde.org/education/rkward/commit/b91c7ca7c02c60a8ba020fcbfd1a388ebcfc5dd7
diff --git a/rkward/plugins/internal/Installfromgit.js b/rkward/plugins/internal/Installfromgit.js
new file mode 100644
index 00000000..bf3c2577
--- /dev/null
+++ b/rkward/plugins/internal/Installfromgit.js
@@ -0,0 +1,68 @@
+// this code was generated using the rkwarddev package.
+// perhaps don't make changes here, but in the rkwarddev script instead!
+
+
+
+function preprocess(is_preview){
+ // add requirements etc. here
+ echo("require(devtools)\n");
+}
+
+function calculate(is_preview){
+ // read in variables from dialog
+ var packageSource = getString("packageSource");
+ var gitUser = getString("gitUser");
+ var gitRepo = getString("gitRepo");
+ var fullURL = getString("fullURL");
+ var inpCmmttgbr = getString("inp_Cmmttgbr");
+ var inpSbdrctry = getString("inp_Sbdrctry");
+ var inpPrsnlPAT = getString("inp_PrsnlPAT");
+ var inpUser = getString("inp_User");
+ var inpPassword = getString("inp_Password");
+ var frmPrvtrpstChecked = getBoolean("frm_Prvtrpst.checked");
+
+ // the R code to be evaluated
+ var frmPrvtrpstChecked = getValue("frm_Prvtrpst.checked");
+ echo(" install_" + packageSource + "(\n");
+ if(packageSource == "github" || packageSource == "gitlab" || packageSource == "bitbucket") {
+ echo(" repo=\"" + gitUser + "/" + gitRepo);
+ if(inpSbdrctry) {
+ echo("/" + inpSbdrctry);
+ } else {}
+ if(inpCmmttgbr) {
+ echo("@" + inpCmmttgbr);
+ } else {}
+ echo("\"");
+ if(frmPrvtrpstChecked) {
+ if(packageSource == "github" || packageSource == "gitlab") {
+ if(inpPrsnlPAT) {
+ echo(",\n auth_token=\"" + inpPrsnlPAT + "\"");
+ } else {}
+ } else if(packageSource == "bitbucket") {
+ if(inpUser) {
+ echo(",\n auth_user=\"" + inpUser + "\"");
+ } else {}
+ if(inpPassword) {
+ echo(",\n password=\"" + inpPassword + "\"");
+ } else {}
+ } else {}
+ } else {}
+ } else if(packageSource == "git" || packageSource == "svn") {
+ echo(" url=\"" + fullURL + "\"");
+ if(inpCmmttgbr) {
+ echo(",\n branch=\"" + inpCmmttgbr + "\"");
+ } else {}
+ if(inpSbdrctry) {
+ echo(",\n subdir=\"" + inpSbdrctry + "\"");
+ } else {}
+ } else {}
+ echo("\n )");
+ echo("\n");
+}
+
+function printout(is_preview){
+ // printout the results
+ new Header(i18n("Install from git results")).print();
+
+}
+
diff --git a/rkward/plugins/internal/Installfromgit.rkh b/rkward/plugins/internal/Installfromgit.rkh
new file mode 100644
index 00000000..c6feb536
--- /dev/null
+++ b/rkward/plugins/internal/Installfromgit.rkh
@@ -0,0 +1,52 @@
+<!DOCTYPE rkhelp >
+<document>
+ <!-- this code was generated using the rkwarddev package.
+ perhaps don't make changes here, but in the rkwarddev script instead! -->
+ <summary>
+ </summary>
+ <usage>
+ </usage>
+ <!-- <section id="sct_EDITORDE" title="EDIT OR DELETE ME">
+ EDIT OR DELETE ME
+ </section> -->
+ <settings>
+ <setting id="packageSource">
+ Set the location where the package resides that you want to install.
+ </setting>
+ <caption id="repoFrame" />
+ <setting id="gitUser">
+ Specify the user name (GitHub, GitLab and Bitbucket only).
+ </setting>
+ <setting id="gitRepo">
+ Give the repository name (GitHub, GitLab and Bitbucket only).
+ </setting>
+ <setting id="fullURL">
+ Give the full URL to the repository (generic git and svn only).
+ </setting>
+ <setting id="inp_Cmmttgbr">
+ If you want a certain commit, tag or branch for installation, define that here.
+ </setting>
+ <setting id="inp_Sbdrctry">
+ If you want to install from a subdirectory of the repository, define that here.
+ </setting>
+ <caption id="frm_Prvtrpst" />
+ <setting id="inp_PrsnlPAT">
+ To install from a private repository, set your personal access token (PAT, GitHub and GitLab only).
+ </setting>
+ <setting id="inp_User">
+ To install from a private repository, set the user name (Bitbucket only).
+ </setting>
+ <setting id="inp_Password">
+ To install from a private repository, set the password (Bitbucket only).
+ </setting>
+ </settings>
+ <!-- <related>
+ <ul>
+ <li>
+ <link href="rkward://rhelp/..." />
+ </li>
+ </ul>
+ </related> -->
+ <technical>
+ </technical>
+</document>
diff --git a/rkward/plugins/internal/Installfromgit.xml b/rkward/plugins/internal/Installfromgit.xml
new file mode 100644
index 00000000..1b139143
--- /dev/null
+++ b/rkward/plugins/internal/Installfromgit.xml
@@ -0,0 +1,52 @@
+<!DOCTYPE rkplugin >
+<document>
+ <!-- this code was generated using the rkwarddev package.
+ perhaps don't make changes here, but in the rkwarddev script instead! -->
+ <code file="Installfromgit.js" />
+ <help file="Installfromgit.rkh" />
+ <!-- <dependencies>
+ </dependencies> -->
+ <logic>
+ <convert id="lgcIsGit" sources="packageSource.string" mode="equals" standard="git" />
+ <convert id="lgcIsSVN" sources="packageSource.string" mode="equals" standard="svn" />
+ <convert id="lgcRequireURL" sources="lgcIsGit;lgcIsSVN" mode="or" />
+ <connect governor="lgcRequireURL.not" client="row_inptlbGURR.visible" />
+ <connect governor="lgcRequireURL" client="fullURL.visible" />
+ <convert id="lgcIsGithub" sources="packageSource.string" mode="equals" standard="github" />
+ <convert id="lgcIsGitlab" sources="packageSource.string" mode="equals" standard="gitlab" />
+ <convert id="lgcIsGithubOrGitlab" sources="lgcIsGithub;lgcIsGitlab" mode="or" />
+ <convert id="lgcIsBitbucket" sources="packageSource.string" mode="equals" standard="bitbucket" />
+ <convert id="lgcEnableAuthToken" sources="frm_Prvtrpst.checked;lgcIsGithubOrGitlab" mode="and" />
+ <connect governor="lgcEnableAuthToken" client="inp_PrsnlPAT.enabled" />
+ <connect governor="lgcIsBitbucket" client="inp_User.enabled" />
+ <connect governor="lgcIsBitbucket" client="inp_Password.enabled" />
+ <connect governor="lgcRequireURL.not" client="frm_Prvtrpst.enabled" />
+ </logic>
+ <dialog label="Install from git/svn">
+ <column id="clm_dSPGHGLBPF">
+ <dropdown id="packageSource" label="Package source">
+ <option label="git (generic)" value="git" checked="true" />
+ <option label="GitHub" value="github" />
+ <option label="GitLab" value="gitlab" />
+ <option label="Bitbucket" value="bitbucket" />
+ <option label="subversion (generic)" value="svn" />
+ </dropdown>
+ <frame label="Package reporitory" id="repoFrame">
+ <row id="row_inptlbGURR">
+ <input label="Git user name" id="gitUser" required="true" />
+ <input label="Repository" id="gitRepo" required="true" />
+ </row>
+ <input label="URL to repository" id="fullURL" initial="https://example.com/..." required="true" />
+ </frame>
+ <input label="Commit/tag/branch" id="inp_Cmmttgbr" />
+ <input label="Subdirectory" id="inp_Sbdrctry" />
+ <frame label="Private repository" checkable="true" checked="false" id="frm_Prvtrpst">
+ <input label="Personal access token (PAT)" id="inp_PrsnlPAT" required="true" />
+ <row id="row_inptlbUUPP">
+ <input label="User" id="inp_User" required="true" />
+ <input label="Password" id="inp_Password" required="true" />
+ </row>
+ </frame>
+ </column>
+ </dialog>
+</document>
More information about the rkward-tracker
mailing list