Showing 1 changed files with 11 additions and 11 deletions
+11 -11
imapfilter/.imapfilter/config.lua
... ...
@@ -44,7 +44,7 @@ set_info = function (subject, from, pdf)
44 44
 		["colormodel"] = "Gray"               , ["colormodel_hr"] = "niveaux de gris"     ,
45 45
 		["sides"]      = "two-sided-long-edge", ["sides_hr"]      = "rect-verso bord long",
46 46
 		["papersize"]  = "a4"                 , ["papersize_hr"]  = "A4"                  ,
47
-		["inputslot"]  = "PF730A"             , ["inputslot_hr"]  = "1"                   ,
47
+		["inputslot"]  = "PF500B"             , ["inputslot_hr"]  = "1"                   ,
48 48
 		["qty"]        = string.gsub(subject, "^.*impression%s+(%d+).*$", "%1")           ,
49 49
 		["pdf"]        = pdf                                                              ,
50 50
 		["prenom"]     = authorized[from].prenom                                          ,
... ...
@@ -56,10 +56,10 @@ set_info = function (subject, from, pdf)
56 56
 		["court"]   = function () info.sides      = "two-sided-short-edge"; info.sides_hr = "recto-verso bord court"  end,
57 57
 		["long"]    = function () info.sides      = "two-sided-long-edge";  info.sides_hr = "recto-verso bord long"   end,
58 58
 		["recto"]   = function () info.sides      = "recto";                info.sides_hr = "recto"                   end,
59
-		["couleur"] = function () info.colormodel = "CYMB";                 info.colormodel_hr = "couleur"            end,
59
+		["couleur"] = function () info.colormodel = "CMYK";                 info.colormodel_hr = "couleur"            end,
60 60
 		["gris"]    = function () info.colormodel = "Gray";                 info.colormodel_hr = "niveaux de gris"    end,
61
-		["bac1"]    = function () info.inputslot  = "PF730A";               info.inputslot_hr  = "1"                  end,
62
-		["bac2"]    = function () info.inputslot  = "PF730B";               info.inputslot_hr  = "2"                  end,
61
+		["bac1"]    = function () info.inputslot  = "PF500B";               info.inputslot_hr  = "1"                  end,
62
+		["bac2"]    = function () info.inputslot  = "PF500A";               info.inputslot_hr  = "2"                  end,
63 63
 		["a4"]      = function () info.papersize  = "a4";                   info.papersize_hr  = "A4"                 end,
64 64
 		["a3"]      = function () info.papersize  = "a3";                   info.papersize_hr  = "A3"                 end,
65 65
 		["massicot"]= function () info.mode       = "massicot"                                                        end, 
... ...
@@ -84,8 +84,8 @@ set_info = function (subject, from, pdf)
84 84
 		info.sides_hr     = "recto-verso bord court"
85 85
 	end
86 86
 	if (info.papersize == "a3") then
87
-		info.inputslot    = "PF730D"
88
-		info.inputslot_hr = "4"
87
+		info.inputslot    = "PF500A"
88
+		info.inputslot_hr = "2"
89 89
 	end
90 90
 	return info
91 91
 end
... ...
@@ -121,11 +121,10 @@ inform_user = function (info)
121 121
 		   .. ")'")
122 122
 end
123 123
 
124
-set_prints = function (a)
125
-	local recent = a.inbox:is_unseen()
124
+set_prints = function (r)
126 125
 	local results = Set {}
127
-	results = recent:match_from(authorized_mails())
128
-	        * recent:match_subject("(?i)^impression\\s+\\d")
126
+	results = r:match_from(authorized_mails())
127
+	        * r:match_subject("(?i)^impression\\s+\\d")
129 128
 	for _, mesg in ipairs(results) do 
130 129
 		mbox, uid = table.unpack(mesg)
131 130
 		structure = mbox[uid]:fetch_structure()
... ...
@@ -148,7 +147,8 @@ end
148 147
 
149 148
 date = os.date('%j')
150 149
 while true do
151
-	set_prints(account1)
150
+	recent = account1.inbox:is_unseen()
151
+	set_prints(recent)
152 152
 	local date_ = os.date('%j')
153 153
 	if date ~= date_ then
154 154
 		delete_oldest(account1)