mirror of
https://github.com/mrfluffy-dev/oreo-cursor.git
synced 2026-01-17 05:40:34 +00:00
Convert.rb to only iterate on .svg.oreo files
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
# Frozen_String_Literal: true
|
# Frozen_String_Literal: true
|
||||||
|
# Written by Sourav Goswami <souravgoswami@protonmail.com>
|
||||||
|
|
||||||
BASE = File.join(__dir__, 'oreo_base_cursors')
|
BASE = File.join(__dir__, 'oreo_base_cursors')
|
||||||
|
|
||||||
|
# Configuration file to read
|
||||||
CONFIG_FILE = 'colours.conf'
|
CONFIG_FILE = 'colours.conf'
|
||||||
|
|
||||||
|
# Output directory
|
||||||
OUT_DIR = File.join(File.expand_path('..', __dir__), 'src')
|
OUT_DIR = File.join(File.expand_path('..', __dir__), 'src')
|
||||||
|
|
||||||
# Content of index.theme inside each theme
|
# Content of index.theme inside each theme
|
||||||
@@ -100,9 +104,9 @@ colours.each do |x, y|
|
|||||||
File.delete(file)
|
File.delete(file)
|
||||||
end
|
end
|
||||||
|
|
||||||
Dir.glob("#{BASE}/*.svg").each do |z|
|
Dir.glob("#{BASE}/*svg.oreo").each do |z|
|
||||||
if File.file?(z)
|
if File.file?(z)
|
||||||
dest_file = File.join(dirname, File.basename(z))
|
dest_file = File.join(dirname, File.basename(z).split(?.).tap(&:pop).join(?.))
|
||||||
data = IO.read(z)
|
data = IO.read(z)
|
||||||
|
|
||||||
# Background Colour
|
# Background Colour
|
||||||
|
|||||||
Reference in New Issue
Block a user