Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a546d8bf
authored
Jan 20, 2021
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加标准单位
parent
b70bf1ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
15 deletions
config.py
config.py
View file @
a546d8bf
...
...
@@ -44,28 +44,43 @@ unit_map = {
'Mf'
:
1000000000
,
'mf'
:
1000000000
,
'F'
:
1000000000000
},
'pH'
:
{
'pH'
:
1
,
'nH'
:
1000
,
'µH'
:
1000000
,
'UH'
:
1000000
,
'μh'
:
1000000
,
'uh'
:
1000000
,
'Uh'
:
1000000
,
'mH'
:
1000000000
,
'Mh'
:
1000000000
,
'MH'
:
1000000000
,
'mh'
:
1000000000
,
'H'
:
1000000000000
},
'pH'
:
{
'pH'
:
1
,
'Ph'
:
1
,
'PH'
:
1
,
'ph'
:
1
,
'nH'
:
1000
,
'µH'
:
1000000
,
'UH'
:
1000000
,
'μh'
:
1000000
,
'uh'
:
1000000
,
'Uh'
:
1000000
,
'mH'
:
1000000000
,
'Mh'
:
1000000000
,
'MH'
:
1000000000
,
'mh'
:
1000000000
,
'H'
:
1000000000000
},
'mA'
:
{
'mA'
:
1
,
'A'
:
1000
},
'A'
:
1000
,
'a'
:
1000
,
},
'V'
:
{
'V'
:
1
,
'v'
:
1
,
'kV'
:
1000
,
'Kv'
:
1000
,
'kv'
:
1000
,
'KV'
:
1000
},
'W'
:
{
'W'
:
1
,
'kW'
:
1000
,
},
'w'
:
1
,
'kW'
:
1000
,
'kw'
:
1000
,
'KW'
:
1000
,
'Kw'
:
1000
,
},
'
%
'
:
{
'
%
'
:
0.01
,
},
}
...
...
@@ -83,4 +98,4 @@ cast_map = {
'瓦'
:
'W'
,
}
unit_regex
=
"μΩ|uΩ|mΩ|Ω|kΩ|KΩ|MΩ|GΩ|TΩ|pF|PF|Pf|pf|nF|NF|Nf|nf|µF|uF|UF|Uf|uf|mF|MF|Mf|mf|F|pH|
nH|µH|UH|μh|uh|Uh|mH|Mh|MH|mh|H|mA|A|V|kV|KV|W|kW
|
%
|毫欧|欧姆|欧|千欧|兆欧|伏特|伏|千伏|瓦特|瓦"
unit_regex
=
"μΩ|uΩ|mΩ|Ω|kΩ|KΩ|MΩ|GΩ|TΩ|pF|PF|Pf|pf|nF|NF|Nf|nf|µF|uF|UF|Uf|uf|mF|MF|Mf|mf|F|pH|
Ph|PH|ph|nH|µH|UH|μh|uh|Uh|mH|Mh|MH|mh|H|mA|A|a|V|v|kV|Kv|kv|KV|W|w|kW|kw|KW|Kw
|
%
|毫欧|欧姆|欧|千欧|兆欧|伏特|伏|千伏|瓦特|瓦"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment