Merge branch '2-refactor-buildfile'

This commit is contained in:
jawira 2019-09-30 23:19:12 +02:00
commit 4e8a521196
6 changed files with 18231 additions and 42 deletions

View File

@ -1,16 +1,83 @@
<component name="ProjectDictionaryState"> <component name="ProjectDictionaryState">
<dictionary name="jawira"> <dictionary name="jawira">
<words> <words>
<w>barthelemy</w>
<w>barthélemy</w>
<w>bento</w>
<w>biohazard</w>
<w>blowfish</w>
<w>bouvet</w>
<w>buildfile</w> <w>buildfile</w>
<w>burkina</w>
<w>cableway</w>
<w>caicos</w>
<w>ceuta</w>
<w>clipperton</w>
<w>cunha</w>
<w>curaçao</w>
<w>czechia</w>
<w>côte</w>
<w>dango</w>
<w>dharma</w>
<w>divoire</w>
<w>diya</w>
<w>emojis</w> <w>emojis</w>
<w>eswatini</w>
<w>facepalming</w>
<w>falafel</w>
<w>faroe</w>
<w>faso</w>
<w>flatbread</w>
<w>futuna</w>
<w>gbeng</w>
<w>gbsct</w>
<w>gbwls</w>
<w>gitattributes</w> <w>gitattributes</w>
<w>gitignore</w> <w>gitignore</w>
<w>hong</w>
<w>ivoire</w>
<w>jawira</w> <w>jawira</w>
<w>keycap</w>
<w>kitts</w>
<w>kosovo</w>
<w>lanka</w>
<w>leste</w>
<w>maarten</w>
<w>mahjong</w>
<w>marino</w>
<w>mayen</w>
<w>mayotte</w>
<w>melilla</w>
<w>mens</w>
<w>merperson</w>
<w>miquelon</w>
<w>moai</w>
<w>nazar</w>
<w>niue</w>
<w>oclock</w>
<w>oden</w>
<w>oneline</w> <w>oneline</w>
<w>palau</w>
<w>papua</w>
<w>petri</w>
<w>phing</w> <w>phing</w>
<w>plantuml</w> <w>plantuml</w>
<w>príncipe</w>
<w>réunion</w>
<w>selfie</w>
<w>sint</w>
<w>smilies</w> <w>smilies</w>
<w>spoked</w>
<w>supervillain</w>
<w>symplify</w> <w>symplify</w>
<w>tanabata</w>
<w>timor</w>
<w>tokelau</w>
<w>tomé</w>
<w>womans</w>
<w>womens</w>
<w>zealand</w>
<w>åland</w>
</words> </words>
</dictionary> </dictionary>
</component> </component>

View File

