summary refs log tree commit diff stats
path: root/getwtxt.json
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-23 00:21:53 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-23 01:08:13 -0400
commitcd635e6c6b009d6c9d6943ea7c850ca740172b65 (patch)
tree47c482560cf5f0019f6e13076fc39053f9d5bf77 /getwtxt.json
parentd15180e9dcd540d5850fa0319a7614620075eaea (diff)
downloadgetwtxt-cd635e6c6b009d6c9d6943ea7c850ca740172b65.tar.gz
configuration init changes
Diffstat (limited to 'getwtxt.json')
-rw-r--r--getwtxt.json24
1 files changed, 12 insertions, 12 deletions
diff --git a/getwtxt.json b/getwtxt.json
index 912975a..b739d8c 100644
--- a/getwtxt.json
+++ b/getwtxt.json
@@ -1,15 +1,15 @@
 {
-  "port": 9001,
-  "stdoutLogging": true,
-  "logFile": "getwtxt.log",
-  "databasePath": "getwtxt.db",
-  "databasePushInterval": "5m",
-  "reCacheInterval": "1h",
-  "instance": {
-    "name": "getwtxt",
-    "url": "https://twtxt.example.com",
-    "owner": "foo barrington",
-    "mail": "foo@barrington.ext",
-    "description": "This is the twtxt registry for the tildeverse network of public unix servers."
+  "ListenPort": 9001,
+  "StdoutLogging": true,
+  "LogFile": "getwtxt.log",
+  "DatabasePath": "getwtxt.db",
+  "DatabasePushInterval": "5m",
+  "StatusFetchInterval": "1h",
+  "Instance": {
+    "SiteName": "getwtxt",
+    "URL": "https://twtxt.example.com",
+    "OwnerName": "foo barrington",
+    "Email": "foo@barrington.ext",
+    "Description": "This is the twtxt registry for the tildeverse network of public unix servers."
   }
 }
#0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# A Class that contains data about directories
class Directory
	class LoadStatus
		# @n contains a three bit number: x3x2x1
		# x1:
		# 0 = not scheduled
		# 1 = scheduled
		# x3x2:
		# 00 = nothing loaded
		# 01 = got the list of files
		# 10 = <undefined>
		# 11 = got the list of files and entry objects
		def initialize(n = 0)
			@n = 0
		end

		def got_files?
			# is bit 2 nd 3 == 01
			return n & 2 == 2
		end

		def scheduled?
			# is the first bit 1?
			return n & 1 == 1
		end

		def got_objects?
			return n & 4 == 4
		end
		attr_accessor :n
	end

	def initialize(path)
		@path = path
		@status = LoadStatus.new(0)
		@files = []
		@sort_time = nil
		@mtime = nil
#		@width = 1000
		@read = false
		@free_space = nil
		@empty = true
		@scheduled = false
	end

	# {{{ Trivial
	def inspect
		return "<Directory: #{path}>"
	end
	alias to_s inspect

	def size
		return @files.size
	end

	def not_loaded?
		return @level == 0
	end
	def file_list_loaded?
		return @level >= 1
	end
	def ready?
		return @level >= 2
	end
	# }}}
end