Class: Zarchitect
- Inherits:
-
Object
- Object
- Zarchitect
- Defined in:
- lib/zarchitect.rb
Direct Known Subclasses
Assets, Audio, CMD::Misc, CMD::New, CMD::Sitemap, CMD::Update, Category, Content, FileManager, HTML, Image, ImageSet, Index, MiscFile, Post, SCSS, Section, Tag, Video, ZERB, ZRSS
Constant Summary collapse
- VERSION =
"1.7.5"
- 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
-
#initialize ⇒ Zarchitect
constructor
A new instance of Zarchitect.
- #main ⇒ Object
- #rss ⇒ Object
Constructor Details
#initialize ⇒ Zarchitect
Returns a new instance of Zarchitect.
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 55 |
# File 'lib/zarchitect.rb', line 28 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
#main ⇒ Object
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 88 |
# File 'lib/zarchitect.rb', line 57 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 |
#rss ⇒ Object
90 91 92 |
# File 'lib/zarchitect.rb', line 90 def rss @@rss end |