Update notes
This commit is contained in:
parent
4f7980256d
commit
e928f85490
61
command.moon
61
command.moon
@ -6,37 +6,6 @@
|
||||
-- print result
|
||||
-- handle\close!
|
||||
|
||||
-- os.execute "pandoc"
|
||||
|
||||
-- txt = "# hello"
|
||||
-- md = "<<EOF\n#{txt}\nEOF"
|
||||
-- handle = io.popen "pandoc #{md}", "r"
|
||||
-- result = handle\read("*a")
|
||||
-- handle\close!
|
||||
|
||||
n = os.tmpname!
|
||||
handle = io.popen "pandoc > " .. n, "w"
|
||||
handle\write "# hello"
|
||||
handle\close!
|
||||
|
||||
f = io.open n, "r"
|
||||
result = f\read("*a")
|
||||
f\close!
|
||||
-- output = io.input(handle)\read("*a")
|
||||
-- handle\write "# hello"
|
||||
-- handle\write "EOF"
|
||||
|
||||
-- result = handle\read "*a"
|
||||
-- handle\close!
|
||||
|
||||
|
||||
|
||||
-- handle\flush!
|
||||
print result
|
||||
-- result\close!
|
||||
|
||||
-- require("moon").p handle
|
||||
|
||||
-- =========================================================================
|
||||
-- how changing the config in the Site class works
|
||||
-- =========================================================================
|
||||
@ -50,8 +19,6 @@ print result
|
||||
-- { v } = n.config
|
||||
-- print v
|
||||
|
||||
|
||||
|
||||
-- =========================================================================
|
||||
-- markdown link pseudo-protocols
|
||||
-- =========================================================================
|
||||
@ -72,3 +39,31 @@ print result
|
||||
-- [postoffice][caps]
|
||||
--
|
||||
-- [caps]: class:caps 'ALL UPPER CASE, ALL THE TIME'
|
||||
|
||||
-- md = require "sitegen.renderers.markdown"
|
||||
-- require("moon").p md
|
||||
|
||||
-- file = "docs/2023-08-03-recursively-list-all-files-in-a-directory-with-elixir.md"
|
||||
--
|
||||
-- Path = require "sitegen.path"
|
||||
-- result = Path.join("/two", "one")
|
||||
--
|
||||
-- require("moon").p result
|
||||
|
||||
-- some_instance_method = (...) => @@ ...
|
||||
--
|
||||
-- blah = => @@var1
|
||||
--
|
||||
-- class Blah
|
||||
-- @var1: "var1"
|
||||
-- @var2 = "var2"
|
||||
-- var3: "var3"
|
||||
-- var4 = "var4"
|
||||
--
|
||||
-- meth1: =>
|
||||
-- -- @var1
|
||||
-- blah!
|
||||
--
|
||||
-- b = Blah!
|
||||
-- -- require("moon").p Blah.meth1!
|
||||
-- require("moon").p b\meth1!
|
||||
|
Loading…
x
Reference in New Issue
Block a user