Comparison

plugins/mod_scansion_record.lua @ 9361:3620f7b3517b

mod_scansion_record: Split up construction of filename for reuse of parts later
author Kim Alvefur <zash@zash.se>
date Sat, 22 Sep 2018 14:28:39 +0200
parent 9360:0444e321b757
child 9362:31317e8edbbc
comparison
equal deleted inserted replaced
9360:0444e321b757 9361:3620f7b3517b
4 4
5 local full_jids = {}; 5 local full_jids = {};
6 6
7 local filters = require "util.filters"; 7 local filters = require "util.filters";
8 local id = require "util.id"; 8 local id = require "util.id";
9 local dm = require "util.datamanager";
9 10
10 local record_file = require "util.datamanager".getpath(id.medium():lower(), "scansion", os.date("%Y%b%d"):lower(), "scs", true); 11 local record_id = id.medium():lower();
12 local record_date = os.date("%Y%b%d"):lower();
13 local record_file = dm.getpath(record_id, "scansion", record_date, "scs", true);
11 14
12 local scan = io.open(record_file, "w"); 15 local scan = io.open(record_file, "w");
13 16
14 local function record(string) 17 local function record(string)
15 scan:write(string); 18 scan:write(string);