Closed oli-obk closed 8 years ago
@oli-obk looks fine to me; I know I'll miss having to use String
instead of &'static str
string literals, but that is not a real serious problem here.
You should feel free to rename the run_pandoc
method though. In particular, I've wondered if the name should change to reflect the fact that it is taking a src_dir
rather than a single source file... if you have any inspiration about how to do such a renaming, I'm sure it will be better than what I started with.
(There's also the fact that run_pandoc
assumes that its starting in a src/
subdirectory of src_dir
, ugh! Maybe it would in fact be best just to kill off all of commit 6edc1b4 ... it won't be a hardship for me, I can just put them into my tango
crate instead.)
(There's also the fact that run_pandoc assumes that its starting in a src/ subdirectory of src_dir, ugh! Maybe it would in fact be best just to kill off all of commit 6edc1b4 ... it won't be a hardship for me, I can just put them into my tango crate instead.)
that would probably be the best, as it's very tailored towards tango
I know I'll miss having to use String instead of &'static str string literals, but that is not a real serious problem here.
I can add convenience methods on the Pandoc
object for more of the PandocOption
variants. Since these can be generic over AsRef<str>
or AsRef<Path>
, they are very convenient to use.
cc @pnkfelix cc https://github.com/pnkfelix/cmd-pandoc/issues/1
I've taken care to make sure using the
Pandoc
object doesn't break anybody's code. I added a convenience function that should do exactly what yourrun_pandoc
function did. You should be able to exchange your previous call (cmd-pandoc::run_pandoc
) withpandoc::Pandoc::run_pandoc
(yes horrible naming) and all that will break is the requirement that you pass owned objects likeString
andPathBuf
instead of&str
andPath
. We can iterate on the design from here on.