Skip to content

pramodexe/CTF-Flag-Highlighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🏴‍☠️ CTF Flag Highlighter — Excalidraw Script

An Excalidraw script for Obsidian that instantly transforms any selected text into a terminal-style CTF flag — complete with a 🚩 prefix, Terminal Green color, monospace font, and a sleek black rounded box.


📸 What It Does

Select your CTF flag text element (or its bounding box) on your Excalidraw canvas and run this script. It will:

Feature Result
Prepends flag symbol 🚩 added to your text
Text color Terminal green #00ff00
Font Monospace (Code font)
Alignment Center
Box background Solid black #000000
Box border Green #00ff00, 2px, rounded
No box? Automatically draws one around the text

📁 Installation

Step 1 — Locate your Excalidraw folder

In your Obsidian vault, find the Excalidraw folder. By default it is at:

YourVault/
└── Excalidraw/

Step 2 — Create the Scripts folder

Inside the Excalidraw folder, create a subfolder named exactly.

Your vault structure should now look like this:

YourVault/
└── Excalidraw/
    └── Scripts/

Step 3 — Add the script files

Copy both files from this repo into the Scripts folder:

YourVault/
└── Excalidraw/
    └── Scripts/
        ├── CTF Flag Highlighter.md   ✅  (the script)
        └── CTF Flag Highlighter.svg  ✅  (the toolbar icon)
  • The .md file contains the actual JavaScript — do not rename it to .js.
  • The .svg file is the thumbnail icon shown in the Excalidraw script toolbar. It must share the exact same name as the .md file.

▶️ How to Access & Run the Script

Method 1 — Script Library Button (Recommended)

  1. Open any Excalidraw drawing in Obsidian.
  2. In the Excalidraw right-side toolbar, click the Obsidian Tools Panel (it has the Obsidian logo as icon).
  3. A panel listing all your scripts will appear.
  4. Click CTF Flag Highlighter to run it on your selection (you can find it using the flag thumbnail icon).

Method 2 — Obsidian Command Palette

  1. Select your text element(s) on the canvas.
  2. Open the Command Palette (Ctrl+P / Cmd+P).
  3. Type CTF Flag Highlighter and press Enter.

Note: Scripts only appear in the palette/toolbar after Obsidian reloads or detects the new file. If the script doesn't show up, reload Obsidian once (Ctrl+R / Cmd+R).


⚡ Usage Workflow

1. Open an Excalidraw drawing in Obsidian
2. Type or select a text element containing a CTF flag
3. Select the text element (or its box) on the canvas
4. Run: CTF Flag Highlighter  (toolbar or Ctrl+P)
5. Done — your flag is now styled! 🏴‍☠️

🛠️ Requirements


👤 Author

Made by pramodexe 🏴‍☠️


📜 License

This project is free to use — no restrictions, no attribution required.

Do whatever you want with it. Hack, modify, share, or build on top of it. 🏴‍☠️


About

Excalidraw script for Obsidian that styles CTF flags.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors