Coder Social home page Coder Social logo

sunnylqm / app-info-parser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenquincy/app-info-parser

2.0 1.0 0.0 5.18 MB

A javascript parser for parsing .ipa or .apk files. IPA/APK文件 js 解析器

Home Page: https://app-info-parser.quincychen.cn/

License: MIT License

JavaScript 93.20% HTML 6.80%

app-info-parser's Introduction

app-info-parser

app-info-parser is a parser for parsing .ipa or .apk files. It will return the information with json from AndroidManifest.xml or Info.plist.

Support

  • Node ✅

  • Browser

    Chrome Firefox Safari Opera IE
    latest ✅ latest ✅ latest ✅ latest ✅
  • npx

Without Installation

You can use app-info-parser by npx, if you don't want to install it. Run this command in your terminal:

npx app-info-parser -f <file-path> -o <output-path>
argument type description
-f string The path of file that you want to parse.
-o string The output path that you want to save the parse result. Default is "./result.json"

Installation

npm install app-info-parser
# or yarn
yarn add app-info-parser

Getting started

NPM Use

const AppInfoParser = require('app-info-parser')
const parser = new AppInfoParser('../packages/test.apk') // or xxx.ipa
parser.parse().then(result => {
  console.log('app info ----> ', result)
  console.log('icon base64 ----> ', result.icon)
}).catch(err => {
  console.log('err ----> ', err)
})

Basic Use

<input type="file" name="file" id="file" onchange="fileSelect()">
<script src="/dist/app-info-parser.js"></script>
<script>
function fileSelect () {
  const files = document.getElementById('file').files
  const parser = new AppInfoParser(files[0])
  parser.parse().then(result => {
    console.log('app info ----> ', result)
    console.log('icon base64 ----> ', result.icon)
  }).catch(err => {
    console.log('err ----> ', err)
  })
}
</script>

Demand loading

You can use demand loading, when you only need one parser.

ApkParser

const ApkParser = require('app-info-parser/src/apk')
const parser = new ApkParser('../packages/test.apk')
parser.parse().then(result => {
  console.log('app info ----> ', result)
  console.log('icon base64 ----> ', result.icon)
}).catch(err => {
  console.log('err ----> ', err)
})

IpaParser

const IpaParser = require('app-info-parser/src/ipa')
const parser = new IpaParser('../packages/test.ipa')
parser.parse().then(result => {
  console.log('app info ----> ', result)
  console.log('icon base64 ----> ', result.icon)
}).catch(err => {
  console.log('err ----> ', err)
})

API Referrer

AppInfoParser | ApkParser | IpaParser

  • constructor(file)
    • file Blob or File in browser, Path in Node
  • parse: () => Promise<Object> A function return a promise, which resolving the parse result

Buy Me A Coffee

Open source is not easy, you can buy me a coffee. Note your name or github id so I can add you to the donation list.

Wechat Pay

Ali Pay

Donation List

❤️ Thanks these guys for donations. Contact me with email, if you had donated but not on the list.

Donors Amount Time
y*n ¥6.66 2020-08-26 12:10
*明 ¥100 2020-08-25 11:35
*肖 ¥6.66 2020-07-31 19:54
O*s ¥1 2020-05-26 16:01
**豪 ¥6.66 2020-03-05 20:14
*大 ¥6.66 2020-02-25 16:55
*风 ¥1 2020-01-03 15:36
黄灰红 ¥1 2019-12-10 17:53
zona.zhou ¥1 2019-10-20 23:18
*。 ¥66 2019-10-20 22:45

License

MIT

Resources

app-info-parser's People

Contributors

chenquincy avatar cliqiang avatar imquincychen avatar michalskr avatar sunnylqm avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.