Code Monkey home page Code Monkey logo

graphvizer's People

Contributors

hao-lee avatar michaelblyons 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  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  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  avatar  avatar

graphvizer's Issues

Navigating in image

It would be nice to navigate from one part of the graph to another holding left mouse button (like in Photoshop space button) and zoom-in zoom-out holding right mouse button (like in Photoshop z button). Using SVG would be more useful for zooming instead of PNG.

'dot' is not recognized as an internal or external command

I don't have the dot.exe location in my path, so I set the setting dot_cmd_path to the full path of dot.exe.

{
	"dot_cmd_path": "C:\\Graphviz\\bin\\dot.exe"
}

When I build, it seems the path from settings is not used. It is just calling dot.

Output:

'dot' is not recognized as an internal or external command,
operable program or batch file.
[Finished in 57ms with exit code 1]
[shell_cmd: dot "C:\Whatever\TheName.dot" -O -Tpng]

Sublime Text 4166
Windows 10

Does not work on windows 10

  1. cmd dot -V shows 2.38 version.
  2. Graphvizer installed manually.
  3. Syntax is set to Graphviz (DOT).

Graphvizer -> Open Rendered Image
is not availiable.

Graphvizer -> Show Graphvizer Panel
shows empty window.

image

Image not displaying when viewing HTML document in Chrome

Hi there

I am very new to HTML (have only been learning for a day or so) I watched a youtube tutorial and followed every step but the result is not the same so I guess I need someone who know a lot more about HTML than me to have a look.
Screenshot 2021-10-11 at 22 14 06
.
See the screen shot attached, all i am trying to do is place an image in a table row but each time input the attached code I just get the 'loading image' icon rather than the image itself: please help.

v3 is not live

Did you forget to git push --tags, or are you still getting more stuff ready? 😉

"Open Rendered Image" greyed out & inactive Graphvizer panel

Hello,
Thank you for developing this plug-in which i believe can be super helpful!
I've been going through all the steps you wrote to install and run it. Unfortunately, even though I installed it, it seems that its main functionalities do not work properly for me.
The "Open Rendered Image" command is greyed out (so I cannot run it), and the Graphvizer panel does not react to the code I write above. Any idea what I should do to fix it?
I'm running on windows 10.
Best
Paul

bugs

Execution limits would be very helpful

Basically, I'm working on a graph with ~2000 nodes and ~3000 edges.

Feeding this to graphvis natively makes it completely poop itself. dot.exe spun using all of a core for about 10 minutes before I killed it.

Right now, every time I save the file in the editor, it re-spawns dot.

It'd be nice if there was a way to say "if dot takes more then n seconds, just kill it".

Unable to render images, Python and Permission errors?

Problem: Graphvizer does not render new images on edit, save, or build on a fresh installation.
Sublime Console Output on Startup:

DPI mode: per-monitor v2
startup, version: 3211 windows x64 channel: stable
executable: /C/Program Files/Sublime Text 3/sublime_text.exe
working dir: /C/Program Files/Sublime Text 3
packages path: /C/Users/../AppData/Roaming/Sublime Text 3/Packages
state path: /C/Users/../AppData/Roaming/Sublime Text 3/Local
zip path: /C/Program Files/Sublime Text 3/Packages
zip path: /C/Users/../AppData/Roaming/Sublime Text 3/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.098884
startup time: 0.143884
first paint time: 0.145884
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.50-enum
reloading plugin 0_package_control_loader.50-typing
reloading plugin Graphvizer.graphvizer
reloading plugin Graphvizer.syntaxchecker
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
plugins loaded
Exception in thread Thread-1:
Traceback (most recent call last):
  File "./python3.3/subprocess.py", line 1104, in _execute_child
PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "C:\Users\..\AppData\Roaming\Sublime Text 3\Installed Packages\Graphvizer.sublime-package\graphvizer.py", line 112, in dot_thread
    cwd=self.get_cwd(view))
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1110, in _execute_child
PermissionError: [WinError 5] Access is denied

Package Control: Skipping automatic upgrade, last run at 2020-09-30 14:01:13, next run at 2020-09-30 15:01:13 or after

Procedure followed

Versions
Windows 10 x64 (1903)
Sublime V3.2.2 (3211)
Python3 V3.8.6
Graphviz V2.44.1 (20200629.0800)

Process
0. A recent copy of Python3 and GraphViz are installed and were previously added to my system path.

  1. I installed Graphvizer on a fresh installation of Sublime via the Package Manager.
  2. I opened the settings config via Preferences -> Package Settings -> Graphizer -> Settings.
  3. Added dot path and changed display setting (see attachments).
    Graphvizer:sublime-settings -- User

// Settings in here override those in the left side

{
"dot_cmd_path": "C:\Program Files (x86)\GraphViz\bin",
"show_image_with": "tab",
}

  1. Began a new file, set the syntax to "Graphviz (DOT)" via View -> Syntax.
  2. Created a new file, Edited, Saved, Deleted, and repeat for the following code:
    example.dot
digraph example {
	node1 [
		shape=record,
		label="<f0> test"
	];
	node1:f0->a;
	a->b->c;
	b->e;
}
  1. Manually generated the image from command prompt.
    image
  2. Edited, saved, example.dot. No render occurred.
  3. Ran sublime with and without administrative permissions (steps 3-6).
    image

'Loading image...' gets displayed but no image gets displayed Mac OS High Sierra

Hi hao-lee,

