edit txt files. keyboard shortcut for share tools

This commit is contained in:
ville rantanen
2018-07-20 21:29:11 +03:00
parent b53418b53f
commit 7d123db05f
7 changed files with 158 additions and 5 deletions

View File

@@ -36,7 +36,8 @@ def file_stat(path, filename):
'size': file_size_MB(s.st_size),
'mtime': file_date_human(s.st_mtime),
'name': filename,
'url': path2url(filename)
'url': path2url(filename),
'editable': (s.st_size < 10240 and filename.endswith(".txt"))
}