Comments (7)
Absolutely. That looks like a good path to add to the list.
from psgraph.
PR submitted. I know you have login in Install-GraphViz for Windows and MacOS. For Linux, because of the variability in distos and package managers, I'm not sure of the best options for this command.
For ubuntu (and other debian distros), you would use sudo apt install graphviz
for REHL and other similar distros, it would probably be a yum
command.
from psgraph.
I wasn't sure how to handle all those possibilities either and I'm not sure that command belongs in this module.
from psgraph.
I was thinking more displaying the command but not executing it
from psgraph.
I would be good with that solution. That lets the user make the call.
I guess I we should also include a link to the graphviz documentation on how to download it. https://www.graphviz.org/download
from psgraph.
hi, guys,
I think it would be too bad to have the user usability be diffferent for linux then for macosx and windows.
I perhaps have a small suggestion. Please let me know if this is something that could be acceptable:
<#
.Description
Installs GraphViz package using online provider
.Example
Install-GraphViz
#>
[cmdletbinding( SupportsShouldProcess = $true, ConfirmImpact = "High" )]
param()
process
{
try
{
if ( $IsOSX )
{
if ( $PSCmdlet.ShouldProcess( 'Install graphviz' ) )
{
brew install graphviz
}
}Elseif($IsLinux){
#Get the version, with something like this:
#https://www.cyberciti.biz/faq/how-to-check-os-version-in-linux-command-line/
$LinuxOs = ""
switch($LinuxOs){
"RHEL" {yum graphviz;break}
"Ubuntu"{sudo apt install graphviz;break}
"Default"{throw "Os not supported yet. please open an issue here: https://github.com/KevinMarquette/PSGraph/issues"}
}
}
else
{
if ( $PSCmdlet.ShouldProcess('Register Chocolatey provider and install graphviz' ) )
{
if ( -Not ( Get-PackageProvider | Where-Object ProviderName -eq 'Chocolatey' ) )
{
Register-PackageSource -Name Chocolatey -ProviderName Chocolatey -Location http://chocolatey.org/api/v2/
}
Find-Package graphviz | Install-Package -Verbose -ForceBootstrap
}
}
}
catch
{
$PSCmdlet.ThrowTerminatingError( $PSitem )
}
}
I have no linux machine to test this one unfortunatley. perhaps @tigerfansga could give it a shot?
from psgraph.
One option to look at these is WSL on Windows 10.
I can do some checking on a few different distributions, but the variability in the Linux world will create gaps.
I can't confirm, but you will most likely need to use sudo for REHL with yum.
from psgraph.
Related Issues (20)
- Custom Label HTML
- rank Attributes (namely rankType)
- More examples in readme.md HOT 3
- Problem with chars HOT 2
- Building dependency diagrams
- Error with Installing GraphViz/PsGraph HOT 2
- [Question] Is there any way to set the graph background as transparent? HOT 1
- Node cmdlet conflicts with node.js command name HOT 4
- Export-PSGraph -showgraph and destination path problem HOT 1
- Subgraph cmdlet and the invisible node (A Harry Potter Movie) HOT 2
- Foreign letters gets converted to ? HOT 5
- Add which OS is supported in docs / readme.md
- Doesn't detect Graphviz on linux HOT 3
- Version miss match gallery / master branch? HOT 1
- Detect graphViz outside of -GraphVizPath HOT 2
- Parse Exception HOT 6
- Cylinder Shape HOT 1
- Resolve DestinationPath before passing it to GraphViz
- PSGraph in Azure Pipelines HOT 1
- Setting compound=false fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psgraph.