about summary refs log tree commit diff stats
path: root/.travis.yml
blob: f9e31256872836d97976cef8db96e5c650c09963 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
dist: 'trusty'

language: 'python'
python:
    - '2.7'
    - '3.4'
    - '3.5'

install:
    - 'pip install pytest pylint flake8'

script:
    - 'make test'
2' href='#n12'>12 13 14
15
16
17
18
19
20
21
22
23
24






                                                                          
                                                                  
 
             
 


                                             
 


                               
 

                                                          
 
                                         
                                 
# Compatible since ranger 1.7.0
#
# This sample plugin adds a new linemode displaying the filename in rot13.
# Load this plugin by copying it to ~/.config/ranger/plugins/ and activate
# the linemode by typing ":linemode rot13" in ranger.  Type Mf to restore
# the default linemode.

from __future__ import (absolute_import, division, print_function)

import codecs

import ranger.api
from ranger.core.linemode import LinemodeBase


@ranger.api.register_linemode
class MyLinemode(LinemodeBase):
    name = "rot13"

    def filetitle(self, fobj, metadata):
        return codecs.encode(fobj.relative_path, "rot_13")

    def infostring(self, fobj, metadata):
        raise NotImplementedError