File: paymentfont.rb

package info (click to toggle)
ruby-prawn-icon 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,228 kB
  • sloc: ruby: 1,370; makefile: 5
file content (25 lines) | stat: -rw-r--r-- 672 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

# tool/fontawesome.rb: Convert PaymentFont SCSS variables to YAML legend.
#
# Copyright September 2017, Jesse Doyle. All rights reserved.
#
# This is free software. Please see the LICENSE and COPYING files for details.

require_relative 'scss/parser'

PREFIX = /pf-var-(?<key>.+):\s*"\\(?<unicode>.*)";/.freeze
VERSION = /pf-version:\s*"(?<version>.*)"/.freeze

puts 'Please enter in the path to the _variables.scss file:'
path = File.expand_path(gets.chomp)
puts 'Enter the output file path:'
output = File.expand_path(gets.chomp)

SCSS::Parser.new(
  prefix: PREFIX,
  version: VERSION,
  specifier: 'pf',
  path: path,
  output: output
)