Code Monkey home page Code Monkey logo

ansible-userguide-pdf's People

Contributors

bgazzera avatar bonndan avatar fossilet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-userguide-pdf's Issues

Minor additions

Hi there!

First of all very many thanks for putting this generator together. I find it essential for anyone learning Ansible, as browsing through the docs site is a pain.

I couple of minor corrections / additions to the README.

First there is a typo, where:
python build_site.py ../ansible/docsite/rst/
should be:
python build-site.py ../ansible/docsite/rst/

Also when I first tried to build, pdflatex complained
! LaTeX Error: File 'cmap.sty' not found.
after some research I found that I was missing the texlive-latex-recommended package.

If you don't mind, I can make this corrections and send a PR your way.

Thanks again

ValueError: unknown locale: UTF-8

When I was trying to run python build-site.py ../ansible/docsite/rst/, I got the following error:

Traceback (most recent call last):
  File "build-site.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/usr/local/lib/python2.7/site-packages/sphinx/application.py", line 26, in <module>
    from docutils.parsers.rst import convert_directive_function, \
  File "/usr/local/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 74, in <module>
    import docutils.statemachine
  File "/usr/local/lib/python2.7/site-packages/docutils/statemachine.py", line 113, in <module>
    from docutils import utils
  File "/usr/local/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "/usr/local/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/usr/local/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

Fix modules and TOC in generated PDF

I kept digging and it seems that to generate the full documentation, including all the modules, and a working TOC you have to execute a couple of Makefiles.

In ansible/docsite, I edited the build-site.py just as you did, replacing the buildername from html to "latex"
Then I run make docs that in turn runs ansible/hacking/module_formatter.py that as far as I see adds a footer to every module section and not much.
Then cd htmlout and make

And I got a nice formatted TOC.

Inside the Makefile I see that LaTex is run several times, as you suggested.

    %.pdf: %.tex
        $(PDFLATEX) $(LATEXOPTS) '$<'
        $(PDFLATEX) $(LATEXOPTS) '$<'
        $(PDFLATEX) $(LATEXOPTS) '$<'
        -$(MAKEINDEX) -s python.ist '$(basename $<).idx'
        $(PDFLATEX) $(LATEXOPTS) '$<'
        $(PDFLATEX) $(LATEXOPTS) '$<'

So instead of running pdflatex --interaction=nonstopmode ansible.tex maybe a better option is to direct people to just run make. But of course, it's your call. And again if you feel that the suggestion helps, I'll PR it to you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.