@ -1,7 +1,4 @@
Changelog # Changelog
=========
All notable changes to this project will be documented in this file.
<!-- <!--
### Added ### Added
@ -12,32 +9,23 @@ All notable changes to this project will be documented in this file.
### Security ### Security
--> -->
Unreleased ## Unreleased
----------
### Added ### Added
- Added a change - [#2] Added docblock with _name_ and _code point_ to all constants.
### Changed
- [#2] Constant `Emoji::LAPTOP_COMPUTER` was changed to `Emoji::LAPTOP`.
- [#2] Constant `Emoji::FLAG_ENGLAND` was changed to `Emoji::FLAG_GBENG`.
- [#2] Constant `Emoji::FLAG_SCOTLAND` was changed to `Emoji::FLAG_GBSCT`.
- [#2] Constant `Emoji::FLAG_WALES` was changed to `Emoji::FLAG_GBWLS`.
<!--- ## [v0.0.0] - 2019-08-30
Guiding Principles
Changelogs are for humans, not machines. ### Added
There should be an entry for every single version.
The same types of changes should be grouped.
Versions and sections should be linkable.
The latest version comes first.
The release date of each versions is displayed.
Mention whether you follow Semantic Versioning.
Types of changes - First working version.
### Added for new features. [#2]: https://github.com/jawira/emoji-catalo/pull/2
### Changed for changes in existing functionality.
### Deprecated for soon-to-be removed features.
### Removed for now removed features.
### Fixed for any bug fixes.
### Security in case of vulnerabilities.
-->

View File

@ -5,9 +5,9 @@ Get access to +3000 emojis as class constants.
Features: Features:
- 🍰 Really easy to use - 🍰 Dead easy to use
- 🔓 Zero dependencies
- 🤩 A lot of emojis - 🤩 A lot of emojis
- 🔓 Zero dependencies
[![Latest Stable Version](https://poser.pugx.org/jawira/emoji-catalog/v/stable)](https://packagist.org/packages/jawira/emoji-catalog) [![Latest Stable Version](https://poser.pugx.org/jawira/emoji-catalog/v/stable)](https://packagist.org/packages/jawira/emoji-catalog)
![Emoji](https://img.shields.io/badge/Emoji-v12.0-%235354FE) ![Emoji](https://img.shields.io/badge/Emoji-v12.0-%235354FE)

View File

@ -1,4 +1,6 @@
<?php <?php /** @noinspection PhpUnused */
namespace Jawira\EmojiCatalog;
/** /**
* Class Emoji * Class Emoji
@ -6,9 +8,7 @@
* Get access to all emojis as class constants. * Get access to all emojis as class constants.
* *
* @package Jawira\EmojiCatalog * @package Jawira\EmojiCatalog
* @author Jawira Portugal <dev@tugal.be> * @author Jawira Portugal <dev@tugal.be>
*/ */
namespace Jawira\EmojiCatalog;
class Emoji class Emoji
{ {

View File

@ -5,21 +5,41 @@
<xsl:template match="/"> <xsl:template match="/">
<xsl:for-each select="//table//tr[./td//img]"> <xsl:for-each select="//table//tr[./td//img]">
<xsl:text> const </xsl:text> <xsl:text> /**&#10;</xsl:text>
<xsl:text> * </xsl:text>
<xsl:call-template name="get-name"/> <xsl:call-template name="get-name"/>
<xsl:text>&#10;</xsl:text>
<xsl:text> *&#10;</xsl:text>
<xsl:text> * Code point(s): </xsl:text>
<xsl:call-template name="get-code"/>
<xsl:text>&#10;</xsl:text>
<xsl:text> */&#10;</xsl:text>
<xsl:text> const </xsl:text>
<xsl:call-template name="get-constant-name"/>
<xsl:text> = "</xsl:text> <xsl:text> = "</xsl:text>
<xsl:call-template name="get-alt"/> <xsl:call-template name="get-alt"/>
<xsl:text>";&#10;</xsl:text> <xsl:text>";&#10;&#10;</xsl:text>
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template>
<xsl:template name="get-code">
<xsl:value-of select="./td[2]//a/text()"/>
</xsl:template>
<xsl:template name="get-name">
<xsl:variable name="short-name" select="./td[last()]/text()"/>
<xsl:variable name="removable" select="'⊛⊖'"/>
<xsl:variable name="cleaned" select="translate($short-name, $removable, '')"/>
<xsl:value-of select="normalize-space($cleaned)"/>
</xsl:template>
<xsl:template name="get-alt"> <xsl:template name="get-alt">
<xsl:value-of select="./td[3]/text()"/> <xsl:value-of select="./td[3]/text()"/>
</xsl:template> </xsl:template>
<xsl:template name="get-name"> <xsl:template name="get-constant-name">
<xsl:variable name="short-name" select="./td[last()]/text()"/> <xsl:variable name="short-name" select="./td[last()]/text()"/>
<xsl:variable name="removable" select="':;.,⊛’!“”()'"/> <xsl:variable name="removable" select="':;.,⊛’!“”()'"/>
<xsl:variable name="cleaned" select="translate($short-name, $removable, '')"/> <xsl:variable name="cleaned" select="translate($short-name, $removable, '')"/>
<xsl:variable name="lowercase" select="'Åãabcçdeéfghíijklmnoôpqrstuvwxyz-&amp;'"/> <xsl:variable name="lowercase" select="'Åãabcçdeéfghíijklmnoôpqrstuvwxyz-&amp;'"/>
<xsl:variable name="uppercase" select="'AAABCCDEEFGHIIJKLMNOOPQRSTUVWXYZ N'"/> <xsl:variable name="uppercase" select="'AAABCCDEEFGHIIJKLMNOOPQRSTUVWXYZ N'"/>

File diff suppressed because it is too large Load Diff