Alexandre Macabies avatar Alexandre Macabies committed fc4e91d

fixed shorten misuse; increment build version

Comments (0)

Files changed (3)

     - gett_uploader.py                 9.17 KB  http://ge.tt/8ExGXpA/v/3  remote
     - gett.py                          7.36 KB  http://ge.tt/8ExGXpA/v/2  remote
     - README.md                        2.02 KB  http://ge.tt/8ExGXpA/v/5  remote
-    - MANIFEST.in                     13.00 B   http://ge.tt/8ExGXpA/v/4  remote
-    - setup.py                       539.00 B   http://ge.tt/8ExGXpA/v/6  remote
+    - MANIFEST.in                     13.00  B  http://ge.tt/8ExGXpA/v/4  remote
+    - setup.py                       539.00  B  http://ge.tt/8ExGXpA/v/6  remote
 
     COPYING         (1/7) [##################################################] 100 %
     distribute...py (2/7) [##################################################] 100 %
 
 You then need to install gett-cli (this will provide the `gett` command):
 
-- on Windows, use this [MSI Installer](https://bitbucket.org/mickael9/gett-cli/downloads/gett-cli-0.2.1.win32.msi)
+- on Windows, use this [MSI Installer](https://bitbucket.org/mickael9/gett-cli/downloads/gett-cli-0.2.2.win32.msi)
 - on other systems, you can simply use `pip` if you have it:
   `$ pip install gett-cli`
-  alternatively, you can download the [source tarball](https://bitbucket.org/mickael9/gett-cli/get/v0.2.1.tar.bz2)
+  alternatively, you can download the [source tarball](https://bitbucket.org/mickael9/gett-cli/get/v0.2.2.tar.bz2)
   and run
   `$ python3 setup.py install` (you might need to substitute `python3` to `python`
    if python3 is the default interpreter)
             print('Found %d share(s):' % len(found_in_shares))
 
             for share in found_in_shares:
-                print(' - %s  %s%s' % (share.url.ljust(max_url), ' '*(maximax-max_url), shorten(share.title or '', 75 - max_url)))
+                print(' - %s  %s%s' % (
+                    share.url.ljust(max_url),
+                    ' ' * (maximax - max_url),
+                    (share.title or '')[:75 - max_url]
+                ))
         else:
             print('Nothing found in shares.')
 
             print('Found %d file(s):' % sum(map(len, found_in_files.values())))
 
             for share, files in found_in_files.items():
-                print(' - Share %s  %s%s' % (share.url.ljust(max_url_shares), ' '*(maximax-max_url_shares-6), shorten(share.title or '', 69 - max_url_shares)))
+                print(' - Share %s  %s%s' % (
+                    share.url.ljust(max_url_shares),
+                    ' ' * (maximax - max_url_shares - 6),
+                    (share.title or '')[:69 - max_url_shares]
+                ))
 
                 for file in files:
-                    print('    - %s  %s%s' % (file.url.ljust(max_url_files), ' '*(maximax-max_url_files-6), shorten(file.name, 72 - max_url_files)))
+                    print('    - %s  %s%s' % (
+                        file.url.ljust(max_url_files),
+                        ' ' * (maximax - max_url_files - 6),
+                        shorten(file.name, 72 - max_url_files)
+                    ))
         else:
             print('Nothing found in files.')
 
 from setuptools import setup, find_packages
 
 setup(name='gett-cli',
-      version='0.2.1',
+      version='0.2.2',
       description='A command-line Ge.tt uploader and manager',
       author='Mickaël THOMAS',
       author_email='mickael9@gmail.com',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.