Created
August 19, 2026 18:15
-
-
Save dryan/9d4369adbc0777671280e52eda709a85 to your computer and use it in GitHub Desktop.
Random name generator for Google Sheets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| @OnlyCurrentDoc | |
| */ | |
| function onOpen() { | |
| const ui = SpreadsheetApp.getUi(); | |
| ui.createMenu("Django CoC").addItem("Generate Code Name", "insertCodeName").addToUi(); | |
| } | |
| function insertCodeName() { | |
| // 100 Adjectives x 100 Nouns = 10,000 unique combinations | |
| // Zero external dependencies, never goes offline. | |
| const adjectives = [ | |
| "Absorbed", | |
| "Abstract", | |
| "Active", | |
| "Agile", | |
| "Alpine", | |
| "Amber", | |
| "Ancient", | |
| "Arctic", | |
| "Autumn", | |
| "Azure", | |
| "Balanced", | |
| "Bold", | |
| "Brave", | |
| "Brief", | |
| "Bright", | |
| "Brisk", | |
| "Broad", | |
| "Calm", | |
| "Candid", | |
| "Casual", | |
| "Civil", | |
| "Classic", | |
| "Clear", | |
| "Clever", | |
| "Coastal", | |
| "Cold", | |
| "Cosmic", | |
| "Crimson", | |
| "Crystal", | |
| "Daring", | |
| "Dark", | |
| "Dawn", | |
| "Deep", | |
| "Direct", | |
| "Distinct", | |
| "Driven", | |
| "Dusty", | |
| "Dynamic", | |
| "Early", | |
| "Earnest", | |
| "Easy", | |
| "Echoing", | |
| "Electric", | |
| "Emerald", | |
| "Equal", | |
| "Essential", | |
| "Fair", | |
| "Famous", | |
| "Fast", | |
| "Fierce", | |
| "Firm", | |
| "First", | |
| "Floral", | |
| "Fluent", | |
| "Flying", | |
| "Focused", | |
| "Forest", | |
| "Fresh", | |
| "Frosty", | |
| "Gentle", | |
| "Giant", | |
| "Gifted", | |
| "Global", | |
| "Gold", | |
| "Grand", | |
| "Great", | |
| "Green", | |
| "Growing", | |
| "Happy", | |
| "Hardy", | |
| "Hidden", | |
| "High", | |
| "Hollow", | |
| "Holy", | |
| "Honest", | |
| "Humble", | |
| "Ideal", | |
| "Infinite", | |
| "Inner", | |
| "Instant", | |
| "Intense", | |
| "Jade", | |
| "Jolly", | |
| "Joyful", | |
| "Just", | |
| "Keen", | |
| "Kind", | |
| "Known", | |
| "Large", | |
| "Last", | |
| "Late", | |
| "Light", | |
| "Lime", | |
| "Little", | |
| "Live", | |
| "Logical", | |
| ]; | |
| const nouns = [ | |
| "Anchor", | |
| "Arc", | |
| "Arch", | |
| "Arrow", | |
| "Aurora", | |
| "Axis", | |
| "Badge", | |
| "Banner", | |
| "Base", | |
| "Basin", | |
| "Beacon", | |
| "Beam", | |
| "Bear", | |
| "Bell", | |
| "Bird", | |
| "Block", | |
| "Boat", | |
| "Book", | |
| "Branch", | |
| "Bridge", | |
| "Brook", | |
| "Bulb", | |
| "Cable", | |
| "Cage", | |
| "Canvas", | |
| "Canyon", | |
| "Cape", | |
| "Case", | |
| "Cedar", | |
| "Cell", | |
| "Chain", | |
| "Chart", | |
| "Cliff", | |
| "Cloud", | |
| "Coast", | |
| "Code", | |
| "Comet", | |
| "Compass", | |
| "Coral", | |
| "Core", | |
| "Cove", | |
| "Craft", | |
| "Crane", | |
| "Creek", | |
| "Crest", | |
| "Crow", | |
| "Crown", | |
| "Curve", | |
| "Cycle", | |
| "Dale", | |
| "Dash", | |
| "Dawn", | |
| "Deck", | |
| "Delta", | |
| "Dial", | |
| "Disk", | |
| "Dock", | |
| "Dome", | |
| "Door", | |
| "Dove", | |
| "Drift", | |
| "Drop", | |
| "Dune", | |
| "Dust", | |
| "Eagle", | |
| "Earth", | |
| "Echo", | |
| "Edge", | |
| "Elm", | |
| "Engine", | |
| "Falcon", | |
| "Fern", | |
| "Field", | |
| "File", | |
| "Film", | |
| "Fire", | |
| "Flag", | |
| "Flame", | |
| "Flare", | |
| "Flight", | |
| "Floor", | |
| "Flow", | |
| "Foam", | |
| "Fog", | |
| "Folk", | |
| "Force", | |
| "Ford", | |
| "Forest", | |
| "Fort", | |
| "Frame", | |
| "Frost", | |
| "Galaxy", | |
| "Garden", | |
| "Gate", | |
| "Gauge", | |
| "Gear", | |
| "Glacier", | |
| "Glass", | |
| "Globe", | |
| "Glow", | |
| ]; | |
| const adj = adjectives[Math.floor(Math.random() * adjectives.length)]; | |
| const noun = nouns[Math.floor(Math.random() * nouns.length)]; | |
| // Combine format: "amber-anchor" | |
| const codeName = adj.toLowerCase() + "-" + noun.toLowerCase(); | |
| const cell = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getActiveCell(); | |
| // Prevent overwriting existing data accidentally | |
| if (cell.getValue() !== "") { | |
| const response = SpreadsheetApp.getUi().alert( | |
| "Overwrite?", | |
| "This cell is not empty. Replace content?", | |
| SpreadsheetApp.getUi().ButtonSet.YES_NO | |
| ); | |
| if (response == SpreadsheetApp.getUi().Button.NO) { | |
| return; | |
| } | |
| } | |
| cell.setValue(codeName); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment