This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory = $false)] | |
[string]$LogSource = "", | |
[Parameter(Mandatory = $false)] | |
[string]$ErrorsToWinLogSource, | |
[string]$dateFormat = "yyyy-MM-dd HH:mm:ss" | |
) | |
<# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Zip up textbase files in preparation for FTP sync to Andornot. | |
Peter Tyrrell, [email protected] | |
-textbases c:\path\to\accessions.tba, c:\path\to\descriptions.tba | |
-out c:\path\to\destination | |
#> | |
param ( | |
[string[]] $textbases, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory = $true)] | |
[string]$in, | |
[string]$out = "d:\dev-archive" | |
) | |
$extract_output_dir = "$in\extract\extracted\output\*" | |
remove-item $extract_output_dir -Recurse | |
Write-Host "Removed $extract_output_dir" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Create sitemap index with attendant sitemaps from a Solr query. | |
A new sitemap is created every 50,000 rows. | |
#> | |
param ( | |
[string]$ChangeFrequency = "weekly", | |
[string]$IndexBaseUrl = "http://andi.andornot.com/", | |
[string]$Logsrc = "Andi Solr Update", | |
[string]$OutDir = ".\", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Downsample PDF and convert to gray if necessary. | |
Requires Ghostscript (gswin64c). | |
#> | |
param ( | |
[string]$indir, | |
[string]$outdir = $indir, | |
[string]$gs = "gswin64c", | |
[string]$dpi = "150" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# all logging settins are here on top | |
$logFile = "log-$(gc env:computername).log" | |
$logLevel = "DEBUG" # ("DEBUG","INFO","WARN","ERROR","FATAL") | |
$logSize = 1mb # 30kb | |
$logCount = 10 | |
# end of settings | |
function Write-Log-Line ($line) { | |
Add-Content $logFile -Value $Line | |
Write-Host $Line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Rip Audio CD to mp3 files with VLC. | |
#> | |
param ( | |
[string]$vlc = "c:\program files\videolan\vlc\vlc.exe", | |
[string]$cddrive = "E:", | |
[int]$track = 0 | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
setlocal ENABLEDELAYEDEXPANSION | |
SET /a x=0 | |
FOR /R E:\ %%G IN (*.cda) DO (CALL :SUB_VLC "%%G") | |
GOTO :eof | |
:SUB_VLC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$server, | |
[string]$dbname, | |
[int]$daysToKeep, | |
[Parameter(Mandatory=$false)] | |
[string]$logsrc = "Andi Solr Update" | |
) | |
function logError([string]$logsrc, [string]$msg) { | |
# write error msg to Application EventLog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$server, | |
[Parameter(Mandatory=$true)] | |
[string]$dbname, | |
[Parameter(Mandatory=$true)] | |
[int]$daysToKeep, | |
[Parameter(Mandatory=$false)] | |
[string]$logsrc = "Andi Solr Update" | |
) |