RubyGems Navigation menu

devver-germinate 1.2.0

Germinate is a tool for writing about code. With Germinate, the source code IS the article. For example, given the following source code: # #!/usr/bin/env ruby # :BRACKET_CODE: <pre>, </pre> # :PROCESS: ruby, "ruby %f" # :SAMPLE: hello def hello(who) puts "Hello, #{who}" end hello("World") # :TEXT: # Check out my amazing program! Here's the hello method: # :INSERT: @hello:/def/../end/ # And here's the output: # :INSERT: @hello|ruby When we run the <tt>germ format</tt> command the following output is generated: Check out my amazing program! Here's the hello method: <pre> def hello(who) puts "Hello, #{who}" end </pre> And here's the output: <pre> Hello, World </pre> To get a better idea of how this works, please take a look at link:examples/basic.rb, or run: germ generate > basic.rb To generate an example article to play with. Germinate is particularly useful for writing articles, such as blog posts, which contain code excerpts. Instead of forcing you to keep a source code file and an article document in sync throughout the editing process, the Germinate motto is "The source code IS the article". Specially marked comment sections in your code file become the article text. Wherever you need to reference the source code in the article, use insertion directives to tell Germinate what parts of the code to excerpt. An advanced selector syntax enables you to be very specific about which lines of code you want to insert. If you also want to show the output of your code, Germinate has you covered. Special "process" directives enable you to define arbitrary commands which can be run on your code. The output of the command then becomes the excerpt text. You can define an arbitrary number of processes and have different excerpts showing the same code as processed by different commands. You can even string processes together into pipelines. Development of Germinate is graciously sponsored by Devver, purveyor of fine cloud-based services to busy Ruby developers. If you like this tool please check them out at http://devver.net.

Gemfile:
= 複製 已複製

安裝:
=

版本列表:

  1. 1.2.0 - August 11, 2014 (52.0 KB)
  2. 1.1.0 - August 11, 2014 (42.0 KB)
  3. 1.0.1 - August 11, 2014 (39.5 KB)
  4. 1.0.0 - August 11, 2014 (39.5 KB)

Runtime 相依性套件 (6):

alter-ego ~> 1.0.0
arrayfields ~> 4.7.3
fattr ~> 1.0.3
ick ~> 0.3.0
main ~> 2.8.3
orderedhash ~> 0.0.6

Development 相依性套件 (1):

bones >= 2.5.1

作者:

  • Avdi Grimm

SHA 256 checksum:

e7ce9e56a0fb42eb6b828fcd103a2cdd16ecf648989f167c06086f1be21348d1

總下載次數 11,433

這個版本 3,513

License:

Ruby 版本需求: >= 0

相關連結: