farazdagi/phrozn — pull request #53 by llaville (2012-09-21 08:15:16+00:00)
Title: Fixed use_ansi_colors option in all context (and add windows compatibility)

Hello,

I've begun to play with Phrozen 0.4.1 few days ago, and while I like to appreciate features, I was sad to see windows incompatibility.

It's not really a problem, and I can contribute to add such compatibility.

First we can consider to fix the issue about configuration option use_ansi_colors that did not work in all context.

On Windows, ANSI color code are not supported. So I've tried to switch off the option in %data_dir%\Phrozn\configs\phrozn.yml

use_ansi_colors: false

But, if it's solve the _help_ and _init_ command, it did not solve the _up_ command

Current output

Phrozn 0.4.1 by Victor Farazdagi

Starting static site compilation.

[OK] Source directory located: D:\Phrozen_dest_dir/.phrozn/
[OK] Destination directory located: D:\Phrozen_dest_dir/
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir\.phrozn\entries\about.twig←[0m parsed
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir/about/index.html←[0m written
[←[31mFAIL←[0m] D:\Phrozen_dest_dir\.phrozn\entries\demos\modal.twig: View source file cannot be read:
[←[31mFAIL←[0m] D:\Phrozen_dest_dir\.phrozn\entries\demos\popup.twig: View source file cannot be read:
[←[31mFAIL←[0m] D:\Phrozen_dest_dir\.phrozn\entries\demos\tabs.twig: View source file cannot be read:
[←[31mFAIL←[0m] D:\Phrozen_dest_dir\.phrozn\entries\demos\twipsy.twig: View source file cannot be read:
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir\.phrozn\entries\index.twig←[0m parsed
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir/index.html←[0m written
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir\.phrozn\styles\bootstrap.less←[0m parsed
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir/styles/bootstrap.css←[0m written
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir\.phrozn\styles\default.less←[0m parsed
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir/styles/default.css←[0m written
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir\.phrozn\scripts\default.js←[0m parsed
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir/scripts/default.js←[0m written
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir\media\img\README←[0m copied
[←[32mOK←[0m] ←[34mD:\Phrozen_dest_dir\media\README←[0m copied

Phrozn is extremely flexible static site generator for PHP.
For additional information, see http://phrozn.info

And expected output

Phrozn 0.4.1 by Victor Farazdagi

Starting static site compilation.

[OK] Source directory located: D:\Phrozen_dest_dir/.phrozn/
[OK] Destination directory located: D:\Phrozen_dest_dir/
[OK] D:\Phrozen_dest_dir\.phrozn\entries\about.twig parsed
[OK] D:\Phrozen_dest_dir/about/index.html written
[FAIL] D:\Phrozen_dest_dir\.phrozn\entries\demos\modal.twig: View source file cannot be read:
[FAIL] D:\Phrozen_dest_dir\.phrozn\entries\demos\popup.twig: View source file cannot be read:
[FAIL] D:\Phrozen_dest_dir\.phrozn\entries\demos\tabs.twig: View source file cannot be read:
[FAIL] D:\Phrozen_dest_dir\.phrozn\entries\demos\twipsy.twig: View source file cannot be read:
[OK] D:\Phrozen_dest_dir\.phrozn\entries\index.twig parsed
[OK] D:\Phrozen_dest_dir/index.html written
[OK] D:\Phrozen_dest_dir\.phrozn\styles\bootstrap.less parsed
[OK] D:\Phrozen_dest_dir/styles/bootstrap.css written
[OK] D:\Phrozen_dest_dir\.phrozn\styles\default.less parsed
[OK] D:\Phrozen_dest_dir/styles/default.css written
[OK] D:\Phrozen_dest_dir\.phrozn\scripts\default.js parsed
[OK] D:\Phrozen_dest_dir/scripts/default.js written
[OK] D:\Phrozen_dest_dir\media\img\README copied
[OK] D:\Phrozen_dest_dir\media\README copied

Phrozn is extremely flexible static site generator for PHP.
For additional information, see http://phrozn.info

My solution is provided by this pull request