{"id":16567523,"url":"https://github.com/jdhitsolutions/psthriller","last_synced_at":"2026-02-27T00:31:56.185Z","repository":{"id":145020949,"uuid":"158401679","full_name":"jdhitsolutions/PSThriller","owner":"jdhitsolutions","description":"A demonstration PowerShell module to generate content for a hypothetical thriller novel.","archived":false,"fork":false,"pushed_at":"2024-12-03T21:23:14.000Z","size":205,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T23:36:41.844Z","etag":null,"topics":["powershell","powershell-module"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdhitsolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-20T14:25:03.000Z","updated_at":"2024-12-03T21:23:15.000Z","dependencies_parsed_at":"2025-01-15T23:20:50.835Z","dependency_job_id":"2b3e3b75-3ac4-41d6-8114-52f27a58e626","html_url":"https://github.com/jdhitsolutions/PSThriller","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jdhitsolutions/PSThriller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSThriller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSThriller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSThriller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSThriller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdhitsolutions","download_url":"https://codeload.github.com/jdhitsolutions/PSThriller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FPSThriller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29878991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","powershell-module"],"created_at":"2024-10-11T21:06:49.514Z","updated_at":"2026-02-27T00:31:56.154Z","avatar_url":"https://github.com/jdhitsolutions.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PSThriller\n\nThis is a PowerShell module that extends the basic functionality in script called [New-Thriller](https://gist.github.com/jdhitsolutions/e65c82a86cbf144df49104e942e0da2a). The script, and this module, were never intended for serious production use. Instead, they are intended as educational tools to demonstrate a variety of scripting techniques and concepts.\n\nThis module has not been published to the PowerShell Gallery but you are welcome to download or clone for review and study.\n\n## The Commands\n\nThe commands in this module will create output related to a hypothetical book you might write in the thriller genre. The basic premise is to take a collection of random elements and insert them into a template that describes your book, using the typical thriller formula. Think of it as a PowerShell [Mad-Libs](https://en.wikipedia.org/wiki/Mad_Libs).\n\n\u003e I apologize that the template assumes the protagonist is male, :curly_haired_man: but that is the trope of the genre. You might want to modify this module to be more inclusive or select different templates.\n\nThe data is stored in a [json file](./data.json) which is imported and turned into a custom object.\n\n```text\nPS C:\\Scripts\\psthriller\u003e Get-Content .\\data.json | ConvertFrom-Json\n\nAuthorPool      : {Ben Coes, Vince Flynn, Brad Thor, James Rollins…}\nTitles          : {The Omega Plan, Deep Rising, The Last Icon, Exit 1…}\nNames           : {Tim Burr, Jack Frost, Paul Bunyan, Roy Biv…}\nFormers         : {Navy SEAL, Army Ranger, NASA astronaut, space shuttle pilot…}\nVillains        : {The Society, The Guild, GHOST, The Architects…}\nMembers         : {son, daughter, wife, mother…}\nBackdrops       : {North Dakota, the Egyptian pyramids, ancient Greece,\n                  Istanbul…}\nLoveInterests   : {Sheila, Brandi, Betty, Layla…}\nLoveBackStories : {a former student, his ex-wife, his mentor's daughter, the\n                  librarian…}\nTragedies       : {the tragic loss of his _family, the nightmares of war, a\n                  missing library book, a toothache…}\nMysteries       : {Clippy, Bieber Fever, Who shot J.R., the Metaverse…}\nquotes          : {His best work yet!, Gripping and compelling.,\n                  Breathtaking!!, I stayed up until 4 AM and then was so\n                  energized I couldn't sleep.…}\n```\n\nThe main command, [New-PSThriller](docs/New-PSThriller.md), gets random elements such as a title, hero name and villain, from the data and inserts them into a text template.\n\n```powershell\n...\n$name = _getItem $data.names\n$first = ($name | Get-Random).Split()[0]\n$former = _getItem $data.formers\n$villain = _getItem $data.villains\n...\n$text = Get-Content -path $PSScriptRoot\\template.txt\n\n[regex]$rx=\"_\\w+\"\n#replace placeholders with corresponding variables\n$replacements = $rx.matches($text) | Group-Object -property Value\n\nforeach ($item in $replacements) {\n    $var = (Get-Variable -Name $item.name.substring(1)).Value\n    write-Verbose \"[$((Get-Date).TimeOfDay)] Replacing $($item.name) with $var\"\n    $text = $text -replace $item.name,$var\n} #foreach replacement\n...\n```\n\nThe default behavior is to write a custom object to the pipeline with all of the relevant book information.\n\n```powershell\n[PSCustomObject]@{\n    PSTypeName = 'PSThriller'\n    Title      = $Titles[0]\n    Author     = $author\n    Hero       = $name\n    Former     = $Former\n    Villain    = $villain\n    TheWoman   = \"$LoveInterest, $LoveBackstory\"\n    Locations  = $Backdrop1, $backdrop2\n    Blurb      = ($Text | Out-String).Trim()\n    Quotes     = $quotes\n}\n```\n\nOr you can write a text document to the console.\n\n![PSThriller Document](./assets/psthriller-1.png)\n\nThe module should work in both Windows PowerShell and PowerShell 7. The latter includes markdown cmdlets so you can run a command like this:\n\n![PSThriller as Markdown](./assets/psthriller-2.png)\n\nOr save to a [file](sample.md).\n\n```powershell\nNew-PSThriller -AsMarkdown | Out-File sample.md -Encoding utf-8\n```\n\nThis module also includes commands to get 1 or more random titles with [Get-PSThrillerTitle](docs/Get-PSThrillerTitle.md)\n\n```powershell\nPS C:\\\u003e Get-PSThrillerTitle -count 5\nThe Meeting\nChange Tracking\nRunning on Empty\nGlock, Rock and Roll\nKill or Be Killed\n```\n\nOr use [Get-PSThrillerCharacters](docs/Get-PSThrillerCharacters.md) to generate an object.\n\n```powershell\nPS C:\\\u003e Get-PSThrillerCharacters\n\nHero         FormerOccupation    TheWoman HerStory        Villain\n----         ----------------    -------- --------        -------\nBobby Bilder billionaire playboy Miranda  a paleobotanist The Parenthood\n```\n\n## Help :page_facing_up:\n\nThe help documentation was generated using the [Platyps](https://github.com/powershell/platyps) module, which you can install from the PowerShell Gallery.\n\n```powershell\nInstall-Module Platyps\n```\n\nTo use, I created a folder (\\docs) for the markdown documents and a culture-specific folder (\\en-us) for the final XML help file. I imported the current version of the module into my PowerShell session and generated the initial markdown documents.\n\n```powershell\nNew-MarkdownHelp -Module PSThriller -OutputFolder .\\docs\\\n```\n\nThis generated a markdown document for each public function. I edited each file filling in the blanks and adding some examples. The last step is to generate the XML file.\n\n```powershell\nNew-ExternalHelp -Path .\\docs\\ -OutputPath .\\en-us\\\n```\n\nThis is the process I am teaching everyone. There's really only a little bit of markdown you need to learn. The Platyps commands do all of the hard work.\n\n## Learn :school:\n\nAgain, the purpose of this module is educational, and perhaps a little amusement. I encourage you to take the time to go through the code and see how this all works. I don't intend to publish it to the PowerShell Gallery, but I will create release files here. Or you can clone or download the repository. If you have questions, comments or any other feedback, please use the repository's Discussions section.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2Fpsthriller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdhitsolutions%2Fpsthriller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2Fpsthriller/lists"}