examples/config.rb in rivendell-import-0.6 vs examples/config.rb in rivendell-import-0.7

- old
+ new

@@ -10,26 +10,36 @@ Mail.defaults do delivery_method :smtp, { :address => "smtp.free.fr" } end +# Rivendell::API::Xport.debug_output $stdout + Rivendell::Import::Notifier::Mail.from = "root@tryphon.eu" Rivendell::Import.config do |config| config.rivendell.host = "localhost" config.rivendell.login_name = "user" config.rivendell.password = "" + config.rivendell.db_url = 'mysql://rduser:letmein@localhost/Rivendell' + config.to_prepare do |file| cart.default_title = file.basename file.in("music") do cart.group = "MUSIC" end file.in("pad") do + name = file.basename + if name.match /-lundi$/ + cart.cut.days = %w{mon} + name.gsub! /-lundi$/, "" + end + cart.clear_cuts! - cart.find_by_title file.basename + cart.find_by_title name end cart.group ||= "TEST" # To delete file when task is completed