summary refs log tree commit diff stats
path: root/doc/rifle.1
Commit message (Expand)AuthorAgeFilesLines
* ranger in danger because of some stranger v1.8.1hut2017-01-081-1/+1
* git commit -m 'git commit -m git\ commit\ -m\ '\''Happy\ Holidays\!'\' v1.8.0hut2016-12-241-1/+1
* manpage: rebuildhut2016-09-031-14/+10
* rebuild man pageshut2016-02-241-1/+1
* Fixed that rare bug with the fireballs and explosions v1.7.2hut2015-10-041-2/+2
* Initial commit v1.7.1hut2015-05-041-1/+1
* Should I dual ranger/cleric or wait for the THAC0 bonus? v1.7.0hut2015-04-141-1/+1
* ranger.1: added documentation for %rangerdir and %space macroshut2015-04-101-1/+1
* container.directory: implemented random sortinghut2014-08-261-1/+1
* fix references to README.mdhut2014-08-221-2/+2
* Add setting "automatically_count_files"hut2014-04-111-1/+1
* rebuilt man pages with new pod2man versionhut2013-06-211-11/+20
* RANGER! RANGER! HIGH VOLTAGE! v1.6.1hut2013-05-241-1/+1
* rifle: added --version optionhut2013-03-011-1/+1
* doc/rifle.1: added whitespace at exampleshut2013-02-181-9/+21
* doc/rifle.1: Added man page for riflehut2013-02-181-0/+211
title='author hut <hut@lavabit.com> 2012-08-02 03:51:00 +0200 committer hut <hut@lavabit.com> 2012-08-02 03:52:28 +0200 renamed ranger/defaults to ranger/config' href='/akspecs/ranger/commit/doc/HACKING?h=v1.8.1&id=176e8a684cb490393f84e7fdccc6aafda559364b'>176e8a68 ^
f8f6f7f9 ^
7bf5f967 ^
f8f6f7f9 ^




f8f6f7f9 ^

29028631 ^

176e8a68 ^
3ee05c16 ^

f8f6f7f9 ^
f8f6f7f9 ^
176e8a68 ^
f8f6f7f9 ^





f8f6f7f9 ^




7bf5f967 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78











                                                                          
                                                   






                                                                  
                      

                                                                       
                                                            

 




                                               




                                   
                

 



                                                       
                          


                              
                           
                                             
                                    




                                                            

                                                                      

                                                                              
                                                                    

                            
 
                                                   
                        





                                                                      




                 

                                                                              
Guidelines on Code Modification
===============================

Coding Style
------------

* Use syntax compatible to both python 2.6 and 3.1.
* Use docstrings with pydoc in mind
* Follow the style guide for python code:
    http://www.python.org/dev/peps/pep-0008/
* Although this guide suggests otherwise, tabs are used for indentation
    of code and docstrings.  In other documents (readme, etc), use spaces.
* Test the code with "doctest" where it makes sense


Patches
-------

Send patches, created with "git format-patch", to the email adress

    romanz@lavabit.com

If you plan to do major changes, or many changes over time, I encourage
you to create a fork on GitHub, Gitorious or any other site.


Starting Points
---------------

Good places to read about ranger internals are:
ranger/core/actions.py
ranger/fsobject/fsobject.py

About the UI:
ranger/gui/widgets/browsercolumn.py
ranger/gui/widgets/browserview.py
ranger/gui/ui.py


Common Changes
--------------

* Change which files are previewed in the auto preview:
In ranger/fsobject/file.py
the constant PREVIEW_BLACKLIST

* Adding options:
In ranger/config/options.py
add the default value, like: my_option = True
In ranger/container/settingobject.py
add the name of your option to the constant ALLOWED_SETTINGS

The setting is now accessible at self.settings.my_option,
assuming <self> is a "SettingsAware" object.

* Adding colorschemes:
Copy ranger/colorschemes/default.py to ranger/colorschemes/myscheme.py
and modify it according to your needs.  Alternatively, mimic the jungle
colorscheme.  It subclasses the default scheme and just modifies a few things.
In ranger/config/options.py (or ~/.config/ranger/options.py), change
    colorscheme = 'default'
to: colorscheme = 'myscheme'

* Change the file type => application associations:
In ranger/config/apps.py
modify the method app_default.
The variable "f" is a filesystem-object with attributes like mimetype,
extension, etc.  For a full list, check ranger/fsobject/fsobject.py

* Change the file extension => mime type associations:
Modify ranger/data/mime.types


Version Numbering
-----------------

Three numbers;  The first changes on a rewrite, the second changes when major
configuration incompatibilities occur and the third changes with each release.