Module: Metadata

Included in:
IOSWizard, ItchWizard
Defined in:
dragon/metadata.rb

Overview

Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński Copyright 2021 DragonRuby LLC MIT License metadata.rb has been released under MIT (*only this file*).

Instance Method Summary collapse

Instance Method Details

#get_metadataObject


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'dragon/metadata.rb', line 11

def 
   = $gtk.read_file 

  if !
    
     = $gtk.read_file 
  end

  dev_id, dev_title, game_id, game_title, version, icon = *.each_line.to_a

  {
    dev_id: dev_id.strip,
    dev_title: dev_title.strip,
    game_id: game_id.strip,
    game_title: game_title.strip,
    version: version.strip,
    icon: icon.strip
  }
end

#metadata_file_pathObject


7
8
9
# File 'dragon/metadata.rb', line 7

def 
  "metadata/game_metadata.txt"
end

#write_blank_metadataObject


31
32
33
34
35
36
37
38
39
40
# File 'dragon/metadata.rb', line 31

def 
    $gtk.write_file , <<-S.strip
#devid=myname
#devtitle=My Name
#gameid=mygame
#gametitle=My Game
#version=0.1
#icon=metadata/icon.png
S
end