ravvi 0.1.0

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.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +43 -0
  3. data/lib/ravvi.rb +41 -0
  4. metadata +49 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 51d869beb7dfb451c19c554b3332e71c8919952c3992d263877172686a190bd9
4
+ data.tar.gz: 72ce01782e2c1dc806ed1c362163e63acbcf58e709503fa580808fe0b3058497
5
+ SHA512:
6
+ metadata.gz: 4cc708c329495271c2f0c65c4fc7d7b1754ee4145cf8dd49971b809e2c9f1a2b6cfda0ffa949eb3770d367f04bc1df87e3950da1f532fa3e1e69ba10a152c29a
7
+ data.tar.gz: e695a609c0f74ce058e7eee366347b227e0758fa08ec1b040640eb1f64c862ba2eddb6221f912c42870ad396fe8a338258fa66014e7f5a335816fe975e965790
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # ravvi
2
+
3
+ Ad format presets and creative-brief helpers for teams building social ad
4
+ creative — companion utilities for [Ravvi](https://ravvi.ai), an
5
+ [AI ad generator](https://ravvi.ai) that turns a product page into ready-to-run
6
+ video and image ads.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ gem install ravvi
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```python
17
+ from ravvi import FORMATS, formats_for, safe_area
18
+
19
+ reels = FORMATS["instagram_reels"]
20
+ print(reels.aspect) # 9:16
21
+ print(reels.max_seconds) # 90
22
+
23
+ for fmt in formats_for("youtube"):
24
+ print(fmt.name, fmt.width, fmt.height, fmt.aspect)
25
+
26
+ # Keep copy clear of the platform's UI chrome
27
+ print(safe_area(reels)) # {'x': 0, 'y': 269, 'width': 1080, 'height': 1267}
28
+ ```
29
+
30
+ ## What's included
31
+
32
+ - `FORMATS` — canvas specs for Instagram, TikTok, YouTube, Facebook, LinkedIn and X placements
33
+ - `formats_for(platform)` — every placement for one platform, widest aspect first
34
+ - `safe_area(fmt)` — the pixel box that survives platform overlays
35
+
36
+ ## Links
37
+
38
+ - Homepage: <https://ravvi.ai>
39
+ - Ravvi AI ad generator: <https://ravvi.ai>
40
+
41
+ ## License
42
+
43
+ MIT
data/lib/ravvi.rb ADDED
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Ad format presets and safe-area helpers.
4
+ #
5
+ # Companion utilities for Ravvi (https://ravvi.ai), an AI ad generator.
6
+ module Ravvi
7
+ VERSION = "0.1.0"
8
+
9
+ Format = Struct.new(:name, :platform, :width, :height, :max_seconds) do
10
+ def aspect
11
+ g = width.gcd(height)
12
+ "#{width / g}:#{height / g}"
13
+ end
14
+ end
15
+
16
+ FORMATS = {
17
+ "instagram_reels" => Format.new("instagram_reels", "instagram", 1080, 1920, 90),
18
+ "instagram_feed" => Format.new("instagram_feed", "instagram", 1080, 1350, 60),
19
+ "tiktok_infeed" => Format.new("tiktok_infeed", "tiktok", 1080, 1920, 60),
20
+ "youtube_shorts" => Format.new("youtube_shorts", "youtube", 1080, 1920, 60),
21
+ "youtube_instream" => Format.new("youtube_instream", "youtube", 1920, 1080, 30),
22
+ "facebook_feed" => Format.new("facebook_feed", "facebook", 1080, 1080, 60),
23
+ "facebook_story" => Format.new("facebook_story", "facebook", 1080, 1920, 15),
24
+ "linkedin_feed" => Format.new("linkedin_feed", "linkedin", 1200, 628, 30),
25
+ "x_feed" => Format.new("x_feed", "x", 1200, 675, 140)
26
+ }.freeze
27
+
28
+ # Every known placement for a platform, widest aspect first.
29
+ def self.formats_for(platform)
30
+ FORMATS.values
31
+ .select { |f| f.platform == platform.to_s.downcase }
32
+ .sort_by { |f| -(f.width.to_f / f.height) }
33
+ end
34
+
35
+ # Pixel box that stays clear of the platform's UI chrome.
36
+ def self.safe_area(format, top: 0.14, bottom: 0.20)
37
+ y0 = (format.height * top).round
38
+ y1 = (format.height * (1 - bottom)).round
39
+ { x: 0, y: y0, width: format.width, height: y1 - y0 }
40
+ end
41
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ravvi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ravvi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-07-24 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: 'Companion utilities for Ravvi, an AI ad generator: canvas specs, aspect
14
+ ratios and UI-safe areas for Instagram, TikTok, YouTube, Facebook, LinkedIn and
15
+ X ad placements.'
16
+ email: hello@ravvi.ai
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - README.md
22
+ - lib/ravvi.rb
23
+ homepage: https://ravvi.ai
24
+ licenses:
25
+ - MIT
26
+ metadata:
27
+ homepage_uri: https://ravvi.ai
28
+ documentation_uri: https://ravvi.ai
29
+ source_code_uri: https://ravvi.ai
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '2.6'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubygems_version: 3.0.3.1
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: Ad format presets and safe-area helpers for social ad creative
49
+ test_files: []