Skip to content

Instantly share code, notes, and snippets.

@itpropro
Created July 29, 2019 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itpropro/4a9386bad57ac39d60c86b50bde485c5 to your computer and use it in GitHub Desktop.
Save itpropro/4a9386bad57ac39d60c86b50bde485c5 to your computer and use it in GitHub Desktop.
hexo list post | sls '^(\d*-\d*-\d*)[ ]{2}([\w\s-_\\\/.,()]+?)[ ]{2,}([\w\s-_\\\/.,()]+?)[ ]{2,}([\w\s-_\\\/.,()]+?)([ ]{2,}([\w\s-_\\\/.,()]+?))*$' -allmatches | % {[array]$postList += [pscustomobject]@{'Date' = [DateTime]::Parse($_.matches.groups[1].value);'Title' = $_.matches.groups[2].value; 'Path' = $_.matches.groups[3].value; 'Categories' = $_.matches.groups[4].value; 'Tags' = $_.matches.groups[6].value }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment