├── Ai Merge.jsx ├── Ai Sessions.jsx ├── Artboard Labels.jsx ├── Center on Artboards.jsx ├── Contact Sheet ├── .idea │ ├── Contact Sheet.iml │ ├── codeStyles │ │ └── codeStyleConfig.xml │ ├── encodings.xml │ ├── misc.xml │ ├── modules.xml │ ├── vcs.xml │ └── workspace.xml ├── Contact Sheet.jsx ├── FileList.js ├── Progress.js ├── backup │ └── Contact Sheet.jsx ├── config.jsx ├── lang.jsx └── work.js ├── Group Overlapping Objects.jsx ├── Helpers.jsx ├── IconJar to Artboards.jsx ├── Iterator.js ├── JSON.jsx ├── Merge SVG Docs.jsx ├── Progress.jsx ├── README.md ├── Resize All Artboards.jsx ├── SVG Exporter.jsx ├── Save Open Docs.jsx ├── ScriptPanel_2.jsx ├── Smart Layer Export.jsx ├── _string.scpt ├── bak-SVG Exporter.jsx ├── copy-layer-name-to-artboard.jsx ├── find-artboards-by-name.jsx ├── labels.js ├── polyfills.js └── utils.jsx /Ai Merge.jsx: -------------------------------------------------------------------------------- 1 | #target illustrator 2 | #include "~/github/iconify/ai-merge/Ai Merge.jsx"; -------------------------------------------------------------------------------- /Ai Sessions.jsx: -------------------------------------------------------------------------------- 1 | #target illustrator 2 | #include "~/github/iconify/ai-sessions/Ai Sessions.jsx"; -------------------------------------------------------------------------------- /Artboard Labels.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * ArtboardLabelsError object 3 | * @param message 4 | * @param stack 5 | * @constructor 6 | */ 7 | var ArtboardLabelsError = function(message, stack) { 8 | this.message = message || 'Unknown ArtboardLabelsError'; 9 | this.stack = stack || null; 10 | } 11 | ArtboardLabelsError.prototype = Error.prototype; 12 | 13 | 14 | /** 15 | * Create artboard labels. 16 | * @constructor 17 | */ 18 | var ArtboardLabels = function() { 19 | if ( ! app.activeDocument) { 20 | alert(new ArtboardLabelsError("There are no open documents", $.stack)); 21 | } 22 | else { 23 | var doc, 24 | artboard, 25 | artboards, 26 | theLabel; 27 | 28 | doc = app.activeDocument; 29 | artboards = doc.artboards; 30 | 31 | theLayer = doc.layers.add(); 32 | theLayer.name = '__LABELS'; 33 | 34 | doc.activeLayer = theLayer; 35 | 36 | for (var i = 0; i < app.activeDocument.artboards.length; i++) { 37 | 38 | doc.artboards.setActiveArtboardIndex(i); 39 | 40 | artboard = artboards[i]; 41 | 42 | theLabel = doc.textFrames.add(); 43 | 44 | theLabel.contents = artboard.name; 45 | 46 | theLabel.textRange.characterAttributes.size = 8; 47 | 48 | theLabel.position = [ 49 | artboard.artboardRect[0], 50 | artboard.artboardRect[1] - (artboard.artboardRect[1] - (theLabel.height - 2)) 51 | ]; 52 | } 53 | } 54 | } 55 | 56 | new ArtboardLabels(); -------------------------------------------------------------------------------- /Center on Artboards.jsx: -------------------------------------------------------------------------------- 1 | #target Illustrator #include "utils.jsx"; var CONFIG = { LOGGING : true, LOG_FOLDER : '~/Desktop/ai-logs/', LOG_FILE_PATH : '~/Desktop/ai-logs/' + Utils.doDateFormat(new Date()) + '-log.txt', }; var originalInteractionLevel = userInteractionLevel; userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; app.coordinateSystem = CoordinateSystem.ARTBOARDCOORDINATESYSTEM; if ( app.documents.length > 0) { var doc = app.activeDocument; Utils.showProgressBar(doc.artboards.length); var interrupt = false; app.executeMenuCommand("fitall"); var count = doc.artboards.length; for (i = 0; i < count; i++) { redraw(); // The interrupt is not working yet. if (interrupt) break; doc.artboards.setActiveArtboardIndex(i); var activeAB = doc.artboards[doc.artboards.getActiveArtboardIndex()]; var right = activeAB.artboardRect[2]; var bottom = activeAB.artboardRect[3]; doc.selectObjectsOnActiveArtboard(); // If there are no visible items, update the progress bar and continue. if (selection.length == 0) { Utils.updateProgress('Artboard ' + i + ' has no visible items. Skipping.'); continue; } app.executeMenuCommand('group'); Utils.updateProgressMessage('Grouping selection'); /* Utils.updateProgressMessage( 'Selection is ' + Utils.isVisibleAndUnlocked(selection) ? 'Visible' : 'Hidden'), i + 1, doc.artboards.length ); */ for (x = 0 ; x < selection.length; x++) { try { if (! Utils.isVisibleAndUnlocked(selection)) continue; selection[x].position = [ Math.round((right - selection[x].width)/2), Math.round((bottom + selection[x].height)/2) ]; var scale = 105; try { selection[x].resize(scale, scale, true, true, true, true, scale); } catch(e) { $.writeln("RESIZE ERROR : " + e); } } catch(e) { Utils.logger('ERROR - ' + e.message); } } Utils.updateProgress('Selection centered'); } Utils.progress.close(); redraw(); } else { alert("There are no open documents"); } try { userInteractionLevel = originalInteractionLevel; } catch(ex) {/*Exit Gracefully*/} -------------------------------------------------------------------------------- /Contact Sheet/.idea/Contact Sheet.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Contact Sheet/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /Contact Sheet/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Contact Sheet/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | JavaScript 23 | 24 | 25 | 26 | 27 | JavaScript 28 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | 37 | 40 | -------------------------------------------------------------------------------- /Contact Sheet/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Contact Sheet/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Contact Sheet/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | /usr/local/bin/bower 36 | 37 | 38 | 39 | true 40 | 41 | false 42 | true 43 | true 44 | 45 | 46 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |