Giter VIP home page Giter VIP logo

hinatazaka46-python's Introduction

hinatazaka46-python

This package supplies some utilities for developing tools of hinatazaka46.

The following features are included:

  • Converting member's ID to her name in both Japanese and Romaji.
  • Getting hash tags of members' blog, official message app, and instagram from member's ID.

How to install

Run the following command to install this package.

pip install "git+https://github.com/ryoryo25/hinatazaka46-python.git@$(curl -s https://api.github.com/repos/ryoryo25/hinatazaka46-python/releases/latest | jq -r '.tag_name')"

How to use

Simply import this package like this:

import hinatazaka46 as hinata

Features

Classes

The following classes are added.

StringCase

Enum class of case of string. This enum has the following items.

  • Plain
  • CamelCase
  • SnakeCase
  • KebabCase

Functions

The following functions are supported.

id_to_name(id: int, en: bool = False, case: StringCase = StringCase.Plain) -> str

Converts member's ID to her name.

Arguments:

VAR: TYPE default value description
id: int - Member's id
en: bool False Name in Romaji or not
case: StringCase StringCase.Plain Select string case such as camel case ...

Return value: member's name

name_to_id(name: str, en: bool = False) -> int

Converts member's name to her ID.

Arguments:

VAR: TYPE default value description
name: str - Member's name
en: bool False Name in Romaji or not

Return value: member's ID

id_to_blog_tag(id: int) -> str

Gets member's blog hash tag from her ID.

Arguments:

VAR: TYPE default value description
id: int - Member's ID

Return value: member's blog hash tag starts with '#'

id_to_talk_tag(id: int) -> str

Gets member's her official message app hash tag from her ID.

Arguments:

VAR: TYPE default value description
id: int - Member's ID

Return value: member's official message app hash tag starts with '#'

id_to_instagram_tag(id: int) -> str

Gets member's instagram hash tag from her ID.

Arguments:

VAR: TYPE default value description
id: int - Member's ID

Return value: member's instagram hash tag starts with '#'

NOTE: returns empty string if the member doesn't have a official instagram account.

id_to_instagram_account(id: int) -> str

Gets member's instagram username from her ID.

Arguments:

VAR: TYPE default value description
id: int - Member's ID

Return value: member's instagram username

NOTE: returns None if the member doesn't have a official instagram account.

instagram_accounts()

Generates all existing instagram accounts.

Arguments: None

Return value: generator for instagram accounts

hinatazaka46-python's People

Contributors

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