Skip to content

Commit 3e684f8

Browse files
feat: MathML module ( Fixes #1 )
1 parent e01e774 commit 3e684f8

File tree

2 files changed

+183
-0
lines changed

2 files changed

+183
-0
lines changed

MathML.psd1

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
#
2+
# Module manifest for module 'MathML'
3+
#
4+
# Generated by: PowerPi
5+
#
6+
# Generated on: 10/1/2025
7+
#
8+
9+
@{
10+
11+
# Script module or binary module file associated with this manifest.
12+
RootModule = 'MathML.psm1'
13+
14+
# Version number of this module.
15+
ModuleVersion = '0.0.1'
16+
17+
# Supported PSEditions
18+
# CompatiblePSEditions = @()
19+
20+
# ID used to uniquely identify this module
21+
GUID = '71642e50-216c-4340-b02b-f50cd8a84dca'
22+
23+
# Author of this module
24+
Author = 'James Brundage'
25+
26+
# Company or vendor of this module
27+
CompanyName = 'Start-Automating'
28+
29+
# Copyright statement for this module
30+
Copyright = '2025 Start-Automating'
31+
32+
# Description of the functionality provided by this module
33+
Description = 'MathML and PowerShell'
34+
35+
# Minimum version of the PowerShell engine required by this module
36+
# PowerShellVersion = ''
37+
38+
# Name of the PowerShell host required by this module
39+
# PowerShellHostName = ''
40+
41+
# Minimum version of the PowerShell host required by this module
42+
# PowerShellHostVersion = ''
43+
44+
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45+
# DotNetFrameworkVersion = ''
46+
47+
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48+
# ClrVersion = ''
49+
50+
# Processor architecture (None, X86, Amd64) required by this module
51+
# ProcessorArchitecture = ''
52+
53+
# Modules that must be imported into the global environment prior to importing this module
54+
# RequiredModules = @()
55+
56+
# Assemblies that must be loaded prior to importing this module
57+
# RequiredAssemblies = @()
58+
59+
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60+
# ScriptsToProcess = @()
61+
62+
# Type files (.ps1xml) to be loaded when importing this module
63+
TypesToProcess = @('MathML.types.ps1xml')
64+
65+
# Format files (.ps1xml) to be loaded when importing this module
66+
# FormatsToProcess = @()
67+
68+
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69+
# NestedModules = @()
70+
71+
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72+
FunctionsToExport = 'Get-MathML','Export-MathML', 'Import-MathML'
73+
74+
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75+
CmdletsToExport = '*'
76+
77+
# Variables to export from this module
78+
VariablesToExport = '*'
79+
80+
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
81+
AliasesToExport = 'MathML'
82+
83+
# DSC resources to export from this module
84+
# DscResourcesToExport = @()
85+
86+
# List of all modules packaged with this module
87+
# ModuleList = @()
88+
89+
# List of all files packaged with this module
90+
# FileList = @()
91+
92+
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
93+
PrivateData = @{
94+
95+
PSData = @{
96+
97+
# Tags applied to this module. These help with module discovery in online galleries.
98+
Tags = @('Math', 'MathML')
99+
100+
# A URL to the license for this module.
101+
LicenseURI = 'https://github.com/PowerShellWeb/MathML/blob/main/LICENSE'
102+
103+
# A URL to the main website for this project.
104+
ProjectUri = 'https://github.com/PowerShellWeb/MathML'
105+
106+
# A URL to an icon representing this module.
107+
# IconUri = ''
108+
109+
# ReleaseNotes of this module
110+
ReleaseNotes = @'
111+
## MathML 0.1
112+
113+
* Initial release of MathML (#1)
114+
* Core Commands:
115+
* Get-MathML (#2)
116+
* Export-MathML (#3)
117+
* Import-MathML (#4)
118+
* Extended Types
119+
* `MathML.get_SVG` (#5)
120+
* `MathML.ToString()` (#8)
121+
* `MathML.get/set_ID` (#9)
122+
* MathML schemas included (#7)
123+
* Initial Workflow (#6)
124+
125+
'@
126+
127+
# Prerelease string of this module
128+
# Prerelease = ''
129+
130+
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
131+
# RequireLicenseAcceptance = $false
132+
133+
# External dependent modules of this module
134+
# ExternalModuleDependencies = @()
135+
136+
} # End of PSData hashtable
137+
138+
} # End of PrivateData hashtable
139+
140+
# HelpInfo URI of this module
141+
# HelpInfoURI = ''
142+
143+
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
144+
# DefaultCommandPrefix = ''
145+
146+
}
147+

MathML.psm1

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
$commandsPath = Join-Path $PSScriptRoot Commands
2+
:ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$commandsPath" -Filter "*-*" -Recurse)) {
3+
if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1
4+
foreach ($exclusion in '\.[^\.]+\.ps1$') {
5+
if (-not $exclusion) { continue }
6+
if ($file.Name -match $exclusion) {
7+
continue ToIncludeFiles # Skip excluded files
8+
}
9+
}
10+
. $file.FullName
11+
}
12+
13+
$myModule = $MyInvocation.MyCommand.ScriptBlock.Module
14+
$ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $myModule)
15+
$myModule.pstypenames.insert(0, $myModule.Name)
16+
17+
New-PSDrive -Name $MyModule.Name -PSProvider FileSystem -Scope Global -Root $PSScriptRoot -ErrorAction Ignore
18+
19+
if ($home) {
20+
$MyModuleProfileDirectory = Join-Path ([Environment]::GetFolderPath("LocalApplicationData")) $MyModule.Name
21+
if (-not (Test-Path $MyModuleProfileDirectory)) {
22+
$null = New-Item -ItemType Directory -Path $MyModuleProfileDirectory -Force
23+
}
24+
New-PSDrive -Name "My$($MyModule.Name)" -PSProvider FileSystem -Scope Global -Root $MyModuleProfileDirectory -ErrorAction Ignore
25+
}
26+
27+
# Set a script variable of this, set to the module
28+
# (so all scripts in this scope default to the correct `$this`)
29+
$script:this = $myModule
30+
31+
#region Custom
32+
#endregion Custom
33+
34+
Export-ModuleMember -Alias * -Function * -Variable $myModule.Name
35+
36+

0 commit comments

Comments
 (0)