jekyll-mp3info 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/lib/jekyll-mp3info.rb +31 -0
- metadata +59 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b61edfc35340b0994b1080f02a804888440a914d093ed24106ba839c8d34077a
|
4
|
+
data.tar.gz: 10a5f401a2c3fea5da99f5e7adc586c22f07dcae6bc3084740ed5c05a893f10a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8ac6b13a638394557bad58c660556326da28fd07fe0b5a051c14d4b895244feaea5dad0c36a099d95d4a53f9ae9442778e86704e63c63536642534112ee3e506
|
7
|
+
data.tar.gz: 11240269a2017bd9d495f83a140947f6ed254afcdd118de6bb1fd7793bb4b64ab5f93667ab86a809b97cb87af27bc1405622eeb2da4ab5df9430fcb100fdcf5f
|
data/Gemfile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# lib/jekyll-mp3info.rb
|
2
|
+
|
3
|
+
require 'mp3info'
|
4
|
+
|
5
|
+
module Jekyll
|
6
|
+
module Mp3
|
7
|
+
|
8
|
+
def mp3_duration(input)
|
9
|
+
|
10
|
+
seconds = Mp3Info.new(input.strip).length
|
11
|
+
|
12
|
+
hours = (seconds / (60.0 * 60.0)).floor
|
13
|
+
seconds -= hours * 60 * 60
|
14
|
+
|
15
|
+
minutes = (seconds / 60.0).floor
|
16
|
+
seconds -= minutes * 60
|
17
|
+
|
18
|
+
"%02d:%02d:%02d" % [hours, minutes, seconds]
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
def mp3_seconds(input)
|
23
|
+
|
24
|
+
Mp3Info.new(input.strip).length
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
Liquid::Template.register_filter Jekyll::Mp3
|
metadata
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-mp3info
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- awk
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-07-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ruby-mp3info
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- self@awk.space
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- Gemfile
|
35
|
+
- lib/jekyll-mp3info.rb
|
36
|
+
homepage: https://github.com/awkspace/jekyll-mp3info
|
37
|
+
licenses:
|
38
|
+
- MIT
|
39
|
+
metadata: {}
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
requirements: []
|
55
|
+
rubygems_version: 3.0.1
|
56
|
+
signing_key:
|
57
|
+
specification_version: 4
|
58
|
+
summary: Jekyll plugin to retrieve mp3 data
|
59
|
+
test_files: []
|