mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Redo newsletter template using tables
This commit is contained in:
parent
e1035a49fd
commit
3f7edc3635
6 changed files with 780 additions and 620 deletions
|
@ -20,6 +20,7 @@ import geoip2.database, geoip2.errors
|
|||
import gzip
|
||||
import hashlib
|
||||
import imghdr
|
||||
from itertools import izip_longest
|
||||
import ipwhois, ipwhois.exceptions, ipwhois.utils
|
||||
from IPy import IP
|
||||
import json
|
||||
|
@ -974,3 +975,10 @@ def momentjs_to_arrow(format, duration=False):
|
|||
for f in invalid_formats:
|
||||
format = format.replace(f, '')
|
||||
return format
|
||||
|
||||
|
||||
def grouper(iterable, n, fillvalue=None):
|
||||
"Collect data into fixed-length chunks or blocks"
|
||||
# grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx
|
||||
args = [iter(iterable)] * n
|
||||
return izip_longest(fillvalue=fillvalue, *args)
|
Loading…
Add table
Add a link
Reference in a new issue