Skip to content

feat: Add Python scripts to automate DCP and linear profile generation - #22

Open
leyyce wants to merge 3 commits into
abpy:masterfrom
leyyce:feature/automation-scripts
Open

leyyce wants to merge 3 commits into
abpy:masterfrom
leyyce:feature/automation-scripts

Conversation

@leyyce

@leyyce leyyce commented Sep 17, 2026

Copy link
Copy Markdown

Summary

This PR introduces two interactive Python scripts to automate profile generation and deployment for any camera model supported by Adobe Standard profiles, along with updated documentation and .gitignore entries.

Changes

  • create_profiles.py:
    • Automatically detects local Adobe Camera Raw profile directories across Windows and macOS.
    • Interactive CLI to search and select the base Adobe Standard.dcp for the user's camera model.
    • Batch compiles native Fujifilm DCP profiles by stripping existing LookTables, injecting curves from xml tables/, and applying required tags (DefaultBlackRender=1, ProfileLookTableEncoding=1).
    • Provides an optional one-click installation directly into the user's CameraRaw profile directory.
  • create_linear.py:
    • Generates the camera-specific linear base profile (<Camera> Linear.dcp) required for applying the included 3D LUTs in Adobe Camera Raw.
    • Inserts a strictly linear 1:1 diagonal ToneCurve, strips LookTables, and sets DefaultBlackRender=1 to disable Adobe's default black clipping.
    • Prompts to deploy directly into CameraProfiles/Linear Profiles.
  • Clean Temp Directory Management:
    • Both scripts utilize Python's tempfile.TemporaryDirectory() to ensure isolated decompilation and compilation without leaving build artifacts in the repository working directory.
  • Documentation & Git Hygiene:
    • Updated README.md with script usage, prerequisites (dcpTool and PATH setup), and workflow descriptions.
    • Added .gitignore rules for output/, local dcpTool binaries, and temporary files.

Testing

  • Verified profile decompilation and recompilation with dcpTool (on Windows).
  • Confirmed profiles load correctly in Adobe Lightroom Classic and Adobe Camera Raw with correct curve application.

Copilot AI lite review requested due to automatic review settings September 17, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Moderate issues remain with profile filtering and Linux profile discovery/deployment.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds interactive Python scripts for generating and installing camera-specific DCP and linear profiles.

Changes:

  • Added profile-generation and deployment scripts.
  • Added temporary build isolation.
  • Updated documentation and .gitignore.
File summaries
File Description
README.md Documents script usage and prerequisites.
create_profiles.py Generates and optionally installs Fujifilm profiles.
create_linear.py Generates and optionally installs linear profiles.
.gitignore Ignores generated files and local binaries.
Review details

Suppressed comments (4)

create_linear.py:179

  • The no-install branch prints user_profiles_dir, but the automatic branch installs into user_profiles_dir / "Linear Profiles" and the README documents that subdirectory. Following this manual instruction places the profile in the wrong location, so Camera Raw may not load it as the linear base.
        print(f"\nManual installation: Copy '{target_dcp.name}' to:\n{user_profiles_dir}")

create_linear.py:26

  • The non-Windows/non-macOS branch is also the Linux path, but it never checks an Adobe profile location: it searches only the current directory and installs under the repository's installed_dcp folder. That makes the advertised cross-platform detection/deployment fail on Linux; add a supported platform-specific location or require an explicit override instead of silently treating the working directory as Adobe's directory.
    else:
        base_search = Path.cwd()
        user_profiles_dir = Path.cwd() / "installed_dcp"

create_profiles.py:188

  • Compilation failures are only printed and do not affect the final success path: the script still reports "Build complete" and then deploys every existing *.dcp in the output directory. On a rerun, a failed look can therefore install a stale profile from an earlier run, while a partial build is presented as complete. Track the outputs and failures for this invocation and abort or install only successful current outputs before offering deployment.
            if compile_res.returncode == 0 and target_dcp.is_file():
                print(f"  [OK] '{display_name}' -> {target_dcp.name}")
            else:
                err_msg = (compile_res.stderr or compile_res.stdout).strip()
                print(f"  [FAILED] {target_dcp.name}: {err_msg if err_msg else 'Unknown error'}")

create_profiles.py:27

  • The non-Windows/non-macOS branch is also the Linux path, but it never checks an Adobe profile location: it searches only the current directory and installs under the repository's installed_profiles folder. That makes the advertised cross-platform detection/deployment fail on Linux; add a supported platform-specific location or require an explicit override instead of silently treating the working directory as Adobe's directory.
    else:
        base_search = Path.cwd()
        user_profiles = Path.cwd() / "installed_profiles"
  • Files reviewed: 3/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread create_linear.py Outdated
Comment thread create_profiles.py Outdated
@leyyce

leyyce commented Sep 17, 2026

Copy link
Copy Markdown
Author

🟡 Changes recommended

Moderate issues remain with profile filtering and Linux profile discovery/deployment.

Get a fresh assessment by requesting another Copilot review.
Pull request overview

File summaries

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Recommended changes applied in 070deab and 4a18a41.

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