Documentation ¶
Index ¶
Constants ¶
View Source
const ( DemoHTMLFileName = "标本录入软件数据格式.html" DemoSNFileName = "流水号文件(示例).xlsx" DemoOfflineFileName = "鉴定录入文件(示例).xlsx" )
View Source
const ( Version = "v1.9.4" // 请勿手动修改, 应使用 bumpversion 自动更新 Title = "植物标本录入软件" )
View Source
const ( LibraryCode = "FUS" // 馆代码 Country = "中国" // 国家 PatternType = "" // 模式类型 SpecimenCondition = "" // 标本状态 Inventory = "" // 库存 District = "" //区 NegativeAltitude = "" // Level = "" Remarks = "" Remarks2 = "" )
Const: specimen info
View Source
const ( DefaultHabitat = "" DefaultNamePublisher = "" DefaultSeparator = ";" )
Const: default placeholder value
View Source
const ( // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 中国植物志静态页面 URL 信息(可提取到 spno) // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 中国植物志 URL 前缀 URLPrefixEFLORA = "http://www.iplant.cn/info/" // 中国植物志 URL 后缀 URLSuffix = "?t=z" // URL 分隔符 URLBlankSeparator = "%20" // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 「详细描述」API // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 「详细描述」API URL 前缀 // - frpsspno: 可用于查询「纲目科属种」信息的 spno // - frpsspclassid: 可用于查询「纲目科属种」信息的 spclassid // - frpsdesc: 包含多个 <p> 的详细信息,可用于提取「茎」、「叶」、「花」、「果」等信息 // 示例: http://www.iplant.cn/ashx/getfrps.ashx?key=Cephalotaxus+fortunei DetailedDescriptionApiURLPrefix = "http://www.iplant.cn/ashx/getfrps.ashx?key=" FrpsspnoKeyInResponseMap = "frpsspno" FrpsspclassidKeyInResponseMap = "frpsspclassid" FrpsdescKeyInResponseMap = "frpsdesc" // API URL 分隔符 APIURLBlankSeparator = "+" // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 「物种分类(Texomony,界门纲目科属种)」信息查询 API // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 「物种分类(Texomony,界门纲目科属种)」信息查询 API URL DetailedCategoryApiUrl = "http://www.iplant.cn/ashx/getfrpsclass.ashx" FrpsclasstxtKeyInResponseMap = "frpsclasstxt" PhylumKeyword = "门 " ClassKeyword = "纲 " OrderKeyword = "目 " FamilyKeyword = "科 " GenusKeyword = "属 " // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 「拉丁名」信息查询 API,可解析命名人(NamePublisher)信息 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // 「拉丁名」信息查询 API URL LatinApiUrl = "http://www.iplant.cn/ashx/getsplatin.ashx" // 命名人信息 API URL SpnoRegexpTemplate = "var spno = \"\\d+\"" // spno // 提取命名人的字符串分隔符 // 示例: <span class='font20'><b>Cephalotaxus</b></span> <span class='font20'><b>fortunei</b></span> Hooker // 此 case 中需要 split 后取: Hooker NamePublisherSeparator = "</span>" )
web
View Source
const (
AmbiguousSpeciesName = "sp."
)
View Source
const DemoHTMLContent = `` /* 4774-byte string literal not displayed */
View Source
const HelpMessage = `` /* 439-byte string literal not displayed */
View Source
const USAGE = `` /* 604-byte string literal not displayed */
View Source
const (
WorkerPoolSize = 30 // worker poll size
)
goroutine
Variables ¶
View Source
var ( // filtering keywords AllKeywords = []string{"高", "茎", "叶", "花", "果"} ModerateKeywords = []string{"叶", "花"} RelaxedKeywords = []string{"茎", "叶"} )
View Source
var ( // filtering regexp BodyHeightRegexp, _ = regexp.Compile("[^,。;]*高[^,。;]*") // 体高 DBHRegexp, _ = regexp.Compile("[^,。;]*胸径[^,。;]*") // 胸径 StemRegexp, _ = regexp.Compile("[^。;]*茎[^。;]*") // 茎 LeafRegexp, _ = regexp.Compile("[^。;]*叶[^。;]*") // 叶 FlowerRegexp, _ = regexp.Compile("[^。;]*花[^。;]*") // 花 FruitRegexp, _ = regexp.Compile("[^。;]*果[^。;]*") // 果实 HostRegexp, _ = regexp.Compile("[^。;]*寄主[^。;]*") // 寄主 )
View Source
var About = fmt.Sprintf("%s\nspecimen-go GUI %s by zxjsdp\n复旦大学生科院 G417 实验室", Title, Version)
View Source
var OfflineDemoData = [][]string{
{"ZY20170001", "蔓长春花", "Vinca major", "夹竹桃科", "Apocynaceae", "上海", "上海市", "杨浦区淞沪路嘉誉湾", "N31°20′30.75″", "E121°30′10.99″", "10", "20170423", "3", "半灌木", "张三", "李四", "20170426", "王五", "20171018"},
{"ZY20170002", "红花檵木", "Loropetalum chinense", "金缕梅科", "Hamamelidaceae", "上海", "上海市", "杨浦区淞沪路嘉誉湾", "N31°20′30.76″", "E121°30′10.100″", "10", "20170423", "3", "灌木", "张三", "李四", "20170426", "王五", "20171018"},
}
View Source
var SNFileDemoData = [][]string{
{"ZY20170001", "123167", "107930", "1"},
{"ZY20170001", "123168", "107931", "2"},
{"ZY20170001", "123168", "107932", "3"},
{"ZY20170002", "123170", "107933", "1"},
{"ZY20170002", "123171", "107934", "2"},
{"ZY20170002", "123172", "107935", "3"},
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.