Commits

Erik Svensson committed 78ed9f6

Updated documentation.

Comments (0)

Files changed (4)

doc/_static/style.css

     padding-left: 1em;
 }
 
+table, th, td {
+    border: none;
+}
+
+table {
+    border-spacing: 10px 2px;
+}
+
+th {
+    border-bottom: solid 1px #aaa;
+    text-align: left;
+}
+
+td {
+    border-bottom: solid 1px #eee;
+    text-align: left;
+}
+
 div.documentwrapper {
     float: right;
     width: 100%;

doc/reference/transmissionrpc.rst

     Add torrent to transfers list. Takes a base64 encoded .torrent file in
     *data*. Additional arguments are:
 
-    * `download_dir`, The directory where the downloaded contents will be
-      saved in.
-    * `files_unwanted`, A list of file index not to download.
-    * `files_wanted`, A list of file index to download.
-    * `paused`, Whether to pause or start the transfer on add.
-    * `peer_limit`, Limits the number of peers for this transfer.
-    * `priority_high`, A list of file index with high priority.
-    * `priority_low`, A list of file index with low priority.
-    * `priority_normal`, A list of file index with normal priority.
-    
-    `files_unwanted`, `files_wanted`, `priority_high`, `priority_low`
-    , `priority_normal` are new in RPC protocol version 5.
+    =================== ==== =============================================================
+    Argument            RPC  Description                                                  
+    =================== ==== =============================================================
+    ``download_dir``    1 -  The directory where the downloaded contents will be saved in.
+    ``files_unwanted``  1 -  A list of file id's that shouldn't be downloaded.            
+    ``files_wanted``    1 -  A list of file id's that should be downloaded.               
+    ``paused``          1 -  If True, does not start the transfer when added.             
+    ``peer_limit``      1 -  Maximum number of peers allowed.                             
+    ``priority_high``   1 -  A list of file id's that should have high priority.          
+    ``priority_low``    1 -  A list of file id's that should have low priority.           
+    ``priority_normal`` 1 -  A list of file id's that should have normal priority.        
+    =================== ==== =============================================================
 
 .. method:: Client.add_url(torrent_url, kwargs**)
 
     Change torrent parameters for the torrent(s) with the supplied id's. The
     parameters are:
 
-    * ``bandwidthPriority``, Priority for this transfer.
-    * ``downloadLimit``, Set the speed limit for download in Kib/s.
-    * ``downloadLimited``, Enable download speed limiter.
-    * ``files_wanted``, A list of file id's that should be downloaded.
-    * ``files_unwanted``, A list of file id's that shouldn't be downloaded.
-    * ``honorsSessionLimits``, Enables or disables the transfer to honour the
-      upload limit set in the session.
-    * ``location``, Local download location.
-    * ``peer_limit``, The peer limit for the torrents.
-    * ``priority_high``, A list of file id's that should have high priority.
-    * ``priority_normal``, A list of file id's that should have normal priority.
-    * ``priority_low``, A list of file id's that should have low priority.
-    * ``seedRatioLimit``, Seeding ratio.
-    * ``seedRatioMode``, Which ratio to use. 0 = Use session limit, 1 = Use
-      transfer limit, 2 = Disable limit.
-    * ``uploadLimit``, Set the speed limit for upload in Kib/s.
-    * ``uploadLimited``, Enable upload speed limiter.
-    
-    Following arguments where renamed in RPC protocol version 5.
-    
-    * ``speed_limit_up`` is now called ``uploadLimit`` 
-    * ``speed_limit_up_enable`` is now called ``uploadLimited``
-    * ``speed_limit_down`` is now called ``downloadLimit``
-    * ``speed_limit_down_enable`` is now called ``downloadLimited``
+    ============================ ===== =============== =====================================================================================
+    Argument                     RPC   Replaced by     Description                                                                          
+    ============================ ===== =============== =====================================================================================
+    ``bandwidthPriority``        5 -                   Priority for this transfer.                                                          
+    ``downloadLimit``            5 -                   Set the speed limit for download in Kib/s.                                           
+    ``downloadLimited``          5 -                   Enable download speed limiter.                                                       
+    ``files_unwanted``           1 -                   A list of file id's that shouldn't be downloaded.                                    
+    ``files_wanted``             1 -                   A list of file id's that should be downloaded.                                       
+    ``honorsSessionLimits``      5 -                   Enables or disables the transfer to honour the upload limit set in the session.      
+    ``ids``                      1 -                   Local download location.                                                             
+    ``peer_limit``               1 -                   The peer limit for the torrents.                                                     
+    ``priority_high``            1 -                   A list of file id's that should have high priority.                                  
+    ``priority_low``             1 -                   A list of file id's that should have normal priority.                                
+    ``priority_normal``          1 -                   A list of file id's that should have low priority.                                   
+    ``seedRatioLimit``           5 -                   Seeding ratio.                                                                       
+    ``seedRatioMode``            5 -                   Which ratio to use. 0 = Use session limit, 1 = Use transfer limit, 2 = Disable limit.
+    ``speed_limit_down``         1 - 5 downloadLimit   Set the speed limit for download in Kib/s.                                           
+    ``speed_limit_down_enabled`` 1 - 5 downloadLimited Enable download speed limiter.                                                       
+    ``speed_limit_up``           1 - 5 uploadLimit     Set the speed limit for upload in Kib/s.                                             
+    ``speed_limit_up_enabled``   1 - 5 uploadLimited   Enable upload speed limiter.                                                         
+    ``uploadLimit``              5 -                   Set the speed limit for upload in Kib/s.                                             
+    ``uploadLimited``            5 -                   Enable upload speed limiter.                                                         
+    ============================ ===== =============== =====================================================================================
     
     .. NOTE::
        transmissionrpc will try to automatically fix argument errors.
 
     Set session parameters. The parameters are:
 
-    * ``alt_speed_down``, max global download speed (in K/s).
-    * ``alt_speed_enabled``, True means use the alt speeds.
-    * ``alt_speed_time_begin``, when to turn on alt speeds (units: minutes after midnight).
-    * ``alt_speed_time_day``, what day(s) to turn on alt speeds (look at tr_sched_day).
-    * ``alt_speed_time_enabled``, True means the scheduled on/off times are used.
-    * ``alt_speed_time_end``, when to turn off alt speeds (units: same).
-    * ``alt_speed_up``, max global upload speed (in K/s).
-    * ``blocklist_enabled``, Enabled block list.
-    * ``download_dir``, Default download dir.
-    * ``dht_enabled``, Enable DHT.
-    * ``encryption``, Level of encryption. Should be one of ``required``, ``preferred`` or ``tolerated``.
-    * ``peer_limit_global``, Maximum number of peers.
-    * ``peer_limit_per_torrent``, Maximum number of peers per torrent.
-    * ``pex_enabled``, Allow pex in public torrents.
-    * ``peer_port``, Set the port number.
-    * ``peer-port-random-on-start``, Ranomize port peer port om launch.
-    * ``port_forwarding_enabled``, Enabled port forwarding.
-    * ``seedRatioLimit``, Limits how much to seed, where 1.0 is as much as you downloaded.
-    * ``seedRatioLimited``, Enables seed limiting.
-    * ``speed_limit_down``, Set the global download speed limit in Kib/s.
-    * ``speed_limit_down_enabled``, Enables the global download speed limiter.
-    * ``speed_limit_up``, Set the global upload speed limit in Kib/s.
-    * ``speed_limit_up_enabled``, Enables the global upload speed limiter.
-    
-    Following arguments where renamed in RPC protocol version 5.
-    
-    * ``peer_limit`` is now called ``peer_limit_global``
-    * ``pex_allowed`` is now called ``pex_enabled`` 
-    * ``port`` is now called ``peer_port``
+    ============================= ===== ================= ==========================================================================================================================
+    Argument                      RPC   Replaced by       Description                                                                                                               
+    ============================= ===== ================= ==========================================================================================================================
+    ``alt_speed_down``            5 -                     Alternate session download speed limit (in Kib/s).                                                                        
+    ``alt_speed_enabled``         5 -                     Enables alternate global download speed limiter.                                                                          
+    ``alt_speed_time_begin``      5 -                     Time when alternate speeds should be enabled. Minutes after midnight.                                                     
+    ``alt_speed_time_day``        5 -                     Enables alternate speeds scheduling these days.                                                                           
+    ``alt_speed_time_enabled``    5 -                     Enables alternate speeds scheduling.                                                                                      
+    ``alt_speed_time_end``        5 -                     Time when alternate speeds should be disabled. Minutes after midnight.                                                    
+    ``alt_speed_up``              5 -                     Alternate session upload speed limit (in Kib/s).                                                                          
+    ``blocklist_enabled``         5 -                     Enables the block list                                                                                                    
+    ``dht_enabled``               6 -                     Enables DHT.                                                                                                              
+    ``download_dir``              1 -                     Set the session download directory.                                                                                       
+    ``encryption``                1 -                     Set the session encryption mode, one of ``required``, ``preferred`` or ``tolerated``.                                     
+    ``incomplete_dir``            7 -                     The path to the directory of incomplete transfer data.                                                                    
+    ``incomplete_dir_enabled``    7 -                     Enables the incomplete transfer data directory. Otherwise data for incomplete transfers are stored in the download target.
+    ``peer_limit``                1 - 5 peer-limit-global Maximum number of peers                                                                                                   
+    ``peer_limit_global``         5 -                     Maximum number of peers                                                                                                   
+    ``peer_limit_per_torrent``    5 -                     Maximum number of peers per transfer                                                                                      
+    ``peer_port``                 5 -                     Peer port.                                                                                                                
+    ``peer_port_random_on_start`` 5 -                     Enables randomized peer port on start of Transmission.                                                                    
+    ``pex_allowed``               1 - 5 pex-enabled       Allowing PEX in public torrents.                                                                                          
+    ``pex_enabled``               5 -                     Allowing PEX in public torrents.                                                                                          
+    ``port``                      1 - 5 peer-port         Peer port.                                                                                                                
+    ``port_forwarding_enabled``   1 -                     Enables port forwarding.                                                                                                  
+    ``seedRatioLimit``            5 -                     Seed ratio limit. 1.0 means 1:1 download and upload ratio.                                                                
+    ``seedRatioLimited``          5 -                     Enables seed ration limit.                                                                                                
+    ``speed_limit_down``          1 -                     Download speed limit (in Kib/s).                                                                                          
+    ``speed_limit_down_enabled``  1 -                     Enables download speed limiting.                                                                                          
+    ``speed_limit_up``            1 -                     Upload speed limit (in Kib/s).                                                                                            
+    ``speed_limit_up_enabled``    1 -                     Enables upload speed limiting.                                                                                            
+    ============================= ===== ================= ==========================================================================================================================
     
     .. NOTE::
        transmissionrpc will try to automatically fix argument errors.

transmissionrpc/constants.py

 # A note on argument maps
 # These maps are used to verify *-set methods. The information is structured in
 # a tree.
-# set +- <argument1> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>]
-#  |  +- <argument2> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>]
+# set +- <argument1> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>, <description>]
+#  |  +- <argument2> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>, <description>]
 #  |
-# get +- <argument1> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>]
-#     +- <argument2> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>]
+# get +- <argument1> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>, <description>]
+#     +- <argument2> - [<type>, <added version>, <removed version>, <previous argument name>, <next argument name>, <description>]
 
 # Arguments for torrent methods
 TORRENT_ARGS = {
     'get' : {
-        'activityDate':             ('number', 1, None, None, None),
-        'addedDate':                ('number', 1, None, None, None),
-        'announceResponse':         ('string', 1, 7, None, None),
-        'announceURL':              ('string', 1, 7, None, None),
-        'bandwidthPriority':        ('number', 5, None, None, None),
-        'comment':                  ('string', 1, None, None, None),
-        'corruptEver':              ('number', 1, None, None, None),
-        'creator':                  ('string', 1, None, None, None),
-        'dateCreated':              ('number', 1, None, None, None),
-        'desiredAvailable':         ('number', 1, None, None, None),
-        'doneDate':                 ('number', 1, None, None, None),
-        'downloadDir':              ('string', 4, None, None, None),
-        'downloadedEver':           ('number', 1, None, None, None),
-        'downloaders':              ('number', 4, 7, None, None),
-        'downloadLimit':            ('number', 1, None, None, None),
-        'downloadLimited':          ('boolean', 5, None, None, None),
-        'downloadLimitMode':        ('number', 1, 5, None, None),
-        'error':                    ('number', 1, None, None, None),
-        'errorString':              ('number', 1, None, None, None),
-        'eta':                      ('number', 1, None, None, None),
-        'files':                    ('array', 1, None, None, None),
-        'fileStats':                ('array', 5, None, None, None),
-        'hashString':               ('string', 1, None, None, None),
-        'haveUnchecked':            ('number', 1, None, None, None),
-        'haveValid':                ('number', 1, None, None, None),
-        'honorsSessionLimits':      ('boolean', 5, None, None, None),
-        'id':                       ('number', 1, None, None, None),
-        'isPrivate':                ('boolean', 1, None, None, None),
-        'lastAnnounceTime':         ('number', 1, 7, None, None),
-        'lastScrapeTime':           ('number', 1, 7, None, None),
-        'leechers':                 ('number', 1, 7, None, None),
-        'leftUntilDone':            ('number', 1, None, None, None),
-        'magnetLink':               ('string', 7, None, None, None),
-        'manualAnnounceTime':       ('number', 1, None, None, None),
-        'maxConnectedPeers':        ('number', 1, None, None, None),
-        'metadataPercentComplete':  ('number', 7, None, None, None),
-        'name':                     ('string', 1, None, None, None),
-        'nextAnnounceTime':         ('number', 1, 7, None, None),
-        'nextScrapeTime':           ('number', 1, 7, None, None),
-        'peer-limit':               ('number', 5, None, None, None),
-        'peers':                    ('array', 2, None, None, None),
-        'peersConnected':           ('number', 1, None, None, None),
-        'peersFrom':                ('object', 1, None, None, None),
-        'peersGettingFromUs':       ('number', 1, None, None, None),
-        'peersKnown':               ('number', 1, None, None, None),
-        'peersSendingToUs':         ('number', 1, None, None, None),
-        'percentDone':              ('double', 5, None, None, None),
-        'pieces':                   ('string', 5, None, None, None),
-        'pieceCount':               ('number', 1, None, None, None),
-        'pieceSize':                ('number', 1, None, None, None),
-        'priorities':               ('array', 1, None, None, None),
-        'rateDownload':             ('number', 1, None, None, None),
-        'rateUpload':               ('number', 1, None, None, None),
-        'recheckProgress':          ('double', 1, None, None, None),
-        'scrapeResponse':           ('string', 1, 7, None, None),
-        'scrapeURL':                ('string', 1, 7, None, None),
-        'seeders':                  ('number', 1, 7, None, None),
-        'seedRatioLimit':           ('double', 5, None, None, None),
-        'seedRatioMode':            ('number', 5, None, None, None),
-        'sizeWhenDone':             ('number', 1, None, None, None),
-        'startDate':                ('number', 1, None, None, None),
-        'status':                   ('number', 1, None, None, None),
-        'swarmSpeed':               ('number', 1, 7, None, None),
-        'timesCompleted':           ('number', 1, 7, None, None),
-        'trackers':                 ('array', 1, None, None, None),
-        'trackerStats':             ('object', 7, None, None, None),
-        'totalSize':                ('number', 1, None, None, None),
-        'torrentFile':              ('string', 5, None, None, None),
-        'uploadedEver':             ('number', 1, None, None, None),
-        'uploadLimit':              ('number', 1, None, None, None),
-        'uploadLimitMode':          ('number', 1, 5, None, None),
-        'uploadLimited':            ('boolean', 5, None, None, None),
-        'uploadRatio':              ('double', 1, None, None, None),
-        'wanted':                   ('array', 1, None, None, None),
-        'webseeds':                 ('array', 1, None, None, None),
-        'webseedsSendingToUs':      ('number', 1, None, None, None),
+        'activityDate':             ('number', 1, None, None, None, ''),
+        'addedDate':                ('number', 1, None, None, None, ''),
+        'announceResponse':         ('string', 1, 7, None, None, ''),
+        'announceURL':              ('string', 1, 7, None, None, ''),
+        'bandwidthPriority':        ('number', 5, None, None, None, ''),
+        'comment':                  ('string', 1, None, None, None, ''),
+        'corruptEver':              ('number', 1, None, None, None, ''),
+        'creator':                  ('string', 1, None, None, None, ''),
+        'dateCreated':              ('number', 1, None, None, None, ''),
+        'desiredAvailable':         ('number', 1, None, None, None, ''),
+        'doneDate':                 ('number', 1, None, None, None, ''),
+        'downloadDir':              ('string', 4, None, None, None, ''),
+        'downloadedEver':           ('number', 1, None, None, None, ''),
+        'downloaders':              ('number', 4, 7, None, None, ''),
+        'downloadLimit':            ('number', 1, None, None, None, ''),
+        'downloadLimited':          ('boolean', 5, None, None, None, ''),
+        'downloadLimitMode':        ('number', 1, 5, None, None, ''),
+        'error':                    ('number', 1, None, None, None, ''),
+        'errorString':              ('number', 1, None, None, None, ''),
+        'eta':                      ('number', 1, None, None, None, ''),
+        'files':                    ('array', 1, None, None, None, ''),
+        'fileStats':                ('array', 5, None, None, None, ''),
+        'hashString':               ('string', 1, None, None, None, ''),
+        'haveUnchecked':            ('number', 1, None, None, None, ''),
+        'haveValid':                ('number', 1, None, None, None, ''),
+        'honorsSessionLimits':      ('boolean', 5, None, None, None, ''),
+        'id':                       ('number', 1, None, None, None, ''),
+        'isPrivate':                ('boolean', 1, None, None, None, ''),
+        'lastAnnounceTime':         ('number', 1, 7, None, None, ''),
+        'lastScrapeTime':           ('number', 1, 7, None, None, ''),
+        'leechers':                 ('number', 1, 7, None, None, ''),
+        'leftUntilDone':            ('number', 1, None, None, None, ''),
+        'magnetLink':               ('string', 7, None, None, None, ''),
+        'manualAnnounceTime':       ('number', 1, None, None, None, ''),
+        'maxConnectedPeers':        ('number', 1, None, None, None, ''),
+        'metadataPercentComplete':  ('number', 7, None, None, None, ''),
+        'name':                     ('string', 1, None, None, None, ''),
+        'nextAnnounceTime':         ('number', 1, 7, None, None, ''),
+        'nextScrapeTime':           ('number', 1, 7, None, None, ''),
+        'peer-limit':               ('number', 5, None, None, None, ''),
+        'peers':                    ('array', 2, None, None, None, ''),
+        'peersConnected':           ('number', 1, None, None, None, ''),
+        'peersFrom':                ('object', 1, None, None, None, ''),
+        'peersGettingFromUs':       ('number', 1, None, None, None, ''),
+        'peersKnown':               ('number', 1, None, None, None, ''),
+        'peersSendingToUs':         ('number', 1, None, None, None, ''),
+        'percentDone':              ('double', 5, None, None, None, ''),
+        'pieces':                   ('string', 5, None, None, None, ''),
+        'pieceCount':               ('number', 1, None, None, None, ''),
+        'pieceSize':                ('number', 1, None, None, None, ''),
+        'priorities':               ('array', 1, None, None, None, ''),
+        'rateDownload':             ('number', 1, None, None, None, ''),
+        'rateUpload':               ('number', 1, None, None, None, ''),
+        'recheckProgress':          ('double', 1, None, None, None, ''),
+        'scrapeResponse':           ('string', 1, 7, None, None, ''),
+        'scrapeURL':                ('string', 1, 7, None, None, ''),
+        'seeders':                  ('number', 1, 7, None, None, ''),
+        'seedRatioLimit':           ('double', 5, None, None, None, ''),
+        'seedRatioMode':            ('number', 5, None, None, None, ''),
+        'sizeWhenDone':             ('number', 1, None, None, None, ''),
+        'startDate':                ('number', 1, None, None, None, ''),
+        'status':                   ('number', 1, None, None, None, ''),
+        'swarmSpeed':               ('number', 1, 7, None, None, ''),
+        'timesCompleted':           ('number', 1, 7, None, None, ''),
+        'trackers':                 ('array', 1, None, None, None, ''),
+        'trackerStats':             ('object', 7, None, None, None, ''),
+        'totalSize':                ('number', 1, None, None, None, ''),
+        'torrentFile':              ('string', 5, None, None, None, ''),
+        'uploadedEver':             ('number', 1, None, None, None, ''),
+        'uploadLimit':              ('number', 1, None, None, None, ''),
+        'uploadLimitMode':          ('number', 1, 5, None, None, ''),
+        'uploadLimited':            ('boolean', 5, None, None, None, ''),
+        'uploadRatio':              ('double', 1, None, None, None, ''),
+        'wanted':                   ('array', 1, None, None, None, ''),
+        'webseeds':                 ('array', 1, None, None, None, ''),
+        'webseedsSendingToUs':      ('number', 1, None, None, None, ''),
     },
     'set': {
-        'bandwidthPriority':        ('number', 5, None, None, None),
-        'downloadLimit':            ('number', 5, None, 'speed-limit-down', None),
-        'downloadLimited':          ('boolean', 5, None, 'speed-limit-down-enabled', None),
-        'files-wanted':             ('array', 1, None, None, None),
-        'files-unwanted':           ('array', 1, None, None, None),
-        'honorsSessionLimits':      ('boolean', 5, None, None, None),
-        'ids':                      ('array', 1, None, None, None),
-        'peer-limit':               ('number', 1, None, None, None),
-        'priority-high':            ('array', 1, None, None, None),
-        'priority-low':             ('array', 1, None, None, None),
-        'priority-normal':          ('array', 1, None, None, None),
-        'seedRatioLimit':           ('double', 5, None, None, None),
-        'seedRatioMode':            ('number', 5, None, None, None),
-        'speed-limit-down':         ('number', 1, 5, None, 'downloadLimit'),
-        'speed-limit-down-enabled': ('boolean', 1, 5, None, 'downloadLimited'),
-        'speed-limit-up':           ('number', 1, 5, None, 'uploadLimit'),
-        'speed-limit-up-enabled':   ('boolean', 1, 5, None, 'uploadLimited'),
-        'uploadLimit':              ('number', 5, None, 'speed-limit-up', None),
-        'uploadLimited':            ('boolean', 5, None, 'speed-limit-up-enabled', None),
+        'bandwidthPriority':        ('number', 5, None, None, None, 'Priority for this transfer.'),
+        'downloadLimit':            ('number', 5, None, 'speed-limit-down', None, 'Set the speed limit for download in Kib/s.'),
+        'downloadLimited':          ('boolean', 5, None, 'speed-limit-down-enabled', None, 'Enable download speed limiter.'),
+        'files-wanted':             ('array', 1, None, None, None, "A list of file id's that should be downloaded."),
+        'files-unwanted':           ('array', 1, None, None, None, "A list of file id's that shouldn't be downloaded."),
+        'honorsSessionLimits':      ('boolean', 5, None, None, None, "Enables or disables the transfer to honour the upload limit set in the session."),
+        'ids':                      ('array', 1, None, None, None, 'Local download location.'),
+        'peer-limit':               ('number', 1, None, None, None, 'The peer limit for the torrents.'),
+        'priority-high':            ('array', 1, None, None, None, "A list of file id's that should have high priority."),
+        'priority-low':             ('array', 1, None, None, None, "A list of file id's that should have normal priority."),
+        'priority-normal':          ('array', 1, None, None, None, "A list of file id's that should have low priority."),
+        'seedRatioLimit':           ('double', 5, None, None, None, 'Seeding ratio.'),
+        'seedRatioMode':            ('number', 5, None, None, None, 'Which ratio to use. 0 = Use session limit, 1 = Use transfer limit, 2 = Disable limit.'),
+        'speed-limit-down':         ('number', 1, 5, None, 'downloadLimit', 'Set the speed limit for download in Kib/s.'),
+        'speed-limit-down-enabled': ('boolean', 1, 5, None, 'downloadLimited', 'Enable download speed limiter.'),
+        'speed-limit-up':           ('number', 1, 5, None, 'uploadLimit', 'Set the speed limit for upload in Kib/s.'),
+        'speed-limit-up-enabled':   ('boolean', 1, 5, None, 'uploadLimited', 'Enable upload speed limiter.'),
+        'uploadLimit':              ('number', 5, None, 'speed-limit-up', None, 'Set the speed limit for upload in Kib/s.'),
+        'uploadLimited':            ('boolean', 5, None, 'speed-limit-up-enabled', None, 'Enable upload speed limiter.'),
     },
     'add': {
-        'download-dir':             ('string', 1, None, None, None),
-        'filename':                 ('string', 1, None, None, None),
-        'files-wanted':             ('array', 1, None, None, None),
-        'files-unwanted':           ('array', 1, None, None, None),
-        'metainfo':                 ('string', 1, None, None, None),
-        'paused':                   ('boolean', 1, None, None, None),
-        'peer-limit':               ('number', 1, None, None, None),
-        'priority-high':            ('array', 1, None, None, None),
-        'priority-low':             ('array', 1, None, None, None),
-        'priority-normal':          ('array', 1, None, None, None),
+        'download-dir':             ('string', 1, None, None, None, 'The directory where the downloaded contents will be saved in.'),
+        'filename':                 ('string', 1, None, None, None, "A filepath or URL to a torrent file or a magnet link."),
+        'files-wanted':             ('array', 1, None, None, None, "A list of file id's that should be downloaded."),
+        'files-unwanted':           ('array', 1, None, None, None, "A list of file id's that shouldn't be downloaded."),
+        'metainfo':                 ('string', 1, None, None, None, 'The content of a torrent file, base64 encoded.'),
+        'paused':                   ('boolean', 1, None, None, None, 'If True, does not start the transfer when added.'),
+        'peer-limit':               ('number', 1, None, None, None, 'Maximum number of peers allowed.'),
+        'priority-high':            ('array', 1, None, None, None, "A list of file id's that should have high priority."),
+        'priority-low':             ('array', 1, None, None, None, "A list of file id's that should have low priority."),
+        'priority-normal':          ('array', 1, None, None, None, "A list of file id's that should have normal priority."),
     }
 }
 
 # Arguments for session methods
 SESSION_ARGS = {
     'get': {
-        "alt-speed-down":            ('number', 5, None, None, None),
-        "alt-speed-enabled":         ('boolean', 5, None, None, None),
-        "alt-speed-time-begin":      ('number', 5, None, None, None),
-        "alt-speed-time-enabled":    ('boolean', 5, None, None, None),
-        "alt-speed-time-end":        ('number', 5, None, None, None),
-        "alt-speed-time-day":        ('number', 5, None, None, None),
-        "alt-speed-up":              ('number', 5, None, None, None),
-        "blocklist-enabled":         ('boolean', 5, None, None, None),
-        "blocklist-size":            ('number', 5, None, None, None),
-        "dht-enabled":               ('boolean', 6, None, None, None),
-        "download-dir":              ('string', 1, None, None, None),
-        "encryption":                ('string', 1, None, None, None),
-        'incomplete-dir':            ('string', 7, None, None, None),
-        'incomplete-dir-enabled':    ('boolean', 7, None, None, None),
-        "peer-limit":                ('number', 1, 5, None, None),
-        "peer-limit-global":         ('number', 5, None, None, None),
-        "peer-limit-per-torrent":    ('number', 5, None, None, None),
-        "pex-allowed":               ('boolean', 1, 5, None, None),
-        "pex-enabled":               ('boolean', 5, None, None, None),
-        "port":                      ('number', 1, 5, None, None),
-        "peer-port":                 ('number', 5, None, None, None),
-        "peer-port-random-on-start": ('boolean', 5, None, None, None),
-        "port-forwarding-enabled":   ('boolean', 1, None, None, None),
-        "rpc-version":               ('number', 4, None, None, None),
-        "rpc-version-minimum":       ('number', 4, None, None, None),
-        "seedRatioLimit":            ('double', 5, None, None, None),
-        "seedRatioLimited":          ('boolean', 5, None, None, None),
-        "speed-limit-down":          ('number', 1, None, None, None),
-        "speed-limit-down-enabled":  ('boolean', 1, None, None, None),
-        "speed-limit-up":            ('number', 1, None, None, None),
-        "speed-limit-up-enabled":    ('boolean', 1, None, None, None),
-        "version":                   ('string', 3, None, None, None),
+        "alt-speed-down":            ('number', 5, None, None, None, ''),
+        "alt-speed-enabled":         ('boolean', 5, None, None, None, ''),
+        "alt-speed-time-begin":      ('number', 5, None, None, None, ''),
+        "alt-speed-time-enabled":    ('boolean', 5, None, None, None, ''),
+        "alt-speed-time-end":        ('number', 5, None, None, None, ''),
+        "alt-speed-time-day":        ('number', 5, None, None, None, ''),
+        "alt-speed-up":              ('number', 5, None, None, None, ''),
+        "blocklist-enabled":         ('boolean', 5, None, None, None, ''),
+        "blocklist-size":            ('number', 5, None, None, None, ''),
+        "dht-enabled":               ('boolean', 6, None, None, None, ''),
+        "download-dir":              ('string', 1, None, None, None, ''),
+        "encryption":                ('string', 1, None, None, None, ''),
+        'incomplete-dir':            ('string', 7, None, None, None, ''),
+        'incomplete-dir-enabled':    ('boolean', 7, None, None, None, ''),
+        "peer-limit":                ('number', 1, 5, None, None, ''),
+        "peer-limit-global":         ('number', 5, None, None, None, ''),
+        "peer-limit-per-torrent":    ('number', 5, None, None, None, ''),
+        "pex-allowed":               ('boolean', 1, 5, None, None, ''),
+        "pex-enabled":               ('boolean', 5, None, None, None, ''),
+        "port":                      ('number', 1, 5, None, None, ''),
+        "peer-port":                 ('number', 5, None, None, None, ''),
+        "peer-port-random-on-start": ('boolean', 5, None, None, None, ''),
+        "port-forwarding-enabled":   ('boolean', 1, None, None, None, ''),
+        "rpc-version":               ('number', 4, None, None, None, ''),
+        "rpc-version-minimum":       ('number', 4, None, None, None, ''),
+        "seedRatioLimit":            ('double', 5, None, None, None, ''),
+        "seedRatioLimited":          ('boolean', 5, None, None, None, ''),
+        "speed-limit-down":          ('number', 1, None, None, None, ''),
+        "speed-limit-down-enabled":  ('boolean', 1, None, None, None, ''),
+        "speed-limit-up":            ('number', 1, None, None, None, ''),
+        "speed-limit-up-enabled":    ('boolean', 1, None, None, None, ''),
+        "version":                   ('string', 3, None, None, None, ''),
     },
     'set': {
-        "alt-speed-down":            ('number', 5, None, None, None),
-        "alt-speed-enabled":         ('boolean', 5, None, None, None),
-        "alt-speed-time-begin":      ('number', 5, None, None, None),
-        "alt-speed-time-enabled":    ('boolean', 5, None, None, None),
-        "alt-speed-time-end":        ('number', 5, None, None, None),
-        "alt-speed-time-day":        ('number', 5, None, None, None),
-        "alt-speed-up":              ('number', 5, None, None, None),
-        "blocklist-enabled":         ('boolean', 5, None, None, None),
-        "dht-enabled":               ('boolean', 6, None, None, None),
-        "download-dir":              ('string', 1, None, None, None),
-        "encryption":                ('string', 1, None, None, None),
-        'incomplete-dir':            ('string', 7, None, None, None),
-        'incomplete-dir-enabled':    ('boolean', 7, None, None, None),
-        "peer-limit":                ('number', 1, 5, None, 'peer-limit-global'),
-        "peer-limit-global":         ('number', 5, None, 'peer-limit', None),
-        "peer-limit-per-torrent":    ('number', 5, None, None, None),
-        "pex-allowed":               ('boolean', 1, 5, None, 'pex-enabled'),
-        "pex-enabled":               ('boolean', 5, None, 'pex-allowed', None),
-        "port":                      ('number', 1, 5, None, 'peer-port'),
-        "peer-port":                 ('number', 5, None, 'port', None),
-        "peer-port-random-on-start": ('boolean', 5, None, None, None),
-        "port-forwarding-enabled":   ('boolean', 1, None, None, None),
-        "seedRatioLimit":            ('double', 5, None, None, None),
-        "seedRatioLimited":          ('boolean', 5, None, None, None),
-        "speed-limit-down":          ('number', 1, None, None, None),
-        "speed-limit-down-enabled":  ('boolean', 1, None, None, None),
-        "speed-limit-up":            ('number', 1, None, None, None),
-        "speed-limit-up-enabled":    ('boolean', 1, None, None, None),
+        "alt-speed-down":            ('number', 5, None, None, None, 'Alternate session download speed limit (in Kib/s).'),
+        "alt-speed-enabled":         ('boolean', 5, None, None, None, 'Enables alternate global download speed limiter.'),
+        "alt-speed-time-begin":      ('number', 5, None, None, None, 'Time when alternate speeds should be enabled. Minutes after midnight.'),
+        "alt-speed-time-enabled":    ('boolean', 5, None, None, None, 'Enables alternate speeds scheduling.'),
+        "alt-speed-time-end":        ('number', 5, None, None, None, 'Time when alternate speeds should be disabled. Minutes after midnight.'),
+        "alt-speed-time-day":        ('number', 5, None, None, None, 'Enables alternate speeds scheduling these days.'),
+        "alt-speed-up":              ('number', 5, None, None, None, 'Alternate session upload speed limit (in Kib/s).'),
+        "blocklist-enabled":         ('boolean', 5, None, None, None, 'Enables the block list'),
+        "dht-enabled":               ('boolean', 6, None, None, None, 'Enables DHT.'),
+        "download-dir":              ('string', 1, None, None, None, 'Set the session download directory.'),
+        "encryption":                ('string', 1, None, None, None, 'Set the session encryption mode, one of ``required``, ``preferred`` or ``tolerated``.'),
+        'incomplete-dir':            ('string', 7, None, None, None, 'The path to the directory of incomplete transfer data.'),
+        'incomplete-dir-enabled':    ('boolean', 7, None, None, None, 'Enables the incomplete transfer data directory. Otherwise data for incomplete transfers are stored in the download target.'),
+        "peer-limit":                ('number', 1, 5, None, 'peer-limit-global', 'Maximum number of peers'),
+        "peer-limit-global":         ('number', 5, None, 'peer-limit', None, 'Maximum number of peers'),
+        "peer-limit-per-torrent":    ('number', 5, None, None, None, 'Maximum number of peers per transfer'),
+        "pex-allowed":               ('boolean', 1, 5, None, 'pex-enabled', 'Allowing PEX in public torrents.'),
+        "pex-enabled":               ('boolean', 5, None, 'pex-allowed', None, 'Allowing PEX in public torrents.'),
+        "port":                      ('number', 1, 5, None, 'peer-port', 'Peer port.'),
+        "peer-port":                 ('number', 5, None, 'port', None, 'Peer port.'),
+        "peer-port-random-on-start": ('boolean', 5, None, None, None, 'Enables randomized peer port on start of Transmission.'),
+        "port-forwarding-enabled":   ('boolean', 1, None, None, None, 'Enables port forwarding.'),
+        "seedRatioLimit":            ('double', 5, None, None, None, 'Seed ratio limit. 1.0 means 1:1 download and upload ratio.'),
+        "seedRatioLimited":          ('boolean', 5, None, None, None, 'Enables seed ration limit.'),
+        "speed-limit-down":          ('number', 1, None, None, None, 'Download speed limit (in Kib/s).'),
+        "speed-limit-down-enabled":  ('boolean', 1, None, None, None, 'Enables download speed limiting.'),
+        "speed-limit-up":            ('number', 1, None, None, None, 'Upload speed limit (in Kib/s).'),
+        "speed-limit-up-enabled":    ('boolean', 1, None, None, None, 'Enables upload speed limiting.'),
     },
 }

transmissionrpc/maketable.py

+#!/usr/bin/env python
+# encoding: utf-8
+
+import transmissionrpc.constants as trc
+import transmissionrpc.utils as tru
+
+headers = ('Argument', 'RPC', 'Replaced by', 'Description')
+
+def heading(a, b, c, d):
+    ad = ''.join(['=' for i in xrange(0, a)])
+    bd = ''.join(['=' for i in xrange(0, b)])
+    cd = ''.join(['=' for i in xrange(0, c)])
+    dd = ''.join(['=' for i in xrange(0, d)])
+    return ad + ' ' + bd + ' ' + cd + ' ' + dd + '\n'
+
+def tablesfor(name, category, fd):
+    for op, args in category.iteritems():
+        maxarglen = len(headers[0])
+        maxverlen = len(headers[1])
+        maxrpllen = len(headers[2])
+        maxdsclen = len(headers[3])
+        fd.write('%s-%s\n\n' % (name, op))
+        for arg, arginfo in args.iteritems():
+            arg = '``%s``' % tru.make_python_name(arg)
+            if len(arg) > maxarglen:
+                maxarglen = len(arg)
+
+            if isinstance(arginfo[2], int):
+                ver = '%d - %d' % (arginfo[1], arginfo[2])
+            else:
+                ver = '%d - ' % (arginfo[1])
+            if len(ver) > maxverlen:
+                maxverlen = len(ver)
+
+            if isinstance(arginfo[4], str):
+                rpl = arginfo[4]
+            else:
+                rpl = ''
+            if len(rpl) > maxrpllen:
+                maxrpllen = len(rpl)
+
+            if isinstance(arginfo[5], str):
+                dsc = arginfo[5]
+            else:
+                dsc = ''
+            if len(dsc) > maxdsclen:
+                maxdsclen = len(dsc)
+        
+        fd.write(heading(maxarglen, maxverlen, maxrpllen, maxdsclen))
+        fmt = '%%- %ds %%- %ds %%- %ds %%- %ds\n' % (maxarglen, maxverlen, maxrpllen, maxdsclen)
+        fd.write(fmt % headers)
+        fd.write(heading(maxarglen, maxverlen, maxrpllen, maxdsclen))
+        
+        for arg, arginfo in sorted(args.iteritems()):
+            arg = '``%s``' % tru.make_python_name(arg)
+            if isinstance(arginfo[2], int):
+                ver = '%d - %d' % (arginfo[1], arginfo[2])
+            else:
+                ver = '%d - ' % (arginfo[1])
+            if isinstance(arginfo[4], str):
+                rpl = arginfo[4]
+            else:
+                rpl = ''
+            if isinstance(arginfo[5], str):
+                dsc = arginfo[5]
+            else:
+                dsc = ''
+            fd.write(fmt % (arg, ver, rpl, dsc))
+        fd.write(heading(maxarglen, maxverlen, maxrpllen, maxdsclen))
+        fd.write('\n')
+    
+def main():
+    fd = open('tables.rst', 'w')
+    tablesfor('torrent', trc.TORRENT_ARGS, fd)
+    tablesfor('session', trc.SESSION_ARGS, fd)
+    fd.close()
+
+if __name__ == '__main__':
+    main()
+
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.