Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sphinx compiler #21

Merged
merged 3 commits into from Mar 26, 2013
Merged

add sphinx compiler #21

merged 3 commits into from Mar 26, 2013

Conversation

skitazaki
Copy link
Contributor

I've added new compiler to build html documents based on Sphinx. Does it help you?

Example Guardfile is:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from livereload.task import Task
from livereload.compiler import sphinx

Task.add('*.rst', sphinx())

@lepture
Copy link
Owner

lepture commented Mar 22, 2013

@skitazaki I think it is a little annoying to add every possible commands. How about:

Task.add('*.rst', shell('sphinx build ...'))

And then you can call every commands with the shell function.

@skitazaki
Copy link
Contributor Author

@lepture Good idea to add shell function. Do you have any plan to implement it? otherwise, I will try it.
I guess shell can also replace some compilers such as rstc.

@lepture
Copy link
Owner

lepture commented Mar 22, 2013

@skitazaki You can have a try. I'd like to review and merge.

@skitazaki
Copy link
Contributor Author

I've created another changeset. Could you review it?
The usage is:

Task.add('*.txt', shell('sphinx-build ...'))
# or 
Task.add('*.txt', shell('make html'))

shell function can also accept input/output path arguments to support rstc feature, but that may be over engineering.

@lepture
Copy link
Owner

lepture commented Mar 24, 2013

@skitazaki Maybe you could add some docs at docs/compiler.rst.

 else:
        return _compile.get_code

I will not use an else here, because you don't need it.

@skitazaki
Copy link
Contributor Author

@lepture I've added some docs, and remove else statement. thank you for your review.

Though off topic, missing compilers such as LessCompiler exists in document. Are docs obsoleted?

@lepture
Copy link
Owner

lepture commented Mar 26, 2013

@skitazaki They are obsoleted. They are replaced by CommandCompiler.

lepture pushed a commit that referenced this pull request Mar 26, 2013
@lepture lepture merged commit 83c72ca into lepture:master Mar 26, 2013
@lepture
Copy link
Owner

lepture commented Mar 26, 2013

@skitazaki Thanks. I would be happy, if you can make the documentation right on LessCompiler etc...

@skitazaki
Copy link
Contributor Author

@lepture thank you to merge. I will update documents on the another pull request.

@skitazaki skitazaki deleted the compiler-sphinx branch March 26, 2013 13:22
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.

None yet

2 participants