Giter VIP home page Giter VIP logo

phix's Introduction

Phix is a Sphinx extension which allows you to reference particular ArgoUML
diagrams in a *.zargo file directly in the ReStructuredText source of Sphinx
documentation. Phix creates SVG diagrams from the ArgoUML source and embeds them
in the Sphinx output.

Phix was the sphinx in Greek mythology.

phix's People

Contributors

rob-smallshire avatar

Watchers

 avatar  avatar

phix's Issues

ArgoUML output not going in temporary file

I think the problem is that the output goes to "dump.dat" in the current 
directory 
Instead of to the tmp file. After the error below, I get dump.dat in pwd.


Performing command org.argouml.uml.ui.ActionSaveGraphics( /tmp/tmpJqsc1q.svg ) 
Exiting because we are running in batch. 
Traceback (most recent call last): 
  File "/home/oyvind/oharboe/packages//noarch/argozoom-1_0/argozoom.py", line 114, in <module> 
    process(input, output, js_path) 
  File "/home/oyvind/oharboe/packages//noarch/argozoom-1_0/argozoom.py", line 52, in process 
    tree = xml.parse(input) 
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1177, in parse 
    tree.parse(source, parser) 
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 654, in parse 
    self._root = parser.close() 
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1636, in close 
    self._raiseerror(v) 
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror 
    raise err 
X

Original issue reported on code.google.com by [email protected] on 19 Sep 2011 at 9:56

Embed WebSequenceDiagram code directly in rst file

I'd like to be able to embed the source for a WSD inside the directive, rather 
than specifying a filename, i.e. instead of this

.. websequencediagram:: comms-protocol.txt
  [..etc..]

have this:

.. websequencediagram:: inline
  alice->bob
  bob->alice
  [..etc..]

Original issue reported on code.google.com by [email protected] on 21 Nov 2011 at 3:41

The use of "shell=True" in subprocess.call() doesn't work on linux

If "shell=True" on the subprocess.call/Popen/etc. calls on linux, this results 
in argouml being executed without any arguments being passed to it. By simply 
removing these arguments, phix seems to work like a charm.

NOTE: I would have included a patch, but my editor removes trailing whitespace. 
Since phix.py has lots of that, the diff was big and noisy. 

Original issue reported on code.google.com by austin.bingham on 12 Jul 2011 at 12:36

Latex and LatexPDF targets are broken

What steps will reproduce the problem?

In a documentation project using .dia diagrams run either

    make latex

or

    make latexpdf

What is the expected output? What do you see instead?

A pdf file! :) But what I get instead is:

    Exception occurred:
      File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/writers/latex.py", line 1511, in unknown_visit
        raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
    NotImplementedError: Unknown node: dia

What version of the product are you using? On what operating system?

Ubuntu 12.04 64bit
phix==0.6dev-20110818
Sphinx==1.1.3

Please provide any additional information below.

The complete traceback is:


Traceback (most recent call last):
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 189, in main
    app.build(force_all, filenames)
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/application.py", line 204, in build
    self.builder.build_update()
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 191, in build_update
    self.build(['__all__'], to_build)
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 252, in build
    self.write(docnames, list(updated_docnames), method)
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/builders/latex.py", line 104, in write
    docwriter.write(doctree, destination)
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/writers/__init__.py", line 77, in write
    self.translate()
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/writers/latex.py", line 94, in translate
    self.document.walkabout(visitor)
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/nodes.py", line 173, in walkabout
    if child.walkabout(visitor):
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/nodes.py", line 173, in walkabout
    if child.walkabout(visitor):
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/nodes.py", line 173, in walkabout
    if child.walkabout(visitor):
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/nodes.py", line 173, in walkabout
    if child.walkabout(visitor):
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/nodes.py", line 173, in walkabout
    if child.walkabout(visitor):
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/nodes.py", line 165, in walkabout
    visitor.dispatch_visit(self)
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/docutils/nodes.py", line 1611, in dispatch_visit
    return method(node)
  File "/home/mac/.virtualenvs/docs/local/lib/python2.7/site-packages/sphinx/writers/latex.py", line 1511, in unknown_visit
    raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
NotImplementedError: Unknown node: dia

Original issue reported on code.google.com by [email protected] on 1 Aug 2012 at 12:11

Improved error reporting needed from ArgoUML

There is a problem with Argouml usage if the wrong diagram name in your argouml 
directive. In argouml, your class diagram is named 'foo', but your directive 
was looking for 'bar':

   .. argouml:: rmsunits.zargo
      :diagram: bar <------- This is the problem. It should say 'foo'.
      :border: 1
      :height: 600px
      :new-window:

It would be nice if phix somehow reported this class of problems, though that 
might be difficult.



Original issue reported on code.google.com by [email protected] on 16 Sep 2011 at 8:16

Rewrite Directives so that they can be used as plain rst extensions as well as sphinx extensions

Currently the directives we implement require sphinx to work. This means that 
we can't use them in plain restructured text files, i.e. those being used 
outside of a sphinx build.

