Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/* | |
* Export View to Markdown | |
* | |
* Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/ | |
* | |
* Markdown - https://www.markdownguide.org/ | |
* | |
* Version 2: Updated to support Diagram Groups | |
* Version 2.1: Add check for Selected View | |
* Version 2.2: Change to regex, added date of export |
// Find DiagramComponents for a given element in a given view | |
var getDiagramComponents = function(v, e) { | |
return $(v).find("concept").filter(function(o) { | |
return o.concept.id == e.id; | |
}); | |
} | |
// Checks if a view contains a visual connection from src and tgt visual objects | |
var contains = function(r, src, tgt) { | |
found = false; |
function deleteUnusedElements() { | |
$("element").each(function(element) { | |
if($(element).objectRefs().isEmpty()) { | |
element.delete(); | |
} | |
}); | |
} |
/* | |
* Comparison of two views to see which Archimate elements are missing | |
* 2018, Ad Gerrits | |
*/ | |
console.clear(); | |
function checkViews (v1, v2) { | |
var v2elements = []; | |
$(v2).find('element').each(function (e) { | |
v2elements.push(e.concept.id); |
/* | |
* Change Concept Type | |
* | |
* Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/ | |
* | |
* Updated from original to prompt for types | |
* | |
* Version 1: First release | |
* Version 2: Error handling | |
* |
var propName = window.prompt("Which property do you want to add or update (leave empty to cancel)?", ""); | |
if (propName) { | |
var propValue = window.prompt("Which value do you want to set for '"+propName+"' (leave empty to cancel)?", ""); | |
if (propValue) { | |
$(selection).prop(propName, propValue); | |
} | |
} |
var propName = window.prompt("Which property do you want to remove (leave empty to cancel)?", ""); | |
if (propName) { | |
$(selection).removeProp(propName); | |
} |
/* | |
* Export To CSV | |
* | |
* Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/ | |
* Requires PapaParse - https://www.papaparse.com/ | |
* Works with Import from CSV script - https://gist.github.com/smileham/1e57a5946235e780dee5a824f664aa3d | |
* | |
* Version 1: Export to CSV | |
* Version 1.1: Avoid duplicate concepts exported from diagram | |
* Version 1.2: Fix missing properties |
/* | |
* Import from CSV | |
* | |
* Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/ | |
* Requires PapaParse - https://www.papaparse.com/ | |
* Works with Export to CSV Script - https://gist.github.com/smileham/15c445b17a92bd6f5dc1508e573bcd8a | |
* | |
* Version 1: Import from CSV | |
* Version 1.1: Force character encoding to use UTF-8 | |
* Version 2: Support for Specialization and creates "CSVImport-timestamp" view |