1. Nekmo
  2. Nekomuk

Commits

Nekmo  committed a5b0d58

Añadido sorted a directorios intermedios e información de columnas

  • Participants
  • Parent commits 820230a
  • Branches default

Comments (0)

Files changed (2)

File nekomuk/make_elements.py

View file
             if not path_part: path_parts.remove('')
         sub_root = (len(path_parts) + 2) * '../'
         root = etree.Element('div', {'class': 'files'})
-        for dir in ['../'] + tree.keys():
+        root.append((E.div('',
+            E.span(unicode(_('Nombre')), {'class': 'name'}),
+            E.span(unicode(_('Tamaño')), {'class': 'size'}),
+            E.span(unicode(_('Tam. predominante')), {'class': 'mean_size'}),
+        {'id': 'columns_info', 'class': 'filediv'})))
+        for dir in ['../'] + sorted(tree.keys(), key=str.lower):
             if not dir: continue
             if path and '../' != dir:
                 subfiles = files_by_dir[os.path.join(path, dir)]

File nekomuk/search.py

View file
         size_by_dir[root] = total_size
         for dir in dirs:
             files_list.append((dir, root_, {'size': 0, 'type': 'dir'}))
+    sys.stdout.write("\x08" * 80)
+    sys.stdout.flush()
     sys.stdout.write(' ' * 80)
     sys.stdout.flush()
     return sorted(files_list), files_by_dir, root_path, size_by_dir