rm -rf .git
git init git add . git commit -m "Initial commit"
| authorEditorAccess.addAuthorCaretListener(new AuthorCaretListener() { | |
| @Override | |
| public void caretMoved(AuthorCaretEvent caretEvent) { | |
| AuthorNode currentNode = caretEvent.getNode(); | |
| if (currentNode.getType() != AuthorNode.NODE_TYPE_ELEMENT) { | |
| return; |
| 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/>) |
| /* | |
| 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();}")) | |
| } | |
| */ |
| Files that are in both Dir1 and Dir2: | |
| find "$Dir1/" "$Dir2/" -printf '%P\n' | sort | uniq -d | |
| Files that are in Dir1 but not in Dir2: | |
| find "$Dir1/" "$Dir2/" "$Dir2/" -printf '%P\n' | sort | uniq -u |
| declare function local:add-index-configuration-file($collection-path as xs:string) { | |
| let $index-collection-path := $system-config-collection-path || $collection-path | |
| return ( | |
| if (not(xmldb:collection-available($index-collection-path))) | |
| then local:create-collections-recursively($system-config-collection-path, tokenize($collection-path, "/")) | |
| else () | |
| , | |
| xmldb:store-files-from-pattern($index-collection-path, $dir, "modules/indexes" || $collection-path || "/*.xconf") | |
| , |
| declare function local:create-collections-recursively($target-collection-uri as xs:string, $new-collection-path-steps as xs:string*) as xs:string* { | |
| if (exists($new-collection-path-steps)) | |
| then | |
| let $new-collection-name := $new-collection-path-steps[1] | |
| let $new-collection-uri := $target-collection-uri || "/" || $new-collection-name | |
| return ( | |
| if (not(xmldb:collection-available($new-collection-uri))) | |
| then xmldb:create-collection($target-collection-uri, $new-collection-name) | |
| else () |
| find . -name "*" -print0 | xargs -0 grep -l "22" |
find ./ -name "*.xml" -exec sed -i '/<p> <\/p>/d' {} \;
find . -name "*" -print0 | xargs -0 grep -l "string"
find ./ -name "A*.xml" -exec sed -i '/string/{n;d}' {} \;
grep -Pazor --include="A*.xml" 'string.*\n.*string' .
grep -ril --include="A*.xml" "string" .
grep -riL --include="A*.xml" "string" .