jekyll-hinduarabic 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/jekyll-hinduarabic.rb +20 -0
  3. metadata +60 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6e14ffba7b8f6fdcd987e4ad46803cc9a5211cd5
4
+ data.tar.gz: 923a003ecd70ea41919d40f1d3aca654e4e86d07
5
+ SHA512:
6
+ metadata.gz: 390d9904003f3897b25bb8426ce88f89238b7cc0d891622faf86f40600b317286c003fe312875bdbb0839f319512ac1c48b1bea3b64d5d4d50adfdbd37cdf334
7
+ data.tar.gz: 15675eed93ec91253c907667a4c7314936ce59bf5b2227db9841f2f1fb58a982a787578ec4d23fcf9a5e1210b6988cae24f79d2664712005b8309ae699f87dcd
@@ -0,0 +1,20 @@
1
+ #!/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ module Jekyll
5
+ module HinduArabicFilter
6
+
7
+ def habify(input)
8
+ source = {"1" => "۱", "2" => "۲", "3" => "۳", "4" => "۴", "5" => "۵", "6" => "۶", "7" => "۷", "8" => "۸", "9" => "۹", "0" => "۰"}
9
+ for x in source.keys
10
+ if input.include? x
11
+ input = input.gsub(x, source[x])
12
+ end
13
+ end
14
+ return input
15
+ end
16
+ end
17
+ end
18
+
19
+ Liquid::Template.register_filter(Jekyll::HinduArabicFilter)
20
+
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-hinduarabic
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Mehdi Sadeghi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ description:
28
+ email:
29
+ - mehdi@mehdix.org
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - lib/jekyll-hinduarabic.rb
35
+ homepage: https://github.com/mehdisadeghi/jekyll-hinduarabic
36
+ licenses:
37
+ - MIT
38
+ metadata: {}
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubyforge_project:
55
+ rubygems_version: 2.6.11
56
+ signing_key:
57
+ specification_version: 4
58
+ summary: Jekyll plugin to converts English numerals to the corresponding Hindu-Arabic
59
+ form.
60
+ test_files: []