GithubHelp home page GithubHelp logo

fengniao-python3's Introduction

FengNiao 检查项目中无用资源脚本

翻译自 https://github.com/onevcat/FengNiao

使用:

```
    python3 main.py -p /Users/Users/Desktop/project

    如果有疑似无用资源会被放入project路径目录名的csv文件中 eg:project.csv
```

支持一些参数

```
    python3 main.py -h
    -p, --project : 你当前项目的根路径, 默认: 当前脚本所在目录
    -e, --excluded: 项目中需要不需要筛查的目录 默认: ["Pods"]
    -s, --similar : 是否开启相似度排除 通过前缀后缀排除可能引用了的资源文件 默认: 关闭
                    例: "image01" 会被"image%02d" 给筛掉
    -v, --version : 当前脚本版本号
    -h, --help    : 输出帮助信息
    
```

基本逻辑

```
    通过筛选出所有资源文件的集合 - ALL
    以及通过正则表达式查找对应文件中的已使用资源集合 - USED 
    来做差集        - ALL - ALL ∩ USED

    资源文件类型 = "imageset", "jpg", "png", "gif", "pdf"
    查找文件源类型 = "h", "m", "mm", "swift", "xib", "storyboard", "plist"
```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.