pfv

package module
v0.0.0-...-3dba8e4 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

README

pfv

PSDToolFavorites file parser

Usage

import (
	"github.com/raa0121/pvf"
)

func main() {
	s := `
[PSDToolFavorites-v1]
root-name/お気に入り
faview-mode/1

//Heart
マーク/ハート
アクセサリ/オタマン帽普
眉/*普通
目/*普通
口/*笑い
本体/*普段着
手/*手
ツインテール/*通常

//hoge/Heart2
マーク/ハート
アクセサリ/オタマンベレー帽
眉/*普通
目/*普通
口/*笑い
本体/*普段着
手/*手
ツインテール/*通常

`
	data := pvf.Decode(s)
	for _, v := range data.Items {
		fmt.Println(v.Name)
		for _, vv := range v.Elements {
			fmt.Printf("  %s\n", vv.Path)
		}
	}
}

Requirements

go 1.16 or later

Installation

go get github.com/raa0121/pfv

License

Apache License 2.0

Author

raa0121 raa0121@gmail.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element struct {
	Path string
}

type Item

type Item struct {
	Name     string
	Elements []*Element
}

type Pfv

type Pfv struct {
	Header     string
	RootName   string
	FaviewMode int
	Items      []*Item
}

func Decode

func Decode(s string) *Pfv

Jump to

Keyboard shortcuts

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