Commit graph

86 commits

Author SHA1 Message Date
Kenzie Togami
3f83f43df4 Correct widths for most Ambiguous Width characters 2015-12-19 23:19:25 -08:00
Jiachen Yang
18a18ca22b add fullwidth CJK chars 2015-04-13 01:42:33 +09:00
Jiachen Yang
02c3a69cf1 try to fix cjk char width 2015-04-13 01:05:57 +09:00
Mattias Andrée
93f481c8a3 spellocorrector: I think I've missed a port to make this funkyness work properly so lets downgrade the optimisation a bit 2014-10-08 04:30:01 +02:00
Michael Schwarz
8861e0bb0e lists.onelist(): Instead of passing multiple, possibly empty lists, build the list of directories to search before calling the method. 2014-08-30 12:44:29 +02:00
Michael Schwarz
5125dd6400 Fixed TypeError when running ponysay --altlist.
Traceback (most recent call last):
	  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
		 "__main__", mod_spec)
	  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
		 exec(code, run_globals)
	  File "./venv/bin/ponysay/__main__.py", line 154, in <module>
	  File "./venv/bin/ponysay/ponysay.py", line 252, in run
	  File "./venv/bin/ponysay/ponysay.py", line 753, in linklist
	  File "./venv/bin/ponysay/lists.py", line 143, in linklist
	  File "./venv/bin/ponysay/lists.py", line 104, in _get_file_list
	TypeError: listdir: illegal type for path parameter

This bug was introduced in this commit:

	list.py: Extracted duplicate code for listing files in a directory into a utility function.
2014-08-30 12:44:28 +02:00
Michael Schwarz
cc9a4f4324 Fixed TypeError when running ponysay --onelist.
Traceback (most recent call last):
	  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 170, in _run_module_as_main
		 "__main__", mod_spec)
	  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/runpy.py", line 85, in _run_code
		 exec(code, run_globals)
	  File "venv/bin/ponysay/__main__.py", line 154, in <module>
	  File "venv/bin/ponysay/ponysay.py", line 248, in run
	  File "venv/bin/ponysay/ponysay.py", line 765, in onelist
	  File "venv/bin/ponysay/lists.py", line 210, in onelist
	  File "venv/bin/ponysay/lists.py", line 210, in <listcomp>
	  File "venv/bin/ponysay/lists.py", line 104, in _get_file_list
	TypeError: listdir: illegal type for path parameter

This bug was introduced in this commit:

	list.py: Extracted duplicate code for listing files in a directory into a utility function.

