Class: Zarchitect

Inherits:
Object
  • Object
show all
Defined in:
lib/zarchitect.rb

Constant Summary collapse

VERSION =
"1.7.2"
HTMLDIR =
"_html"
BUILDIR =
"_build"
NODEDIR =
"_build/nodes"
FILEDIR =
"_files"
ASSETDIR =
"_assets"
DRAFTDIR =
"_drafts"
LAYOUTDIR =
"_layouts"
CONFIGDIR =
"_config"
FILESDIR =
"files"
SHARESDIR =

directory under _files that doesn’t have thumbnails

"share"
ASSETSDIR =
"assets"
DEBUGSDIR =
"debug"

Instance Method Summary collapse

Constructor Details

#initializeZarchitect

Returns a new instance of Zarchitect.



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/zarchitect.rb', line 27

def initialize
  @@sections = Array.new
  GPI.app_name = "zarchitect"
  GPI.extend(:dir)
  GPI.extend(:file)
  GPI.extend(:hash)
  GPI.extend(:numeric)
  GPI.extend(:string)
  GPI::CLU.init
  # Command name | range of parameter num | options
  GPI::CLU.use_command("u", [0], "rvqdD")
  GPI::CLU.use_command("update", [0], "rvqdD")

  GPI::CLU.use_command("s", [0], "v")
  GPI::CLU.use_command("sitemap", [0], "v")

  GPI::CLU.use_command("ua", [0], "v")
  GPI::CLU.use_command("update-assets", [0], "v")

  GPI::CLU.use_command("uf", [0], "v")
  GPI::CLU.use_command("update-files", [0], "v")
  GPI::CLU.use_command("setup", [0], "v")

  GPI::CLU.use_command("new", 2..3, "v")
  #app_command(0..2, "r") # appname = command.name
  GPI::CLU.process_args
  @@rss = ZRSS.new
end

Instance Method Details

#mainObject



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/zarchitect.rb', line 56

def main
  if GPI::CLU.check_option('v')
    GPI.print "Verbose Mode"
  else
    GPI.print "Non-verbose Mode"
  end
  # Load config
  case GPI::CLU.command
  when "new" # create md file for new web page   
    load_conf
    cmd = CMD::New.new
    cmd.run
  when "sitemap", "s"
    load_conf
    cmd = CMD::Sitemap.new
    cmd.run
  when "update","u"
    load_conf
    cmd = CMD::Update.new
    cmd.run
  when "sync"
    # draw data from mastodon / twitter api
  when "update-assets","ua"
    load_conf
    CMD::Misc.update_assets
  when "update-files","uf"
    load_conf
    CMD::Misc.update_files
  when "setup"
    CMD::Misc.setup
  end
end

#rssObject



89
90
91
# File 'lib/zarchitect.rb', line 89

def rss
  @@rss
end