Attached patch includes coder_format.cmd, a Windows batch script for executing Coder Format by click (via Windows Explorer context menu) on single PHP files or complete directory trees.

The script comes along with a Windows registry file to install the Windows Explorer context menu items and another one to remove them.

README is removed and replaced by README.txt, including detailed step-by-step installation instructions.

Comments

ezyang’s picture

StatusFileSize
new1.86 KB

The first order of business is to get coder_format working on Windows. This patch fixes a number of problems I found. Specifically:

  • There were bad replacements for Windows/Mac newline normalization, resulting in literal "\n"s all over the place
  • coder_postprocessor_array_rearrange totally nukes the file contents, so it had to be completely disabled. I'll see if I can fix it.
  • A conf_path() dependency was recently added, so I stubbed that function too

Coder needs a dose of its own medicine, but that will be done in good time. :-)

ezyang’s picture

Assigned: sun » ezyang
StatusFileSize
new4.83 KB

Here are the changes coder identified for the action.inc file. Most of them are sensible, but a few are hazy. Specifically:

  • -46,9 +47,9; -75,12 +76,13; -93,9 +95,9: The spacing added to justify the three assignments seems excessive. Maybe coder should have an "upper limit" of how far it goes before it gives up and starts another batch?
  • -210,9 +211,9: Coder appears to have collapsed the indent here; how curious!
ezyang’s picture

Assigned: ezyang » Unassigned

Ehh... I posted these two patches on the wrong issue! Oops!

ezyang’s picture

StatusFileSize
new11.25 KB

post scrubbed

sun’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: Unassigned » sun
Category: feature » task
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new11.43 KB

As promised, here is a patch that updates the coder_format Windows installer to my latest version (in use), fixes the start-up script coder_format.php, and also fixes some pre/post-processors that are not yet working (and part of http://drupal.org/node/208767).

sun’s picture

StatusFileSize
new32.94 KB

Same patch for 5.x-2.x.
Includes updated inline documentation of 6.x.

@Doug/Stella: Please commit this as soon as possible, so ezyang can use the latest code for the GHOP task.

douggreen’s picture

Status: Reviewed & tested by the community » Fixed

committed, also @sun, please see email I sent to you. Thanks!

douggreen’s picture

Status: Fixed » Reviewed & tested by the community

doh! I just noticed that I committed this against 5.x and not 6.x. You might want to fix this yourself.

sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed to 5.x and 6.x branches.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.