Compare commits

..

2 Commits

Author SHA1 Message Date
1fd2a4723e more conversion 2023-12-05 22:53:17 -05:00
51fb08810d how the hell did I not have mm 2023-12-05 21:32:20 -05:00
4 changed files with 68 additions and 6 deletions

View File

@ -115,7 +115,14 @@ namespace vassago.Conversion
}
else
{
return $"{String.Format("{0:G4}", accumulator)} {normalizedDestUnit}";
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.";

View File

@ -36,6 +36,13 @@
"metre"
]
},
{
"canonical":"mm",
"aliases": [
"millimeter",
"millimetre"
]
},
{
"canonical":"km",
"aliases": [
@ -208,16 +215,30 @@
{
"canonical":"mi",
"aliases": [
"mile",
"miles"
"mile"
]
},
{
"canonical":"blue whale length",
"canonical":"blue whale lengths",
"aliases": [
"bwl",
"whales"
]
},
{
"canonical":"ångströms",
"aliases": [
"angstroms",
"Å"
]
},
{
"canonical":"μm",
"aliases": [
"micrometers",
"micrometres",
"microns"
]
}
],
"linearPairs":[
@ -230,9 +251,12 @@
{"item1":"mi", "item2":"ft", "factor":5280},
{"item1":"m", "item2":"in", "factor":39.37008},
{"item1":"m", "item2":"cm", "factor":100},
{"item1":"cm", "item2":"mm", "factor":10},
{"item1":"m", "item2":"μm", "factor":1000000},
{"item1":"km", "item2":"mi", "factor":0.6213712},
{"item1":"ft", "item2":"in", "factor":12},
{"item1":"yd", "item2":"ft", "factor":3},
{"item1":"football field", "item2":"yd", "factor":100},
{"item1":"chain", "item2":"yd", "factor":22},
{"item1":"chain", "item2":"link", "factor":100},
{"item1":"furlong", "item2":"mi", "factor":8},
@ -241,6 +265,8 @@
{"item1":"ly", "item2":"km", "factor": 946070000000},
{"item1":"pc", "item2":"AU", "factor":206266.3},
{"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":"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 {
margin-bottom: 60px;
}
.protocol-icon{
.protocol-icon,.channel-type-icon{
display:inline-block;
width: 32px;
height: 32px;
@ -31,4 +31,16 @@ body {
}
.twitch .protocol-icon{
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;
}