Code Monkey home page Code Monkey logo

wiki-img-meta's Introduction

wiki-img-meta

TypeScript Code style: ESLint Prettier Jest Commitizen friendly

Get Wikipedia image metadata

Installation

npm install wiki-img-meta

Usage

import { getImageMetadata } from 'wiki-img-meta'

const url = 'https://id.wikipedia.org/wiki/Berkas:Rinjani_Caldera.jpg'

getImageMetadata(url)
  .then((metadata) => console.log(metadata))
  .catch((err) => console.error(err))

API

getImageMetadata(url: string): Promise

Parameters

Returns

  • Promise with Metadata object

    type Metadata = {
      link: string
      title: string
      width: string
      height: string
      size: string
      type: string
      date: Date | null
      original_source: string | null
      author: string | null
      src: string
      license: License | License[] | null
    }
    
    type License = {
      type: string | null
      link: string | null
    }
    

Contributing

Feel free to submit an issues and create pull requests.

Learn more

License

MIT License

wiki-img-meta's People

Contributors

abdmmar avatar

Stargazers

Roman avatar

Watchers

 avatar

Forkers

ntzrbtr

wiki-img-meta's Issues

[CI] Add seperate workflow for pull request and fix script

Overview

To run a workflow on pull requests to check code quality and not publish the package, it's must create a new file for it.

Tasks:

  • make seperate file for pull request: pull-request.yml
  • change name from workflow.yml to publish.yml
  • change script from npm i to npm ci
  • make seperate script for linting, formating, testing, and coverage

[Release] Add semantic release and github action

Add semantic-release to automatically publish the library and add GitHub action to run ci script before publishing the package

  • semantic-release setup
  • add github workflow
  • add ci script to run lint, format, test:ci, and test:cov scripts

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.