Excellent initiative! I've been dreaming of something like this for ages. I tried to install it on my Mac (High Sierra 10.13.6). The Graph does not get displayed.

I though it might be a permissions issue for the temporary folder, so I created a specific temp folder in the user settings, but Graphvizer is still trying to access the system temp folder.

my 'dot' is on the path, I can type 'dot - v' in the Terminal and I get a version.

Would love to get this working on my machine.

Thanks,
Andrew Magerman

screen shot 2019-02-04 at 11 01 43
screen shot 2019-02-04 at 11 01 28

UTF8 text is not supported?

It seems that UTF8 text is not supported.

graph {
	图
}

and the error in console:

[2020-03-24 11:56:51] - Lexical Error: line 2, column 1: token recognition error at: '图'

Feature Request: Display Custom Images

Hi,

Thank you so much for this wonderful plugin! :-)

I have a feature request, that hopefully would add value.

Would it be possible to also render custom images? I think the screen shot below describe it best, but at a high level, I have some custom images I like to use for nodes, and it would be helpful if they also rendered in the previewer.

digraph G {

    compound = true;

    label = "Machine Architecture";
    labelloc = "t";
    fontsize = 30;

    {
        node [shape=box];
        Machine0 [label = "", penwidth=0, shapefile="pc.png", width=0.5, height=0.5, fixedsize="true"];
        MachineX [label = "MachineX"];
        MachineY [label = "MachineY"];
    }

    {
        rank = same;
        MachineX MachineY;
    }

   Machine0 -> MachineX -> MachineY;

}


Previewer

image



dot -Tpng dummy-file.dot -o sample-diagram.png

image

Saving the image

Hi,

I don't know if I am just blind but I would really enjoy being able to set where the resulting image is saved.
I am having problems running my dot script in the Terminal. But Sublime + Graphvizer work perfectly, so it would be great to not have to deal with the tmp-directory or the Terminal but just save it where I need it.

Thank you for the great package!

Ability to generate on save

I have pretty big graph and it took much time to generate image. The ability to generate only on save or on another event may be pretty helpful.

实时渲染时,日志输出的字符串有问题

系统:win10
版本:st3

如果输入一个错误的属性值,日志输出面板打印的错误信息是字节数组,而非字符串。

例如:

[2020-03-04 20:37:59] - [87, 97, 114, 110, 105, 110, 103, 58, 32, 65, 114, 114, 111, 119, 32, 116, 121, 112, 101, 32, 34, 115, 34, 32, 117, 110, 107, 110, 111, 119, 110, 32, 45, 32, 105, 103, 110, 111, 114, 105, 110, 103, 13, 10]

我尝试解决了一下,应该跟 subprocess 库的 communicate 函数返回值处理有关。
我改了下面的代码:

if len(stdout) != 0:
	self.print(stdout.decode().strip())
if len(stderr) != 0:
	self.print(stderr.decode().strip())

修改之后,日志打印正常:

[2020-03-04 21:25:43] - Warning: Arrow type "s" unknown - ignoring

Queue being overflowed on frequent changes in source

Hello!
Thank you for great package, it's very convenient and really saves a lot of time for me!

There's one problem though: if you make a lot of frequent changes the rendering queue is being overflowed because package tends to render EACH of the intermediate changes. You can easily simulate this issue by adding a node with label and starting furiously clapping on random keys adding symbols to label. At some moment sublime text starts responding very slowly (see attached gif). I can live with ST being a bit slow but if the diagram is big, it just freezes and I have to restart it.

I've provided a simple solution below. Adding these two lines of code we tell rendering thread to only process the most recent change, skipping all the intermediate ones (which is exactly what we expect from it). It works for me, ST no longer freezes.

I don't mind if you find another solution, it's the solving of the issue what I am concerned about.

Thank you!

gr

Same situation after this fix applied:

gr2

Solution:

def dot_thread(self):
	while True:
		while self.queue_rendering.qsize() > 1:  # added line 1
			self.queue_rendering.get()  # added line 2
		contents = self.queue_rendering.get(block=True, timeout=None)

Image has not been rendered

Graphvizer Installation? Done!
Set the language to Graphviz(dot)? Done!

Digraph G {
123
}

CTRL+SHIFT+G

"Image has not been rendered" WHY?

TimeoutExpired exception not found

Hi!
Plugin often crashes lately with the following output in the console:

indexing [job 63]: no files were indexed out of the 54 queued, abandoning crawl
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/Users/***/Library/Application Support/Sublime Text 3/Packages/Graphvizer/graphvizer.py", line 72, in dot_thread
    stdout, stderr = process.communicate(timeout=self.dot_timeout)
  File "./python3.3/subprocess.py", line 920, in communicate
  File "./python3.3/subprocess.py", line 1556, in _communicate
  File "./python3.3/subprocess.py", line 1644, in _communicate_with_poll
  File "./python3.3/subprocess.py", line 946, in _check_timeout
subprocess.TimeoutExpired: Command '['dot', '/var/folders/0y/m29sdh053119js5w5rtg58740000gn/T/graphvizer.dot', '-Tpng', '-o', '/var/folders/0y/m29sdh053119js5w5rtg58740000gn/T/graphvizer.png']' timed out after 3 seconds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/***/Library/Application Support/Sublime Text 3/Packages/Graphvizer/graphvizer.py", line 73, in dot_thread
    except TimeoutExpired:
NameError: global name 'TimeoutExpired' is not defined

I guess changing except TimeoutExpired: to except subprocess.TimeoutExpired: will fix the issue

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.