mac系统选中csv文件快捷键自动转换成json串
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
csv2json.py
icon.png
info.plist

README.md

csv2json.alfredworkflow

csv的格式

转换后json的格式

[
    {
        "itemStyle": {},
        "name": "兵器谱",
        "children": [
            {
                "itemStyle": {},
                "name": "设计",
                "children": [
                    {
                        "itemStyle": {},
                        "name": "分布式设计"
                    },
                    {
                        "itemStyle": {},
                        "name": "设计模式"
                    },
                    {
                        "itemStyle": {},
                        "name": "设计思想 & 开发模式"
                    }
                ]
            },
            {
                "itemStyle": {},
                "name": "编程",
                "children": [
                    {
                        "itemStyle": {},
                        "name": "并发"
                    },
                    {
                        "itemStyle": {},
                        "name": "数据结构"
                    },
                    {
                        "itemStyle": {},
                        "name": "数据库"
                    },
                    {
                        "itemStyle": {},
                        "name": "常用算法"
                    }
                ]
            },
            {
                "itemStyle": {},
                "name": "架构",
                "children": [
                    {
                        "itemStyle": {},
                        "name": "微服务"
                    }
                ]
            },
            {
                "itemStyle": {},
                "name": "运维",
                "children": [
                    {
                        "itemStyle": {},
                        "name": "性能"
                    },
                    {
                        "itemStyle": {},
                        "name": "中间件"
                    }
                ]
            },
            {
                "itemStyle": {},
                "name": "管理",
                "children": [
                    {
                        "itemStyle": {},
                        "name": "项目管理"
                    }
                ]
            },
            {
                "itemStyle": {},
                "name": "网络",
                "children": [
                    {
                        "itemStyle": {},
                        "name": "协议"
                    }
                ]
            },
            {
                "itemStyle": {},
                "name": "大数据",
                "children": []
            },
            {
                "itemStyle": {},
                "name": "安全",
                "children": []
            },
            {
                "itemStyle": {},
                "name": "操作系统",
                "children": []
            },
            {
                "itemStyle": {},
                "name": "杂项",
                "children": [
                    {
                        "itemStyle": {},
                        "name": "常用开源框架"
                    }
                ]
            }
        ]
    }
]

快捷键及使用

csv2json command+shift+ctrl+F

  • 使用快捷键或关键字前,需打开finder 选中一个csv文件
  • 转换后的json字符串已经在系统剪贴板中了,直接粘贴就可以是使用