Giter Club home page Giter Club logo

diagrammer.core's Introduction

Buy Me a Coffee at ko-fi.com

Diagrammer.Core

Diagrammer.Core is a PowerShell module which provides the core framework for generating as built diagrams for many common datacenter systems. The Diagrammer.Core module is required by each individual diagrammer module used to generate as built diagrams for a specific product and/or technology.

๐Ÿ”ฐ Getting Started

The following simple list of instructions will get you started with the Diagrammer.Core module.

๐Ÿ’พ Supported Versions

PowerShell

This module is compatible with the following PowerShell versions;

Windows PowerShell 5.1 PowerShell 7
โœ… โœ…

๐Ÿ”ง System Requirements

PowerShell 5.1, and the following PowerShell modules are required for generating a Diagrammer.Core diagram.

๐Ÿ“ฆ Module Installation

PowerShell

Online Installation

For an online installation, install the Diagrammer.Core module using the PowerShell Gallery;

# Install Diagrammer.Core module
Install-Module -Name 'Diagrammer.Core' -Repository 'PSGallery' -Scope 'CurrentUser'

Offline Installation

For an offline installation, perform the following steps from a machine with internet connectivity;

Save the required Diagrammer.Core module to a specified folder.

# Save Diagrammer.Core module
Save-Module -Name 'Diagrammer.Core' -Repository 'PSGallery' -Path '<Folder Path>'

Copy the downloaded Diagrammer.Core module folder to a location that can be made accessible to the offline system. e.g. USB Flash Drive, Internal File Share etc.

On the offline system, open a PowerShell console window and run the following command to determine the PowerShell module path.

Windows

$env:PSModulePath -Split ';'

macOS & Linux

$env:PSModulePath -Split ':'

Copy the downloaded Diagrammer.Core module folder to a folder specified in the $env:PSModulePath output.

GitHub

If you are unable to use the PowerShell Gallery, you can still install the Diagrammer.Core module manually. Ensure you repeat the following steps for the system requirements also.

  1. Download the latest release zip from GitHub
  2. Extract the zip file
  3. Copy the folder Diagrammer.Core to a path that is set in $env:PSModulePath.
  4. For Windows users only, open a PowerShell terminal window and unblock the downloaded files with
    $path = (Get-Module -Name Diagrammer.Core -ListAvailable).ModuleBase; Unblock-File -Path $path\*.psd1; Unblock-File -Path $path\Src\Public\*.ps1
  5. Close and reopen the PowerShell terminal window.

Note: You are not limited to installing the module to those example paths, you can add a new entry to the environment variable PSModulePath if you want to use another path.

โŒ Known Issues

diagrammer.core's People

Contributors

rebelinux avatar

Watchers

 avatar  avatar

diagrammer.core's Issues

[Feature Request] Add the option to specify a different icon per object in the Get-DiaHTMLNodeTable module

Description

Currently the Get-DiaHTMLNodeTable module does not allow you to specify an icon type per object. The problem is that one type of icon is used for all members of the html table.

Additional Context

No response

Before submitting

  • I have read the documentation, and referred to the known issues before submitting this change request.
  • I have checked for previously opened & closed issues before submitting this change request.

Fixing Out-Diagram's cmdlet mess... My mess

Description

Evaluate the possibility to split the Out-Diagram by $format.

One Out-Diagram per format

Out-PNG-Diagram
Out-SVG-Diagram
etc..

Additional Context

No response

Before submitting

  • I have read the documentation, and referred to the known issues before submitting this change request.
  • I have checked for previously opened & closed issues before submitting this change request.

Validate if the extension is the right one based on the file name provided.

Description

There are cases where if you provide a file name (output.svg) and format (.png) the output file is in png format, but has the svg extension.

It is necessary to validate the format and extension to make sure they are correct. If not, the script should terminate (throw)....

Additional Context

PS C:\Users\jocolon> new-addiagram -Target server-dc-01v.pharmax.local -Credential $Cred -Format png -DiagramType Sites -Direction top-to-bottom -OutputFolderPath C:\Users\jocolon -Filename outputpng.svg -Rotate 180
Please wait while the Microsoft.AD diagram is being generated.
PS C:\Users\jocolon> 
Microsoft.AD diagram 'outputpng.svg' has been saved to 'C:\Users\jocolon'
PS C:\Users\jocolon> 

Before submitting

  • I have read the documentation, and referred to the known issues before submitting this change request.
  • I have checked for previously opened & closed issues before submitting this change request.

Add watermark support

Description

Investigate if there is a way to add a watermark to the output image.

Additional Context

string root = HttpContext.Current.Server.MapPath("~/Images/download.jpg");    
System.Drawing.Image bitmap = (System.Drawing.Image)Bitmap.FromFile(root); // set image     
Font font = new Font("Arial", 20, FontStyle.Italic, GraphicsUnit.Pixel);    
Color color = Color.FromArgb(255, 255, 0, 0);    
Point atpoint = new Point(bitmap.Width / 2, bitmap.Height / 2);    
SolidBrush brush = new SolidBrush(color);    
Graphics graphics = Graphics.FromImage(bitmap);    
StringFormat sf = new StringFormat();    
sf.Alignment = StringAlignment.Center;    
sf.LineAlignment = StringAlignment.Center;    
graphics.DrawString("Madan S B", font, brush, atpoint, sf);    
graphics.Dispose();    
MemoryStream m = new MemoryStream();    
bitmap.Save(m, System.Drawing.Imaging.ImageFormat.Jpeg);    
byte[] convertedToBytes = m.ToArray();    
string saveto= HttpContext.Current.Server.MapPath("~/Images/test.jpg");    
System.IO.File.WriteAllBytes(saveto, convertedToBytes );   

Before submitting

  • I have read the documentation, and referred to the known issues before submitting this change request.
  • I have checked for previously opened & closed issues before submitting this change request.

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.