I fixed the problem by removing the requirement for lists.onelist() to accept None for directory lists that should not be searched.
2014-08-30 12:44:09 +02:00
Michael Schwarz
d57060a675 lists.py: Rewritten list formatting code.
- Split up into functions for distributing the items into columns and actual formatting and printing of the columns.
- Fixes printing when console is narrower than the longest name.
2014-08-29 21:35:58 +02:00
Michael Schwarz
c71a8a0a67 list.py: Extracted duplicate code for listing files in a directory into a utility function. 2014-08-29 21:35:58 +02:00
Michael Schwarz
63b852068d list.py: Removed unnecessary calls to gettermsize(). 2014-08-29 21:35:58 +02:00
Michael Schwarz
7767a7d9c1 list.py: Renamed list module to lists to avoid conflict with builtin. 2014-08-29 21:30:42 +02:00
Michael Schwarz
69461d20fc list.py: Moved static functions to module level. 2014-08-29 21:30:34 +02:00
Michael Schwarz
5e87dadc02 list.py: Removed unused import. 2014-08-29 21:27:50 +02:00
Michael Schwarz
b2e597fdc2 ponysay.py: Converted methods which are never called on an instances to class methods. 2014-08-26 23:35:31 +02:00
Michael Schwarz
45b53d6eb0 argument parsing: Fixed code path for parsing --colour-pony accessing an undefined variable. 2014-08-24 18:34:29 +02:00
Pablo Lezaeta
5239a3c9f5 Fix permision for executables... I think we need aome tool for those cases like this
Signed-off-by: Pablo Lezaeta <prflr88@gmail.com>
2014-06-10 01:52:12 -04:00
Pablo Lezaeta
4315e59386 Stupid permission and stupid btrfs snapshots
Signed-off-by: Pablo Lezaeta <prflr88@gmail.com>
2014-06-10 01:35:58 -04:00
Mattias Andrée
cfb41b52c9 update copyright year
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-02-03 20:39:18 +01:00
Mattias Andrée
2591ae905c search ./ for pony files etc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-02-03 19:34:17 +01:00
Mattias Andrée
38942cc2f0 m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-12-17 18:01:22 +01:00
Mattias Andrée
beb6fab662 change default wrapping column to 65 from 60 (was 40 in the last release), as discussed in issue 172
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-10-31 07:30:39 +01:00
Mattias Andrée
d3316e31b6 fix kms bug
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-19 13:00:32 +02:00
Mattias Andrée
82e3dc3cf5 fix issue 117
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 08:29:25 +02:00
Mattias Andrée
6adc6586c1 whether to use colours in ArgParser.help
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 08:18:49 +02:00
Mattias Andrée
718d769d0c prepare for --help-colour
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 08:12:05 +02:00
Mattias Andrée
f47199bc74 split out logic for get selected ponies
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 07:54:57 +02:00
Mattias Andrée
acc543cfe0 add documentation
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 07:35:04 +02:00
Mattias Andrée
f763d3dae6 split out logic for getting link and balloon colour as well as the hyphen style
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 07:31:45 +02:00
Mattias Andrée
fd6863c37a split out logic for height truncation and printing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 07:23:17 +02:00
Mattias Andrée
42cfdfd22e split out logic for the getting the wrapping column
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 07:16:31 +02:00
Mattias Andrée
7586505f2b split out logic for the getting the truncation column
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 07:10:30 +02:00
Mattias Andrée
857eb42aa6 it really should not have been is here, that would not make since
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 06:38:52 +02:00
Mattias Andrée
0d73716fce split out logic for the message
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 06:35:43 +02:00
Mattias Andrée
2b0cea8e0c m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 06:26:47 +02:00
Mattias Andrée
5e15110754 split out logic for compressing message
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 06:18:18 +02:00
Mattias Andrée
3bee0c375e split out logic for converting png files
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 06:13:58 +02:00
Mattias Andrée
5317fcddac m fix
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 03:37:44 +02:00
Mattias Andrée
91e62b4a60 split out the logic for randomly selecting a pony when none is selected
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 03:18:02 +02:00
Mattias Andrée
4ebc80ff5c split out the pony restriction logic
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 03:01:11 +02:00
Mattias Andrée
15eed0bb57 split out logical for getting available ponies
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-17 02:32:59 +02:00
Mattias Andrée
d234ee6c6c fix -f, +f, -F issue
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-13 01:09:52 +02:00
Mattias Andrée
27e1be4861 misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 10:38:17 +02:00
Mattias Andrée
f3d68c5a2b m + those colons should not have been there
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 10:04:24 +02:00
Mattias Andrée
90028ec636 misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 09:53:01 +02:00
Mattias Andrée
f44a77924d KMS.{usingkms => usingKMS} + split up KMS class into more functions
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 08:29:35 +02:00
Mattias Andrée
7b5af293a6 Metadata.{getfitting ==> getFitting}
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 07:57:07 +02:00
Mattias Andrée
ecdac1b6a1 move documentation to be below the declaration and not above, this makes it parsable by python's help command, althought it is not as pretty, but hay, help() is awesome
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 07:54:31 +02:00
Mattias Andrée
a18804002b doc balloon.py
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 07:29:09 +02:00
Mattias Andrée
696884ced4 Balloon.{fromfile ==> fromFile}
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 07:21:44 +02:00
Mattias Andrée
011c31dd93 typo
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2013-08-12 07:19:32 +02:00