Skip to content

Commit

Permalink
Merge pull request #25 from QutEcoacoustics/audio2csv-advanced
Browse files Browse the repository at this point in the history
Audio2csv advanced
  • Loading branch information
Allcharles authored Mar 28, 2019
2 parents daf78e1 + 7a39543 commit e20eeb1
Show file tree
Hide file tree
Showing 13 changed files with 562 additions and 233 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
out
ap
dist
.vscode
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"dependencies": "chmod +x ./linux_dependencies.sh && ./linux_dependencies.sh",
"ap_download:windows": "echo Downloading latest version of AP for Release. This could take up to 15 minutes.&& powershell [System.Environment]::SetEnvironmentVariable('LANG', 'en_US.UTF-8') && powershell -ExecutionPolicy ByPass -File ./script_ap.ps1",
"ap_download:linux": "echo Downloading latest version of AP for Release. This could take up to 15 minutes.&& export LANG=en_US.UTF-8 && pwsh -ExecutionPolicy ByPass -File ./script_ap.ps1",
"install": "npm run ap_download:windows",
"release": "electron-forge make",
"publish": "electron-forge publish"
},
Expand Down
11 changes: 11 additions & 0 deletions src/css/container.css
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,14 @@ body {
.header-content-padded {
margin-top: 14px;
}

.multi_input_container {
display: flex;
flex-direction: row;
align-content: center;
}

.multi_input_container input {
width: auto;
flex: 1;
}
31 changes: 19 additions & 12 deletions src/css/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,29 @@ table.output td {
}

.configEditor {
width: 100%;
box-sizing: border-box;
height: 500px;
margin: 0px;
margin-right: -10px;
margin: 0px;
padding: 5px;
resize: vertical;
box-sizing: border-box;
width: 100%;
}

.grey {
color: gray;
}

a.simpleLink {
cursor: pointer;
display: inline-flex;
font-size: 16px;
height: 26px;
justify-content: center;
width: auto;
}

a.button {
appearance: button;
-moz-appearance: button;
-webkit-appearance: button;
text-decoration: none;
font: menu;
color: ButtonText;
display: inline-block;
padding: 2px 8px;
a.simpleLink div {
align-self: center;
padding: 0 5px;
}
167 changes: 91 additions & 76 deletions src/html/analysisForm.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form id="AnalysisForm">
<form name="AnalysisForm" id="AnalysisForm">
<div class="group" id="select">
<div class="question">
<p class="question-text">Select Analysis Types</p>
Expand Down Expand Up @@ -29,6 +29,11 @@
/>
<label for="audio2csv" class="checkbox-custom-label">
Audio to CSV
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="Analyses long recordings using the analysis specified in the config file."
></i>
</label>
</li>
<li>
Expand Down Expand Up @@ -174,29 +179,6 @@ <h1 class="h1-no-hover" id="editTemplate">
</div>
<div class="group-content" style="display: none">
<table class="flex">
<tr>
<td>
<input
id="analysis-identifier"
value="-a"
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
/>
<label for="analysis-identifier" class="checkbox-custom-label">
Analysis Identifier
</label>
</td>
<td>
<input
id="analysis-identifier-input"
name="audio2csv"
type="text"
disabled
/>
</td>
</tr>
<tr>
<td>
<input
Expand All @@ -205,63 +187,64 @@ <h1 class="h1-no-hover" id="editTemplate">
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
onchange="toggleInput(this);"
/>
<label for="temp-dir" class="checkbox-custom-label">
Temporary Directory
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="A TEMP directory where cut files will be stored. Use this
option for efficiency (eg. write to a RAM Disk)."
></i>
</label>
</td>
<td>
<input
id="analysis-identifier-input"
name="audio2csv"
type="text"
disabled
/>
<td class="multi_input_container">
<input id="temp-dir-input" name="audio2csv" type="text" disabled />
<a
class="simpleLink"
style="margin-left: 3px;"
onclick="getTemporaryOutputFolder('temp-dir');"
>
<div>
Select Folder
</div>
</a>
</td>
</tr>
<tr>
<td>
<input
id="start-offset"
value="-s"
id="offset"
value="-s:-e"
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
onchange="toggleInput(this);"
/>
<label for="start-offset" class="checkbox-custom-label">
Start Offset (s)
<label for="offset" class="checkbox-custom-label">
Start and End Offset (seconds)
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="Start Offset: The start offset to start analyzing from (in seconds). End Offset: The end offset to stop analyzing (in seconds)."
></i>
</label>
</td>
<td>
<td class="multi_input_container">
<input
id="start-offset-input"
id="offset-input-s"
name="audio2csv"
type="number"
placeholder="Start Offset (seconds)"
disabled
/>
</td>
</tr>
<tr>
<td>
<input
id="end-offset"
value="-e"
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
/>
<label for="end-offset" class="checkbox-custom-label">
End Offset (s)
</label>
</td>
<td>
<div style="align-self: center">&nbsptill&nbsp</div>
<input
id="end-offset-input"
id="offset-input-e"
name="audio2csv"
type="number"
placeholder="End Offset (seconds)"
disabled
/>
</td>
Expand All @@ -274,15 +257,20 @@ <h1 class="h1-no-hover" id="editTemplate">
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
onchange="toggleInput(this);"
/>
<label for="align-to-minute" class="checkbox-custom-label">
Align to Minute
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="Allow advancing the start of the analysis to the nearest
minute. A valid datetime must be available in the file name."
></i>
</label>
</td>
<td>
<select id="align-to-minute-input" disabled>
<option value="" selected></option>
<option value="None">No alignment</option>
<option value="TrimBoth">Remove fractional sections</option>
<option value="TrimNeither">Keep fractional sections</option>
Expand All @@ -301,10 +289,15 @@ <h1 class="h1-no-hover" id="editTemplate">
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
onchange="toggleInput(this);"
/>
<label for="channels" class="checkbox-custom-label">
Channels
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="An array of channels to select. Default is all channels."
></i>
</label>
</td>
<td>
Expand All @@ -313,26 +306,25 @@ <h1 class="h1-no-hover" id="editTemplate">
</tr>
<tr>
<td>
<!-- Use flagsWithValue class to specify this is a flagWithValue option -->
<input
id="mix-down-to-mono"
value="-m"
class="checkbox-custom"
class="checkbox-custom flagsWithValues"
name="audio2csv"
type="checkbox"
disabled
checked
/>
<label for="mix-down-to-mono" class="checkbox-custom-label">
Mono Channel
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="Mix all selected input channels down into one mono channel.
Default is to mixdown."
></i>
</label>
</td>
<td>
<input
id="mix-down-to-mono-input"
name="audio2csv"
type="text"
disabled
/>
</td>
</tr>
<tr>
<td>
Expand All @@ -342,10 +334,16 @@ <h1 class="h1-no-hover" id="editTemplate">
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
checked
/>
<label for="parallel" class="checkbox-custom-label">
Parallel
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="Whether or not run this analysis in parallel - multiple
segents can be analyzed at the same time."
></i>
</label>
</td>
</tr>
Expand All @@ -357,10 +355,16 @@ <h1 class="h1-no-hover" id="editTemplate">
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
/>
<label for="when-exit-copy-log" class="checkbox-custom-label">
Output Log
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="If true, attempts to copy the executable's log file to output
directory. If it can't determine an output directory, it
copies to the working directory."
></i>
</label>
</td>
</tr>
Expand All @@ -372,10 +376,17 @@ <h1 class="h1-no-hover" id="editTemplate">
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
/>
<label for="when-exit-copy-config" class="checkbox-custom-label">
Output Config
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="If true, attempts to copy the executable's log file to output
directory. If it can't determine an output directory, it
copies to the working directory. If it can't find a config
file, nothing is copied."
></i>
</label>
</td>
</tr>
Expand All @@ -387,19 +398,23 @@ <h1 class="h1-no-hover" id="editTemplate">
class="checkbox-custom"
name="audio2csv"
type="checkbox"
disabled
onchange="toggleInput(this);"
/>
<label for="log-level" class="checkbox-custom-label">
Log Level
<i
class="fa fa-info-circle grey"
aria-hidden="true"
title="Set the log verbosity level."
></i>
</label>
</td>
<td>
<select id="log-level-input" disabled>
<option value="" selected></option>
<option value="0">None</option>
<option value="1">Error</option>
<option value="2">Warn</option>
<option value="3">Info</option>
<option value="3" selected>Info</option>
<option value="4">Debug</option>
<option value="5">Trace</option>
<option value="6">Verbose</option>
Expand Down
3 changes: 2 additions & 1 deletion src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
/>
<script type="text/javascript" src="../js/defaults.js"></script>
<script type="text/javascript" src="../js/terminal.js"></script>
<script type="text/javascript" src="../js/analysis.js"></script>
<script type="text/javascript" src="../js/configFile.js"></script>
<script type="text/javascript" src="../js/configEditor.js"></script>
<script type="text/javascript" src="../js/controller.js"></script>
<script type="text/javascript" src="../js/utilities.js"></script>
<script type="text/javascript" src="../js/navigation.js"></script>
<script type="text/javascript" src="../js/toggleImage.js"></script>
<script type="text/javascript" src="../js/toggleables.js"></script>
<script type="text/javascript" src="../js/htmlBuilder.js"></script>
<meta charset="utf-8" />
<title>AP Desktop</title>
Expand Down
Loading

0 comments on commit e20eeb1

Please sign in to comment.