more conversion

This commit is contained in:
Adam R Grey 2023-12-05 22:53:17 -05:00
parent 51fb08810d
commit 1fd2a4723e
4 changed files with 60 additions and 6 deletions

View File

@ -115,7 +115,14 @@ namespace vassago.Conversion
} }
else else
{ {
return $"{String.Format("{0:G4}", accumulator)} {normalizedDestUnit}s"; if(String.Format("{0:G3}", accumulator).Contains("E-"))
{
return $"{accumulator} {normalizedDestUnit}";
}
else
{
return $"{String.Format("{0:N}", accumulator)} {normalizedDestUnit}";
}
} }
} }
return "dimensional analysis failure - I know those units but can't find a path between them."; return "dimensional analysis failure - I know those units but can't find a path between them.";

View File

@ -215,16 +215,30 @@
{ {
"canonical":"mi", "canonical":"mi",
"aliases": [ "aliases": [
"mile", "mile"
"miles"
] ]
}, },
{ {
"canonical":"blue whale length", "canonical":"blue whale lengths",
"aliases": [ "aliases": [
"bwl", "bwl",
"whales" "whales"
] ]
},
{
"canonical":"ångströms",
"aliases": [
"angstroms",
"Å"
]
},
{
"canonical":"μm",
"aliases": [
"micrometers",
"micrometres",
"microns"
]
} }
], ],
"linearPairs":[ "linearPairs":[
@ -238,9 +252,11 @@
{"item1":"m", "item2":"in", "factor":39.37008}, {"item1":"m", "item2":"in", "factor":39.37008},
{"item1":"m", "item2":"cm", "factor":100}, {"item1":"m", "item2":"cm", "factor":100},
{"item1":"cm", "item2":"mm", "factor":10}, {"item1":"cm", "item2":"mm", "factor":10},
{"item1":"m", "item2":"μm", "factor":1000000},
{"item1":"km", "item2":"mi", "factor":0.6213712}, {"item1":"km", "item2":"mi", "factor":0.6213712},
{"item1":"ft", "item2":"in", "factor":12}, {"item1":"ft", "item2":"in", "factor":12},
{"item1":"yd", "item2":"ft", "factor":3}, {"item1":"yd", "item2":"ft", "factor":3},
{"item1":"football field", "item2":"yd", "factor":100},
{"item1":"chain", "item2":"yd", "factor":22}, {"item1":"chain", "item2":"yd", "factor":22},
{"item1":"chain", "item2":"link", "factor":100}, {"item1":"chain", "item2":"link", "factor":100},
{"item1":"furlong", "item2":"mi", "factor":8}, {"item1":"furlong", "item2":"mi", "factor":8},
@ -249,6 +265,8 @@
{"item1":"ly", "item2":"km", "factor": 946070000000}, {"item1":"ly", "item2":"km", "factor": 946070000000},
{"item1":"pc", "item2":"AU", "factor":206266.3}, {"item1":"pc", "item2":"AU", "factor":206266.3},
{"item1":"blue whale length", "item2": "m", "factor": 29.9}, {"item1":"blue whale length", "item2": "m", "factor": 29.9},
{"item1":"m", "item2": "ångström", "factor": 10000000000},
{"item1":"smoot", "item2": "cm", "factor": 170},
{"item1":"floz", "item2":"mL", "factor":29.57344}, {"item1":"floz", "item2":"mL", "factor":29.57344},
{"item1":"L", "item2":"mL", "factor":1000}, {"item1":"L", "item2":"mL", "factor":1000},

17
jenkinsfile Normal file
View File

@ -0,0 +1,17 @@
pipeline {
agent any
stages {
stage('clean old'){
steps{
sh 'rm -rf bin obj'
}
}
stage('Build') {
steps {
sh 'dotnet publish directors-assistant.csproj --configuration Release --os linux'
archiveArtifacts artifacts: 'bin/Release/net7.0/linux-x64/publish/*'
}
}
}
}

View File

@ -20,7 +20,7 @@ html {
body { body {
margin-bottom: 60px; margin-bottom: 60px;
} }
.protocol-icon{ .protocol-icon,.channel-type-icon{
display:inline-block; display:inline-block;
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -31,4 +31,16 @@ body {
} }
.twitch .protocol-icon{ .twitch .protocol-icon{
background-image: url("../imgs/twitch.png"); background-image: url("../imgs/twitch.png");
} }
.Normal .channel-type-icon{
background-color: black;
}
.DM .channel-type-icon{
background-color: black;
}
.Protocol .channel-type-icon{
background-color: black;
}
.OU .channel-type-icon{
background-color: black;
}