Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3e12d04
feat: MarkX.get_Lexicon ( Fixes #25 )
StartAutomating Jan 9, 2026
fa5d8de
feat: MarkX.get_Lexicon ( Fixes #25 )
Jan 9, 2026
b744743
feat: MarkX.Input and Help support ( Fixes #27, Fixes #28 )
StartAutomating Jan 9, 2026
fc4a384
feat: MarkX.Input and Help support ( Fixes #27, Fixes #28 )
Jan 9, 2026
81c70b8
docs: MarkX Help ( Fixes #26 )
StartAutomating Jan 9, 2026
cbb389a
feat: MarkX.Headings ( Fixes #29 )
StartAutomating Jan 9, 2026
a812993
feat: MarkX.Headings ( Fixes #29 )
Jan 9, 2026
e14a13e
docs: Adding Lexicon example and updating readme ( Fixes #25 )
StartAutomating Jan 9, 2026
172ad11
docs: Adding help example and updating readme ( Fixes #27 )
StartAutomating Jan 9, 2026
554a3a8
feat: MarkX Help Support ( Fixes #27 )
StartAutomating Jan 9, 2026
be4c398
feat: MarkX Help Support ( Fixes #27 )
Jan 9, 2026
754c370
feat: MarkX.Input ( Fixes #28 )
StartAutomating Jan 11, 2026
44d206a
feat: MarkX.Input ( Fixes #28 )
Jan 11, 2026
c3eaaac
feat: MarkX.Input ( Fixes #28 )
StartAutomating Jan 11, 2026
fc2f2ba
feat: MarkX.Input ( Fixes #28 )
Jan 11, 2026
d119e8b
feat: MarkX.get_Code ( Fixes #30 )
StartAutomating Jan 12, 2026
24b3a52
feat: MarkX.get_Code ( Fixes #30 )
Jan 12, 2026
e5f9602
feat: MarkX.get_Code ( Fixes #30 )
StartAutomating Jan 12, 2026
cb39b08
feat: MarkX.get_CodeBlock ( Fixes #31 )
StartAutomating Jan 12, 2026
e66d492
feat: MarkX.get_CodeBlock ( Fixes #31 )
Jan 12, 2026
92822ad
feat: MarkX.YamlHeader ( Fixes #32, Fixes #33 )
StartAutomating Jan 12, 2026
b879797
feat: MarkX.YamlHeader ( Fixes #32, Fixes #33 )
Jan 12, 2026
796dc27
feat: MarkX.YamlHeader ( Fixes #32, Fixes #33 )
StartAutomating Jan 12, 2026
6b61634
feat: MarkX.YamlHeader ( Fixes #32, Fixes #33 )
Jan 12, 2026
db60b52
feat: Get-MarkX input improvement ( Fixes #28 )
StartAutomating Jan 12, 2026
ceb47d2
feat: MarkX.Sync file input support ( Fixes #34 )
StartAutomating Jan 12, 2026
74b4b25
Merge branch 'lexmark' of https://github.com/StartAutomating/MarkX in…
StartAutomating Jan 12, 2026
81c9793
feat: MarkX.Header ( Fixes #33 )
StartAutomating Jan 12, 2026
b4a48ad
feat: MarkX.Header ( Fixes #33 )
Jan 12, 2026
57c4b79
feat: MarkX.ToString flexibility ( Fixes #35 )
StartAutomating Jan 12, 2026
854248a
feat: MarkX.ToString flexibility ( Fixes #35 )
Jan 12, 2026
7207920
fix: Fixing aliasing and adding code example
StartAutomating Jan 12, 2026
c751c54
fix: Fixing aliasing and adding code example
Jan 12, 2026
077ac02
docs: Updating README and source
StartAutomating Jan 12, 2026
8f65226
feat: MarkX formatting ( Fixes #36 )
StartAutomating Jan 12, 2026
f61f8f9
feat: MarkX formatting ( Fixes #36 )
Jan 12, 2026
3eaf84a
feat: MarkX formatting ( Fixes #36 )
StartAutomating Jan 12, 2026
8caab61
release: MarkX 0.1.1
StartAutomating Jan 12, 2026
a0d93d5
release: MarkX 0.1.1
StartAutomating Jan 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## MarkX 0.1.1:

* MarkX Help (#26)
* MarkX now accepts commands / help (#27)
* MarkX.Headings gets heading elements (#29)
* MarkX.Lexicon gets lexicons in Markdown (#25)
* MarkX.YamlHeader support (#32, #33)
* Allowing piped markdown file input (#34)
* MarkX.Code gets code within markdown (#30)
* MarkX.CodeBlock gets code blocks within markdown (#31)
* MarkX.ToString can now stringify any property (#35)
* MarkX formatting (#36)

---

## MarkX 0.1:

* `Get-MarkX` ( #1, #4 )
Expand Down
57 changes: 50 additions & 7 deletions Commands/Get-MarkX.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,57 @@
function Get-MarkX {
[Alias('MarkX','Markdown','Get-Markdown')]
<#
.SYNOPSIS
Gets MarkX
.DESCRIPTION
Gets MarkX - Markdown as XML

This allows us to query, extract, and customize markdown.
.EXAMPLE
# 'Hello World' In Markdown / MarkX
'# Hello World' | MarkX
.EXAMPLE
# MarkX is aliased to Markdown
# 'Hello World' as Markdown as XML
'# Hello World' | Markdown | Select -Expand XML
.EXAMPLE
# We can generate tables by piping in objects
@{n1=1;n2=2}, @{n1=2;n3=3} | MarkX
.EXAMPLE
# Make a TimesTable in MarkX
@(
"#### TimesTable"
foreach ($rowN in 1..9) {
$row = [Ordered]@{}
foreach ($colN in 1..9) {
$row["$colN"] = $colN * $rowN
}
$row
}
) | Get-MarkX
.EXAMPLE
# We can pipe a command into MarkX
# This will get the command help as Markdown
Get-Command Get-MarkX | MarkX
.EXAMPLE
# We can pipe help into MarkX
Get-Help Get-MarkX | MarkX
.EXAMPLE
# We can get code from markdown
Get-Help Get-MarkX |
MarkX |
Select-Object -ExpandProperty Code
#>
[Alias('MarkX','Markdown','Get-Markdown')]
param()

$allInput = @($input) + $(if ($args) {
$args
})
})

[PSCustomObject]@{
PSTypeName = 'MarkX'
Markdown = $allInput
YamlHeader = $yamlheader
}

$markx = New-Object PSObject -Property @{
PSTypeName = 'MarkX'
}
$markx.Input = $allInput
$markx
}
27 changes: 27 additions & 0 deletions MarkX.format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Generated with EZOut 2.0.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<Configuration>
<ViewDefinitions>
<View>
<Name>MarkX</Name>
<ViewSelectedBy>
<TypeName>MarkX</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap />
<TableColumnItems>
<TableColumnItem>
<PropertyName>Markdown</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
93 changes: 93 additions & 0 deletions MarkX.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

"@ | MarkX

@"

[![MarkX PowerShell Gallery](https://img.shields.io/powershellgallery/dt/MarkX)](https://www.powershellgallery.com/packages/MarkX/)

"@ | MarkX

@'

Expand Down Expand Up @@ -226,3 +231,91 @@ $(& $GetMarkdownTableData)

"@ | MarkX


$lexiconMarkdown = @'


### Markdown Lexicons

Since we can extra tables and data Markdown, we can also get any data of a particular known shape.

The first special shape MarkX supports is an [at protocol lexicon](https://atproto.com/guides/lexicon)

MarkX current supports lexicon type definitions. It will support query and procedure definitions in the future.

A type definition consists of a namespace identifier, a description, and a series of properties.

#### com.example.happy.birthday
> An example lexicon to record birthday messages

|Property|Type|Description|
|-|-|-|
|`$type` | `[string]` | The type of the object. Must be `com.example.happy.birthday` |
|**`message`**| `[string]` | A birthday message |
|`forUri` | `[uri]` | A link |
|`birthday` | `[datetime]` | The birthday |
|`createdAt` | `[datetime]` | The time the record was created |

'@ | MarkX

$lexiconMarkdown


$lexiconJson = $lexiconMarkdown.Lexicon | ConvertTo-Json -Depth 5

$lexiconMarkdownExample = @'


To extract out a lexicon from the text above, we can:

~~~PowerShell
$lexiconMarkdown.Lexicon | ConvertTo-Json -Depth 5
~~~

Which gives us:

'@ + @"

~~~json
$lexiconJson
~~~

As you can see, we can take rich data within Markdown and process it into lexicons (or anything else we might want)
"@

$lexiconMarkdownExample | MarkX


$selfHelp = {Get-Help Get-MarkX | MarkX}

$markdownHelp = @"

### Markdown Help

PowerShell commands generally contain help.

We can pipe Get-Help into MarkX to get help as markdown

~~~PowerShell
$selfHelp
~~~

When we run this, we get:

"@

. $selfHelp


$InSummary = @"

## In Summary

MarkX is a simple and powerful tool.
It allows us to turn many objects into Markdown, and turn Markdown into many objects.

Please pay around and see what you can do.

"@

$InSummary | MarkX
45 changes: 18 additions & 27 deletions MarkX.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'MarkX.psm1'

# Version number of this module.
ModuleVersion = '0.1'
ModuleVersion = '0.1.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand All @@ -36,7 +36,7 @@ Description = 'MarkX - Markdown, XML, and PowerShell'
TypesToProcess = @('MarkX.types.ps1xml')

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()
FormatsToProcess = @('MarkX.format.ps1xml')

# 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.
FunctionsToExport = 'Get-MarkX'
Expand All @@ -63,31 +63,22 @@ PrivateData = @{

# ReleaseNotes of this module
ReleaseNotes = @'
## MarkX 0.1:

* `Get-MarkX` ( #1, #4 )
* Docs
* Sponsorship ( #20 )
* Security ( #19 )
* Contributing ( #18 )
* Code of conduct ( #17 )
* README (generated with MarkX) (#16)
* Extended Types
* `MarkX.get_HTML` ( #14 )
* `MarkX.ToString()` ( #12 )
* `MarkX.get_DataSet` ( #13 )
* `MarkX.get_Images` (#11)
* `MarkX.get_Links` (#10)
* `MarkX.get_Table` ( #9 )
* `MarkX.get_InnerText` ( #8 )
* `MarkX.get_XML` ( #7 )
* `MarkX.get/set_Markdown` ( #6 )
* `MarkX.Sync` ( #5 )
* `MarkX.ToTable` ( #22 )
* MarkX build ( #2, #3 )
* MarkX Action ( #21 )
* MarkX Tests ( #15 )

## MarkX 0.1.1:

* MarkX Help (#26)
* MarkX now accepts commands / help (#27)
* MarkX.Headings gets heading elements (#29)
* MarkX.Lexicon gets lexicons in Markdown (#25)
* MarkX.YamlHeader support (#32, #33)
* Allowing piped markdown file input (#34)
* MarkX.Code gets code within markdown (#30)
* MarkX.CodeBlock gets code blocks within markdown (#31)
* MarkX.ToString can now stringify any property (#35)
* MarkX formatting (#36)

---

Additional release notes in [CHANGELOG](https://github.com/StartAutomating/MarkX/blob/main/CHANGELOG.md)
'@

# Prerelease string of this module
Expand Down
Loading
Loading