rm -rf .git
git init git add . git commit -m "Initial commit"
| /* | |
| This script uses Oxygen operation called JSOperation, see https://www.oxygenxml.com/doc/versions/18.0/ug-editorEclipse/topics/dg-default-author-operations.html. | |
| For generating the personal access token to be used in this script, please select "public_repo | Access public repositories". | |
| This script has to be put in the file ${framework}/commons.js. | |
| In order to add the button for publishing to github, add the following code to any CSS file that is associated within the framework with the edited XML file: | |
| rdf|RDF:before { | |
| content: oxy_button(action, oxy_action(name, "Publish to github", operation, "ro.sync.ecss.extensions.commons.operations.JSOperation", arg-script, "function doOperation(){publishToGihub();}")) | |
| } | |
| */ |
| xquery version "3.1"; | |
| import module namespace http = "http://expath.org/ns/http-client"; | |
| (: For generating the personal access token to be used in this script, please select "public_repo | Access public repositories". :) | |
| let $git-token := "<your-github-token>" | |
| let $user-name := "<your-github-username>" | |
| let $repo-name := "<your-repo-name>" | |
| let $file-path := "<file=path>" | |
| let $message := "<commit-message>" | |
| let $new-file-content := serialize(<a/>) |
| authorEditorAccess.addAuthorCaretListener(new AuthorCaretListener() { | |
| @Override | |
| public void caretMoved(AuthorCaretEvent caretEvent) { | |
| AuthorNode currentNode = caretEvent.getNode(); | |
| if (currentNode.getType() != AuthorNode.NODE_TYPE_ELEMENT) { | |
| return; |