summary refs log tree commit diff stats
path: root/TODO
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-05 03:00:46 +0100
committerhut <hut@lavabit.com>2010-01-05 03:00:46 +0100
commit4b826595915c221f12a4ebe187e990cc7a08f7f2 (patch)
treecfbe8cffd9add84c915df53bc9ec5355e558bab2 /TODO
parent7e3e8d14402833295ab83ff1591ecbe46867518b (diff)
downloadranger-4b826595915c221f12a4ebe187e990cc7a08f7f2.tar.gz
help: implemented help framework, started writing
Diffstat (limited to 'TODO')
-rw-r--r--TODO4
1 files changed, 3 insertions, 1 deletions
diff --git a/TODO b/TODO
index 9115fc90..b3475548 100644
--- a/TODO
+++ b/TODO
@@ -20,7 +20,8 @@ General
    (X) #14  09/12/29  make filelists inherit from pagers
    (X) #15  09/12/29  better way of running processes!!~
    (X) #16  10/01/01  list of bookmarks
-   ( ) #21  10/01/01  write help!
+   (X) #21  10/01/01  write help!
+   ( ) #22  10/01/03  add getopt options to change flags/mode
 
 
 Bugs
@@ -28,6 +29,7 @@ Bugs
    (X) #17  10/01/01  why do bookmarks disappear sometimes?
    (X) #18  10/01/01  fix notify widget (by adding a LogView?)
    (X) #19  10/01/01  resizing after pressing g
+   ( ) #23  10/01/04  stop dir loading with ^C -> wont load anymore
 
 
 Ideas
* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import os.path
import sys
rangerpath = os.path.join(os.path.dirname(__file__), '..')
if sys.path[1] != rangerpath:
	sys.path[1:1] = [rangerpath]

from ranger.ext.human_readable import *

# The version before 2010/06/24:
import math
UNITS = 'BKMGTP'
MAX_EXPONENT = len(UNITS) - 1
def human_readable_old(byte, seperator=' '):
	if not byte:
		return '0'

	exponent = int(math.log(byte, 2) / 10)
	flt = round(float(byte) / (1 << (10 * exponent)), 2)

	if exponent > MAX_EXPONENT:
		return '>9000' # off scale

	if int(flt) == flt:
		return '%.0f%s%s' % (flt, seperator, UNITS[exponent])

	else:
		return '%.2f%s%s' % (flt, seperator, UNITS[exponent])

class benchmark_human_readable(object):
	def bm_current(self, n):
		for i in range(n):
			human_readable((128 * i) % 2**50)

	def bm_old(self, n):
		for i in range(n):
			human_readable_old((128 * i) % 2**50)