fate

package module
v2.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2018 License: MIT Imports: 8 Imported by: 1

README

FATE:开源三才五格起名算法

github上第一个开源的取名项目

1、配合八字命理的喜忌,是起名字的核心所在。
八字是每个人出生的年、月、日、时,小孩取名的第一步即是分析八字,了解命理五行所缺并找出喜用神,并且据此起名,这是最关键的核心,所有姓名的吉凶预测与取名,都以此为准。
2、名字用字字义务必吉祥
中国文字的魅力在于,每个方块字不仅都有其本身的含义,而且还有其特殊的周易诱导含义,名字在很多时候它还会影响到人性格的形成,正所谓“名如其人”。 所以一个好的名字,务必用字字义吉祥。 宝宝起名字确实需要考虑很多因素,不仅要考虑读音、字形以及各种禁忌更重要的是要考虑宝宝的生辰八字,因此给孩子起名还是找专家比较好。 现在这方面比较知名的应该是温雅居士了,温雅居士在宝宝起名方面有着十几年的经验独创易学起名法:排八字、看五行、测五格、配三才、合属相、想寓意、听音律、写字形,在业界目前应该是比较权威的了。 取名是需要非常系统考虑的,不能只考虑读音一个方面,温雅居士采用的排八字、看五行、测五格、配三才、想寓意、听音律、写字形的综合起名法非常喜欢。
3、五格数理,特别是主格的数理要为吉数。
在姓名学中,数理产生许多福祸吉凶的灵动力,对人生影响很大。 这跟单个姓名用字的笔划好坏无关,准确的福祸吉凶是按照特殊方式计算数理的。
4、三才配置一定不可以相克。
三才配置在姓名学中,占有很大的分量。三才配置指的是天格、人格、地格之间的关系。中国传统文化中有顺应天时、地利、人和的行事哲理; 测名过程中,有很多姓名数理不错,但是三才配置不佳,大多表现为运气反复,遇事受阻碍,且感情及财运不好。 三才配置相生相克的关系定吉凶,同样也影响着一个人事业成功率的高低。
5、五格配置在姓名学中占有主要位置。
五格配置是指天格、地格、人格、外格、总格共五格之间的关系。 天格是由祖先流传而来,单独出现对人生没有多大影响;人格是姓名剖象数理的中心所在,对人生的影响最大; 人格与地格结合的数理则为基础运。地格主要是36岁前的人生,也叫前运力,外格代表人的外围,吉凶无谓。总格是36岁以后的人生,也是后运力。
6、小孩取名字时还要结合命主的出生方位、父母资料等因素,以达到事半功倍的效果。
其实任何事情道理都是一样的,只有适合自己的才是最好的。

一个好名字伴随人的一生,FATE让你取一个好名字

获取项目:

vgo get github.com/godcong/fate@v2.0.0

更新数据库:

创建fate库,并导入sql目录下的各个sql文件到mysql

将config.toml配置文件放入项目根目录下并配置如下:

[database]
   name = "mysql"
   username = "root"
   password = "123456"
   addr = "localhost"
   port = "3306"
   schema = "fate"
#   local = "Asia/Shanghai"
#   param = "?"

如使用sqlite库则配置:

[database]
   name = "sqlite3"
   path = "./sql/fate.db"   //fate.db对应目录

运行项目:

  fate.FilterBest(fate.NewName("毛"), "水", "金")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CharacterFromName

func CharacterFromName(s string) *model.Character

func FilterBest

func FilterBest(name Name)

func GenerateAttribute

func GenerateAttribute(i int) string

GenerateThreeTalent 计算字符的三才属性 1-2木:1为阳木,2为阴木 3-4火:3为阳火,4为阴火 5-6土:5为阳土,6为阴土 7-8金:7为阳金,8为阴金 9-10水:9为阳水,10为阴水

func GenerateYinYang

func GenerateYinYang(i int) string

func InitAll

func InitAll()

func ScienceUpdate

func ScienceUpdate(index int, s string)

func SetProperty

func SetProperty(p Property)

func Start

func Start(last string) stdFate

Start the fate main entrance

Types

type Charset

type Charset []string

type Fate

type Fate interface {
}

type FiveGrid

type FiveGrid struct {
	SkyGrid    int //天格
	LandGrid   int //地格
	PersonGrid int //人格
	OutGrid    int //外格
	AllGrid    int //总格
}

func MakeFiveGridFromStrokes

func MakeFiveGridFromStrokes(l1, l2, f1, f2 int) FiveGrid

MakeFiveGridFromStrokes 按照姓名笔画创建一个五格属性 五格是进行大衍计算的基础

func (*FiveGrid) ContainBest

func (fg *FiveGrid) ContainBest(rule ...string) bool

func (*FiveGrid) PrintBigYan

func (fg *FiveGrid) PrintBigYan(filter bool) bool

type Name

type Name struct {
	FirstName []string

	LastName []string
	// contains filtered or unexported fields
}

func NewName

func NewName(last string) Name

type Property

type Property interface {
	UseThreeTalent() bool
	UseFiveGrid() bool
	UseFivePhase() bool
	UseZodiac() bool
}

func DefaultProperty

func DefaultProperty() Property

func GetProperty

func GetProperty() Property

type ThreeTalent

type ThreeTalent struct {
	SkyTalent    ThreeTalentComposite
	LandTalent   ThreeTalentComposite
	PersonTalent ThreeTalentComposite
}

func NewThreeTalent

func NewThreeTalent(grid FiveGrid) ThreeTalent

天人地格算三才

func (*ThreeTalent) PrintThreeTalent

func (t *ThreeTalent) PrintThreeTalent()

type ThreeTalentComposite

type ThreeTalentComposite struct {
	ThreeTalentAttribute string
	ThreeTalentYinYang   string
}

func NewThreeTalentComposite

func NewThreeTalentComposite(i int) ThreeTalentComposite

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL