从目录结构创建json树
项目描述
此工具从目录的文件层次结构创建json树结构。
用法
dir2json --pretty test/
在一个像这样的目录中
test
├── bar
│   └── symlink.png -> ../foo/test.png
└── foo
    ├── test.jpg
    └── test.pn
生成以下json输出
{
    "type": "directory",
    "path": "",
    "index": [
        {
            "type": "directory",
            "path": "foo",
            "index": [
                {
                    "type": "image/jpeg",
                    "path": "foo/test.jpg"
                },
                {
                    "type": "image/png",
                    "path": "foo/test.png"
                }
            ]
        },
        {
            "type": "directory",
            "path": "bar",
            "index": [
                {
                    "type": "image/png",
                    "link": "foo/test.png",
                    "path": "bar/symlink.png"
                }
            ]
        }
    ]
}
          项目详情
    
       关闭
    
      
        
    
    
  
dir2json-0.1.0.tar.gz的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 3e623d1a4da8bc7be0dfb67b09ba9be4d4469a65b97d2258df8092f00475975b | |
| MD5 | be954c53b4bc9f6241b437b71f0601ee | |
| BLAKE2b-256 | 2ea299f99a95b6cbb32180410bdaffed1fe492e0a83f1e24fd6e5c2c681e576a |