update Docify

This commit is contained in:
lxsang 2020-12-05 16:49:29 +00:00
parent 6eb9400e69
commit d4af424168
9 changed files with 16 additions and 4 deletions

View File

@ -2,4 +2,5 @@
Simple PDF document manager Simple PDF document manager
## Change logs ## Change logs
- v0.0.4-a: Display file size in entry meta-data
- v0.0.3-a: Fix document moved bug, sort entries by year, month, day - v0.0.3-a: Fix document moved bug, sort entries by year, month, day

View File

@ -259,6 +259,10 @@ handle.get_doc = function(id)
return error("Unable to select data from "..param.table) return error("Unable to select data from "..param.table)
else else
r = r[1] r = r[1]
local ret, meta = vfs.fileinfo(r.file)
if ret then
r.fileinfo = meta
end
local o = sqlite.select(db, "owners", "*", "id = "..r.oid) local o = sqlite.select(db, "owners", "*", "id = "..r.oid)
sqlite.dbclose(db) sqlite.dbclose(db)
if o == nil or #o == 0 then if o == nil or #o == 0 then

View File

@ -2,4 +2,5 @@
Simple PDF document manager Simple PDF document manager
## Change logs ## Change logs
- v0.0.4-a: Display file size in entry meta-data
- v0.0.3-a: Fix document moved bug, sort entries by year, month, day - v0.0.3-a: Fix document moved bug, sort entries by year, month, day

View File

@ -259,6 +259,10 @@ handle.get_doc = function(id)
return error("Unable to select data from "..param.table) return error("Unable to select data from "..param.table)
else else
r = r[1] r = r[1]
local ret, meta = vfs.fileinfo(r.file)
if ret then
r.fileinfo = meta
end
local o = sqlite.select(db, "owners", "*", "id = "..r.oid) local o = sqlite.select(db, "owners", "*", "id = "..r.oid)
sqlite.dbclose(db) sqlite.dbclose(db)
if o == nil or #o == 0 then if o == nil or #o == 0 then

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"author": "", "author": "",
"email": "" "email": ""
}, },
"version":"0.0.3-a", "version":"0.0.4-a",
"category":"Other", "category":"Other",
"iconclass":"fa fa-adn", "iconclass":"fa fa-adn",
"mimes":["none"], "mimes":["none"],

Binary file not shown.

View File

@ -82,6 +82,7 @@ class Docify extends this.OS.application.BaseApplication
return @error d.error if d.error return @error d.error if d.error
@preview d.result.file, @docpreview @preview d.result.file, @docpreview
rows = [] rows = []
d.result.size = (d.result.fileinfo.size / 1024.0).toFixed(2) + " Kb" if d.result.fileinfo
map = { map = {
ctime: "Created on", ctime: "Created on",
mtime: "Modified on", mtime: "Modified on",
@ -90,7 +91,8 @@ class Docify extends this.OS.application.BaseApplication
name: "Title", name: "Title",
owner: "Owner", owner: "Owner",
edate: "Effective date", edate: "Effective date",
file: "File" file: "File",
size: "Size"
} }
d.result.edate = "#{d.result.day}/#{d.result.month}/#{d.result.year}" d.result.edate = "#{d.result.day}/#{d.result.month}/#{d.result.year}"
for key, value of d.result for key, value of d.result

View File

@ -7,7 +7,7 @@
"author": "", "author": "",
"email": "" "email": ""
}, },
"version":"0.0.3-a", "version":"0.0.4-a",
"category":"Other", "category":"Other",
"iconclass":"fa fa-adn", "iconclass":"fa fa-adn",
"mimes":["none"], "mimes":["none"],