rename to conveyer
This commit is contained in:
parent
45db2ba40f
commit
551ca08296
|
@ -2,6 +2,6 @@ History.txt
|
|||
Manifest.txt
|
||||
README.txt
|
||||
Rakefile
|
||||
bin/autoblog
|
||||
lib/autoblog.rb
|
||||
test/test_autoblog.rb
|
||||
bin/conveyer
|
||||
lib/conveyer.rb
|
||||
test/test_conveyer.rb
|
|
@ -1,10 +1,10 @@
|
|||
h1. AutoBlog
|
||||
h1. Conveyer
|
||||
|
||||
Blog like a developer.
|
||||
|
||||
h2. Example Proto-Site
|
||||
|
||||
My own personal site/blog is generated with autoblog.
|
||||
My own personal site/blog is generated with Conveyer.
|
||||
|
||||
The proto-site repo ("http://github.com/mojombo/tpw":http://github.com/mojombo/tpw)
|
||||
is converted into the actual site ("http://tom.preston-werner.com/":http://tom.preston-werner.com)
|
||||
|
@ -14,9 +14,9 @@ h2. Install and Run
|
|||
This is beta software. You will need to download the source
|
||||
and run the software from there.
|
||||
|
||||
$ git clone git://github.com/mojombo/autoblog
|
||||
$ cd autoblog
|
||||
$ bin/autoblog /path/to/proto/site /path/to/generated/site
|
||||
$ git clone git://github.com/mojombo/conveyer
|
||||
$ cd conveyer
|
||||
$ bin/conveyer /path/to/proto/site /path/to/generated/site
|
||||
|
||||
h2. License
|
||||
|
||||
|
|
6
Rakefile
6
Rakefile
|
@ -1,12 +1,12 @@
|
|||
require 'rubygems'
|
||||
require 'hoe'
|
||||
|
||||
# Hoe.new('autoblog', Autoblog::VERSION) do |p|
|
||||
# # p.rubyforge_name = 'autoblogx' # if different than lowercase project name
|
||||
# Hoe.new('conveyer', Conveyer::VERSION) do |p|
|
||||
# # p.rubyforge_name = 'conveyerx' # if different than lowercase project name
|
||||
# # p.developer('FIX', 'FIX@example.com')
|
||||
# end
|
||||
|
||||
desc "Open an irb session preloaded with this library"
|
||||
task :console do
|
||||
sh "irb -rubygems -r ./lib/autoblog.rb"
|
||||
sh "irb -rubygems -r ./lib/conveyer.rb"
|
||||
end
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
||||
|
||||
require 'autoblog'
|
||||
require 'conveyer'
|
||||
|
||||
AutoBlog.process(ARGV[0], ARGV[1])
|
||||
Conveyer.process(ARGV[0], ARGV[1])
|
|
@ -14,17 +14,17 @@ require 'liquid'
|
|||
require 'redcloth'
|
||||
|
||||
# internal requires
|
||||
require 'autoblog/site'
|
||||
require 'autoblog/convertible'
|
||||
require 'autoblog/layout'
|
||||
require 'autoblog/page'
|
||||
require 'autoblog/post'
|
||||
require 'autoblog/filters'
|
||||
require 'conveyer/site'
|
||||
require 'conveyer/convertible'
|
||||
require 'conveyer/layout'
|
||||
require 'conveyer/page'
|
||||
require 'conveyer/post'
|
||||
require 'conveyer/filters'
|
||||
|
||||
module AutoBlog
|
||||
module Conveyer
|
||||
VERSION = '0.1.0'
|
||||
|
||||
def self.process(source, dest)
|
||||
AutoBlog::Site.new(source, dest).process
|
||||
Conveyer::Site.new(source, dest).process
|
||||
end
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
module AutoBlog
|
||||
module Conveyer
|
||||
module Convertible
|
||||
# Read the YAML frontmatter
|
||||
# +base+ is the String path to the dir containing the file
|
||||
|
@ -35,7 +35,7 @@ module AutoBlog
|
|||
payload = payload.merge(site_payload)
|
||||
|
||||
# render content
|
||||
self.content = Liquid::Template.parse(self.content).render(payload, [AutoBlog::Filters])
|
||||
self.content = Liquid::Template.parse(self.content).render(payload, [Conveyer::Filters])
|
||||
|
||||
# output keeps track of what will finally be written
|
||||
self.output = self.content
|
||||
|
@ -44,7 +44,7 @@ module AutoBlog
|
|||
layout = layouts[self.data["layout"]]
|
||||
while layout
|
||||
payload = payload.merge({"content" => self.output, "page" => self.data})
|
||||
self.output = Liquid::Template.parse(layout.content).render(payload, [AutoBlog::Filters])
|
||||
self.output = Liquid::Template.parse(layout.content).render(payload, [Conveyer::Filters])
|
||||
|
||||
layout = layouts[layout.data["layout"]]
|
||||
end
|
|
@ -1,4 +1,4 @@
|
|||
module AutoBlog
|
||||
module Conveyer
|
||||
|
||||
module Filters
|
||||
def date_to_string(date)
|
|
@ -1,4 +1,4 @@
|
|||
module AutoBlog
|
||||
module Conveyer
|
||||
|
||||
class Layout
|
||||
include Convertible
|
||||
|
@ -36,12 +36,12 @@ module AutoBlog
|
|||
# Returns nothing
|
||||
def add_layout(layouts, site_payload)
|
||||
payload = {"page" => self.data}.merge(site_payload)
|
||||
self.content = Liquid::Template.parse(self.content).render(payload, [AutoBlog::Filters])
|
||||
self.content = Liquid::Template.parse(self.content).render(payload, [Conveyer::Filters])
|
||||
|
||||
layout = layouts[self.data["layout"]] || self.content
|
||||
payload = {"content" => self.content, "page" => self.data}
|
||||
|
||||
self.content = Liquid::Template.parse(layout).render(payload, [AutoBlog::Filters])
|
||||
self.content = Liquid::Template.parse(layout).render(payload, [Conveyer::Filters])
|
||||
end
|
||||
end
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module AutoBlog
|
||||
module Conveyer
|
||||
|
||||
class Page
|
||||
include Convertible
|
|
@ -1,4 +1,4 @@
|
|||
module AutoBlog
|
||||
module Conveyer
|
||||
|
||||
class Post
|
||||
include Comparable
|
|
@ -1,4 +1,4 @@
|
|||
module AutoBlog
|
||||
module Conveyer
|
||||
|
||||
class Site
|
||||
attr_accessor :source, :dest
|
|
@ -1,8 +1,8 @@
|
|||
require File.join(File.dirname(__FILE__), *%w[.. lib autoblog])
|
||||
require File.join(File.dirname(__FILE__), *%w[.. lib conveyer])
|
||||
|
||||
require 'test/unit'
|
||||
|
||||
include AutoBlog
|
||||
include Conveyer
|
||||
|
||||
def dest_dir
|
||||
File.join(File.dirname(__FILE__), *%w[dest])
|
||||
|
|
Loading…
Reference in New Issue