Skip to content

Implement complete RoExport Python program for Roblox script export#1

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-0f2892e0-9e9f-4202-8f76-a2a6906eb8de
Draft

Implement complete RoExport Python program for Roblox script export#1
Copilot wants to merge 2 commits intomainfrom
copilot/fix-0f2892e0-9e9f-4202-8f76-a2a6906eb8de

Conversation

Copy link
Copy Markdown

Copilot AI commented Sep 16, 2025

This PR implements a complete and clean Python program that exports Roblox Studio files (.rbxm and .rbxl) to .lua files usable in any IDE, addressing the repository's core purpose.

What's New

RoExport is now a fully functional Python package that converts Roblox Studio files to standard .lua files compatible with any text editor or IDE like VS Code, IntelliJ IDEA, Sublime Text, and others.

Key Features

  • Zero Dependencies: Uses only Python standard library - no external packages required
  • Smart File Naming: Automatically names exported files based on script type:
    • ScriptName.server.lua for Scripts
    • ScriptName.client.lua for LocalScripts
    • ScriptName.lua for ModuleScripts
  • Structure Preservation: Maintains original folder hierarchy from Roblox projects
  • Flexible Export: Choose between hierarchical or flat file structure
  • CLI Interface: Easy-to-use command line tool with multiple options
  • Python API: Full programmatic access for custom workflows
  • Export Summary: Generates markdown summary with script counts and file listings

Usage Examples

Command Line

# Basic export
roexport my_game.rbxm

# Export to specific directory with flat structure
roexport my_game.rbxm exported_scripts/ --flat

# Export without informational headers
roexport my_game.rbxm --no-headers --no-summary

Python API

from roexport import RobloxExporter

exporter = RobloxExporter(preserve_hierarchy=True, add_headers=True)
exported_files = exporter.export_with_summary("game.rbxm", "output/")
print(f"Exported {len(exported_files)} scripts")

Package Structure

The implementation includes:

  • Core Parser (roexport/parser.py): XML parsing logic for .rbxm/.rbxl files
  • Export Engine (roexport/exporter.py): Script extraction and .lua file generation
  • CLI Interface (roexport/cli.py): Command-line tool with comprehensive options
  • Package Setup (setup.py): Standard Python package configuration
  • Documentation (README.md): Complete usage guide with examples
  • Examples (examples/): Sample usage patterns and documentation

Output Quality

Exported files include optional informational headers:

-- ==================================================
-- Script Name: GameManager
-- Script Type: Script
-- Parent Path: ServerScriptService
-- Exported by RoExport
-- ==================================================

-- Your original script content here
game.Players.PlayerAdded:Connect(function(player)
    print("Player joined:", player.Name)
end)

Installation & Usage

Users can now:

  1. Clone the repository
  2. Run pip install -e . to install the package
  3. Use roexport command globally or import the Python API
  4. Export their Roblox projects to any IDE of choice

This implementation transforms the repository from a basic README into a production-ready tool that developers can immediately use to export their Roblox scripts for external development workflows.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: N3uralCreativity <180445421+N3uralCreativity@users.noreply.github.com>
Copilot AI changed the title [WIP] just make a clean reportory for a Script exporter python program from roblox studio files to .lua files usable anywhere in any IDEs Implement complete RoExport Python program for Roblox script export Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants