Giter VIP home page Giter VIP logo

flag's People

Contributors

calebj avatar codacy-badger avatar cvzi avatar dependabot[bot] avatar renovate[bot] avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flag's Issues

Sark / Unicode 16.0

The country code CQ = Sark is in Unicode 16.0's list of flags / RGI list.
Unicode 16 will be finalized in September, and then it's up to the main emoji fonts to add support.
Is this something worth adding to flag/data/__init__.py, or should it wait until it becomes more usable?

How to detect invalid country code?

The flags work fine when I have a valid country code. If I create a dummy country Code which doesn't exist then how do I detect that?
If I do flag.flag(countrycode) it gets converted to two letter code irrespective of If it's valid or not.
But I don't want to display this two letter code in my UI. Just want to display the emoji if available

Support regional flags

It would be nice if regional flags were supported with tag sequences.

For example, flag.flagize(':GB-ENG:') would return 🏴gbeng✦ which would render as
image when supported.

Black flag detection

I have 3-letter country codes that I'd like to convert to emoji. The list looks lie this:

IND, NGA, KEN, ITA, USA, CUB, ZAF, GBR, POL, GHA, MAR, IDN, ESP, BRA, FRA

I understand that emoji uses two-letter country codes so I cut 3-letters to 2-letters (in most cases it works). But I faced the "black flag" problem.

If I try to get emoji from unknown 2 symbols, the library may return a black flag. How can I detect that?

Moreover there are a lot of symbols that looks like "black flag" so I can't use a simple == operator.

image

Stray debug print() in flag()

I updated the package and noticed these right away:

flag(),  True True
flag(),  True True
flag(),  True True
flag(),  True True
flag(),  True True
flag(),  True True
flag(),  True True

The culprit is

print("flag(), ", self.only_supported, self.only_valid)
introduced in 3354a48.

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.