I believe that we can rewrite the directives in such a way that they can be 
used in both contexts. If we do this, then we might also want to provide 
specialized rst2[pdf, html, etc.] scripts which enable those extensions. As far 
as I can tell, there's no real way to add extensions purely through an rst 
document.

Original issue reported on code.google.com by austin.bingham on 7 Sep 2011 at 10:22

Fatal exception crashes sphinx while processing a .dia file

The documentation build worked just fine on my Ubuntu 12.04 64bit installation 
under virtualenv, but it broke once I tried to rebuild it at work with an OSX 
machine (v. 10.7.4).

On `make html` I get the following output:

Exception occurred:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

The full traceback is:

# Sphinx version: 1.1.3
# Python version: 2.7.1
# Docutils version: 0.9.1 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/sphinx/cmdline.py", line 189, in main
    app.build(force_all, filenames)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/sphinx/application.py", line 204, in build
    self.builder.build_update()
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 196, in build_update
    'out of date' % len(to_build))
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 252, in build
    self.write(docnames, list(updated_docnames), method)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 292, in write
    self.write_doc(docname, doctree)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/sphinx/builders/html.py", line 419, in write_doc
    self.docwriter.write(doctree, destination)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/docutils/writers/__init__.py", line 77, in write
    self.translate()
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/sphinx/writers/html.py", line 38, in translate
    self.document.walkabout(visitor)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/docutils/nodes.py", line 173, in walkabout
    if child.walkabout(visitor):
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/docutils/nodes.py", line 173, in walkabout
    if child.walkabout(visitor):
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/docutils/nodes.py", line 165, in walkabout
    visitor.dispatch_visit(self)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/docutils/nodes.py", line 1611, in dispatch_visit
    return method(node)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/phix-0.6dev_20110818-py2.7.egg/phix/dia.py", line 285, in html_visit_dia
    render_html(self, node)
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/phix-0.6dev_20110818-py2.7.egg/phix/dia.py", line 260, in render_html
    create_graphics(self, node['uri'], render_path, node.get('postprocess'))
  File "/Users/mac/.virtualenvs/docs/lib/python2.7/site-packages/phix-0.6dev_20110818-py2.7.egg/phix/dia.py", line 186, in create_graphics
    returncode = subprocess.call(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 486, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Original issue reported on code.google.com by [email protected] on 30 Jul 2012 at 7:34

SVG diagrams do not print

What steps will reproduce the problem?
1. 'make singlehtml' with a document containing a slippy SVG
2. load resulting html file in google chrome
3. open up a print preview by going to Print... and see blank diagrams

What is the expected output? What do you see instead?

- Expect all of the SVG image to be visible in the preview and actual print

What version of the product are you using? On what operating system?

phix0.6-dev, on Ubuntu 11.04.  Previewing on Google Chrome on Windows XP



Original issue reported on code.google.com by [email protected] on 20 Sep 2011 at 6:52

factor get_image_filename() into single implementation

get_image_filename() is currently implemented in more than one place (currently 
the dia and argo tools, soon to be websequencediagrams as well.)

It can almost certainly be refactored into a single implementation.

Original issue reported on code.google.com by austin.bingham on 16 Aug 2011 at 11:14

Cryptic stack backtrace when ArgoUML has not been installed.

> make html

Then we get this output:

sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.0.8
loading pickled environment... done
building [html]: targets for 21 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [  4%] 0001_checkpoints/REP_0001                              

Exception occurred:
  File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
The full traceback has been saved in /tmp/sphinx-err-B8fDn3.log, if you want to 
report the issue to the developers.
Please also report this if it was a user error, so that a better error message 
can be provided next time.
Either send bugs to the mailing list at 
<http://groups.google.com/group/sphinx-dev/>,
or report them in the tracker at 
<http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
make: *** [html] Error 1


The error log contains this:
    create_graphics(self, node['uri'], node['diagram'], render_path, node.get('postprocess'))
  File "/usr/lib/python2.6/site-packages/phix-0.6dev_20110818-py2.6.egg/phix/argouml.py", line 195, in create_graphics
    returncode = subprocess.call(command)
  File "/usr/lib64/python2.6/subprocess.py", line 478, in call
    p = Popen(*popenargs, **kwargs)
  File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Original issue reported on code.google.com by [email protected] on 16 Feb 2012 at 1:56

Publish on pypi

I think diagrams, draws and others schemas is a must have in any documentation.
Phix is a great idea, you should publish it on pypi to make it easier to find 
and install.


Original issue reported on code.google.com by [email protected] on 31 Mar 2012 at 10:19

crash when 'postprocess' is not defined

If you use the argouml directive without specifying 'postprocess', sphinx 
crashes. This is because the 'postprocess' key is queried blindly at 
phix/phix.py:312.

The fix is to use dict.get() instead of indexing.

Original issue reported on code.google.com by austin.bingham on 12 Jul 2011 at 12:06

Attachments:

Enhancement for PDF support

Phix should be able to generate a single PDF file showing static versions of 
all the content.  This could then for instance be used in a meeting when the 
web browser doesn't serve SVG, or put in source-control.

Original issue reported on code.google.com by [email protected] on 15 Sep 2011 at 1:15

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.