In order to sync with upstream GIT repos, it would be nice if we could export with one file per chapter rather than one file per topic. I understand that content could not be easily re-imported using this mechanism (or could it?) so this should probably not be default. Maybe a switch in the CSP map or something in the CSProcessor API.
You can actually do this already by building with the "--server" hidden option.
Awesome! Why in the world is it called --server ? And why hidden?
It's called --server because we use it for builds done on a server (ie docbuilder), to save time during the publican build, which is also why it's a hidden parameter. For this RFE though, I'd make it visible and make it something more relevant, maybe "--flatten". As for the server part it really should be a configuration component anyways and I did have plans to move it there.
Why not something like --file-per-chapter? By the way, does this still work if you have an article (one file for the whole article) or a part (one file per chapter, and one file per part with xi:includes to each chapter)?
Parts will work as you mentioned. I'm fairly sure articles won't work though, but I'd have to verify that. In saying that, that is a bug and should also be fixed though for this RFE.
Added properly in 0.33.0 We've used the "--flatten" parameter, since it really flattens parts, chapters, appendixes and prefaces and so "--flatten" goes better with the existing "--flatten-topics" option (which flattens the topics folder to remove subdirectories). I've also fixed the bug with articles so that now when using "--flatten" the Article will be flattened down to just the one file (excluding standard Publican files).
0.33.0 has now been released.
Documented.