Giter VIP home page Giter VIP logo

web2app's Introduction

web2app

web2app is an easily converter from Web URLs to App URIs.

web2app

What's the app URI?

Google recently released App Indexing. They said this:

App Indexing helps you get your app found in Google Search. Once your app is indexed, mobile users who search for content related to your app can see an install button to your Android app in Search results. This helps you increase your install base.

Google is beginning to index within native apps using URI structure the same as web platform. For example, if the web URL is http://example.com/info/, the app URI become android-app://http/example.com/info/.

App URI format is:

android-app://{package_id}/{scheme}/{host_path}

If you want to learn about App Indexing, please access the official document.

The Two Ways To Open An App From The Web or Other Apps

There are two ways to open native app from the web or other apps.

Custom URL Scheme

<a href="example://path?name=value">Open in App</a>

App Indexing

android-app://http/path?name=value
android-app://example/path?name=value

Why It Is Important To Have The Same Format

Three URL formats, Web URL, Custom URL Scheme, App Indexing, tend to fall apart, because there is no rule in Custom URL Scheme. For example.

  • http://example.com/article?id=12345 (Web)
  • example://article/12345 (Custom URL Scheme)
  • android-app://example.com/article?id=12345 (App Indexing)

The more you generate App URL, the more difficult it becomes to remember the original rule. This application helps you to generate App URIs from Web URL automatically.

Installation

Web Version

If you want to use this application right now, please access the Web Version.

CLI Version

CLI Version has more features: multiple URLs and several format styles.

npm install -g web2app

Usuage

web2app --config youtube.json --format csv

Options

  • config Configration JSON file. Example is here.
  • url Web URL. You can connect multiple URLs with ,.
  • ios_scheme Custom URL Scheme for iOS. e.g. youtube://
  • android_scheme Custom URL Scheme for Android.
  • store App Store ID (Only for iOS.) e.g. 544007664
  • package Package Name (Only for Android.) e.g. com.google.android.youtube
  • format Output format styles. plain(default), csv, json, html

If you want to save as file, you can change the command below.

web2app --config youtube.json --format csv > youtube.cvs

Format Styles

plain

http://www.youtube.com/watch?v=dQw4w9WgXcQ
youtube://www.youtube.com/watch?v=dQw4w9WgXcQ
android-app://com.google.android.youtube/http/www.youtube.com/watch?v=dQw4w9WgXcQ
android-app://com.google.android.youtube/youtube/www.youtube.com/watch?v=dQw4w9WgXcQ
youtube://www.youtube.com/watch?v=dQw4w9WgXcQ
ios-app://544007664/youtube/www.youtube.com/watch?v=dQw4w9WgXcQ

csv

name,uri,platform
Web URL,http://www.youtube.com/watch?v=dQw4w9WgXcQ,Web
Custom URL Scheme for Android,youtube://www.youtube.com/watch?v=dQw4w9WgXcQ,Android
App Indexing for Android (http),android-app://com.google.android.youtube/http/www.youtube.com/watch?v=dQw4w9WgXcQ,Android
App Indexing for Android (custom scheme),android-app://com.google.android.youtube/youtube/www.youtube.com/watch?v=dQw4w9WgXcQ,Android
Custom URL Scheme for iOS,youtube://www.youtube.com/watch?v=dQw4w9WgXcQ,iOS
App Indexing for iOS,ios-app://544007664/youtube/www.youtube.com/watch?v=dQw4w9WgXcQ,iOS

json

[
  [
    {
      "name": "Web URL",
      "uri": "http://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "platform": "Web"
    },
    {
      "name": "Custom URL Scheme for Android",
      "uri": "youtube://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "platform": "Android"
    },
    {
      "name": "App Indexing for Android (http)",
      "uri": "android-app://com.google.android.youtube/http/www.youtube.com/watch?v=dQw4w9WgXcQ",
      "platform": "Android"
    },
    {
      "name": "App Indexing for Android (custom scheme)",
      "uri": "android-app://com.google.android.youtube/youtube/www.youtube.com/watch?v=dQw4w9WgXcQ",
      "platform": "Android"
    },
    {
      "name": "Custom URL Scheme for iOS",
      "uri": "youtube://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "platform": "iOS"
    },
    {
      "name": "App Indexing for iOS",
      "uri": "ios-app://544007664/youtube/www.youtube.com/watch?v=dQw4w9WgXcQ",
      "platform": "iOS"
    }
  ]
]

html

I recommend html format! It shows the QR Code of each URL, so you can check whether the url is valid or not on your phone.

HTML Format

web2app's People

Contributors

herablog 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.