Skip to content

Instantly share code, notes, and snippets.

@Kenya-West
Created February 23, 2022 12:30
Show Gist options
  • Save Kenya-West/4e53b4b8cfcbbdcc9408f9fe522677ea to your computer and use it in GitHub Desktop.
Save Kenya-West/4e53b4b8cfcbbdcc9408f9fe522677ea to your computer and use it in GitHub Desktop.
BeefText combos generator that exports them to CSV file. After running script, you can import resulting CSV file to BeefText app - https://github.com/xmichelo/Beeftext
$baseKey = '!mr'
$baseName = 'MR'
$text = @'
Lorem ipsum
Lorem ipsum
Lorem ipsum
'@
$priority = @(
'πŸ”΄ ',
'🟠 ',
'🟒 ',
'πŸ”΅ '
)
$size = @(
'πŸŸ₯ ',
'🟧 ',
'🟩 ',
'🟦 '
)
$term = @(
'⏱️ ',
'πŸ•› ',
'πŸ“† ',
'πŸ’€ '
)
$mentions = '@some @body @once @told @me'
$data = @();
for ($i = 0; $i -lt $priority.Count; $i++) {
for ($j = 0; $j -lt $size.Count; $j++) {
for ($k = 0; $k -lt $term.Count; $k++) {
$snippet = @"
$text
$($priority[$i])
$($size[$j])
$($term[$k])
$mentions
"@
$newObj = [PSCustomObject]@{
Key = "$baseKey$($i + 1)$($j + 1)$($k + 1)";
Snippet = $snippet;
ComboName = "$baseName $($i + 1) $($j + 1) $($k + 1)"
}
$data += $newObj;
}
}
}
$data | Export-Csv -NoTypeInformation -Path ".\BeefText$baseName.csv" -Force
Get-Content ".\BeefText$baseName.csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment