Code Monkey home page Code Monkey logo

tangokoto's Introduction

Tangokoto

A hitokoto-like collection of Mr.Tang's .
master branch and API are maintained by Mountain & River Online Judge.

Pull Request

It's recommended to make a pull request when you just heard of a new quotation of Mr.Tang's.
The Tangokoto API which maintained by Mountain & River Online Judge will sync it every 24 hours or manually.

Usage

How to use it in terminal?

Just copy this to your .bashrc or .zshrc and more.

echo `curl 'https://api.imvictor.tech/php-api/v7/tangokoto?plain=1' 2> /dev/null`

How to deploy it to my blog.

It is recommended to use AJAX. By default, it returns a piece of JSON data. If your site is built with jQuery, you can use this to anywhere you what to get Tangokoto.

<div class="ui centered inline loader" id="hitokoto-loader"></div>
<script>
  $.get('https://api.imvictor.tech/php-api/v7/tangokoto', function (data) {
    if (typeof data === 'string') data = JSON.parse(data);
    $('#hitokoto-content').css('display', '').text(data.hitokoto);
    if (data.from) {
      $('#hitokoto-from').css('display', '').text('—— ' + data.from);
    }
  });
</script>
<div style="font-size: 1em; line-height: 1.5em;" id="hitokoto-content"></div>
<div style="text-align: right; margin-top: 15px; font-size: 0.9em; color: rgb(102, 102, 102);" id="hitokoto-from"></div>

tangokoto's People

Contributors

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