fix docs theme

This commit is contained in:
Alex Grintsvayg 2018-03-05 18:57:05 -05:00
parent 59d56acf09
commit a96ee6230f
7 changed files with 291 additions and 447 deletions

View file

@ -42,6 +42,8 @@
<link rel="stylesheet" href="/assets/stylesheets/application.78aab2dc.css"> <link rel="stylesheet" href="/assets/stylesheets/application.78aab2dc.css">
<link rel="stylesheet" href="/assets/stylesheets/application-palette.6079476c.css">
<script src="/assets/javascripts/modernizr.1aa3b519.js"></script> <script src="/assets/javascripts/modernizr.1aa3b519.js"></script>
@ -58,7 +60,9 @@
</head> </head>
<body dir="ltr">
<body dir="ltr" data-md-color-primary="teal" data-md-color-accent="green">
<svg class="md-svg"> <svg class="md-svg">
<defs> <defs>
@ -96,7 +100,7 @@
<div class="md-flex__cell md-flex__cell--shrink"> <div class="md-flex__cell md-flex__cell--shrink">
<a href="/" title="LBRY" class="md-header-nav__button md-logo"> <a href="/" title="LBRY" class="md-header-nav__button md-logo">
<i class="md-icon"></i> <img src="/images/lbry-white.svg" width="24" height="24">
</a> </a>
</div> </div>
@ -192,7 +196,7 @@
<label class="md-nav__title md-nav__title--site" for="drawer"> <label class="md-nav__title md-nav__title--site" for="drawer">
<span class="md-nav__button md-logo"> <span class="md-nav__button md-logo">
<i class="md-icon"></i> <img src="/images/lbry-white.svg" width="24" height="24">
</span> </span>
LBRY LBRY
@ -282,18 +286,6 @@
</div> </div>
<div class="md-footer-social">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://github.com/lbryio" class="md-footer-social__link fa fa-github"></a>
<a href="https://twitter.com/lbryio" class="md-footer-social__link fa fa-twitter"></a>
<a href="https://facebook.com/lbryio" class="md-footer-social__link fa fa-facebook"></a>
</div>
</div> </div>
</div> </div>

View file

@ -42,6 +42,8 @@
<link rel="stylesheet" href="../assets/stylesheets/application.78aab2dc.css"> <link rel="stylesheet" href="../assets/stylesheets/application.78aab2dc.css">
<link rel="stylesheet" href="../assets/stylesheets/application-palette.6079476c.css">
<script src="../assets/javascripts/modernizr.1aa3b519.js"></script> <script src="../assets/javascripts/modernizr.1aa3b519.js"></script>
@ -58,7 +60,9 @@
</head> </head>
<body dir="ltr">
<body dir="ltr" data-md-color-primary="teal" data-md-color-accent="green">
<svg class="md-svg"> <svg class="md-svg">
<defs> <defs>
@ -89,7 +93,7 @@
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="search">
<label class="md-overlay" data-md-component="overlay" for="drawer"></label> <label class="md-overlay" data-md-component="overlay" for="drawer"></label>
<a href="#lbry-command-line-documentation" tabindex="1" class="md-skip"> <a href="#lbry-json-rpc-api-documentation" tabindex="1" class="md-skip">
Skip to content Skip to content
</a> </a>
@ -100,7 +104,7 @@
<div class="md-flex__cell md-flex__cell--shrink"> <div class="md-flex__cell md-flex__cell--shrink">
<a href=".." title="LBRY" class="md-header-nav__button md-logo"> <a href=".." title="LBRY" class="md-header-nav__button md-logo">
<i class="md-icon"></i> <img src="../images/lbry-white.svg" width="24" height="24">
</a> </a>
</div> </div>
@ -196,7 +200,7 @@
<label class="md-nav__title md-nav__title--site" for="drawer"> <label class="md-nav__title md-nav__title--site" for="drawer">
<span class="md-nav__button md-logo"> <span class="md-nav__button md-logo">
<i class="md-icon"></i> <img src="../images/lbry-white.svg" width="24" height="24">
</span> </span>
LBRY LBRY
@ -478,13 +482,6 @@
publish publish
</a> </a>
</li>
<li class="md-nav__item">
<a href="#report_bug" title="report_bug" class="md-nav__link">
report_bug
</a>
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
@ -887,13 +884,6 @@
publish publish
</a> </a>
</li>
<li class="md-nav__item">
<a href="#report_bug" title="report_bug" class="md-nav__link">
report_bug
</a>
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
@ -1076,7 +1066,7 @@
<a href="https://github.com/lbryio/lbry/edit/master/docs/cli.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a> <a href="https://github.com/lbryio/lbry/edit/master/docs/cli.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
<h1 id="lbry-command-line-documentation">LBRY Command Line Documentation</h1> <h1 id="lbry-json-rpc-api-documentation">LBRY JSON-RPC API Documentation</h1>
<h2 id="blob_announce">blob_announce</h2> <h2 id="blob_announce">blob_announce</h2>
<pre><code class="text">Announce blobs to the DHT <pre><code class="text">Announce blobs to the DHT
@ -1854,20 +1844,6 @@ Returns:
} }
</code></pre> </code></pre>
<h2 id="report_bug">report_bug</h2>
<pre><code class="text">Report a bug to slack
Usage:
report_bug (&lt;message&gt; | --message=&lt;message&gt;)
Options:
--message=&lt;message&gt; : (str) Description of the bug
Returns:
(bool) true if successful
</code></pre>
<h2 id="resolve">resolve</h2> <h2 id="resolve">resolve</h2>
<pre><code class="text">Resolve given LBRY URIs <pre><code class="text">Resolve given LBRY URIs
@ -2497,18 +2473,6 @@ Returns:
</div> </div>
<div class="md-footer-social">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://github.com/lbryio" class="md-footer-social__link fa fa-github"></a>
<a href="https://twitter.com/lbryio" class="md-footer-social__link fa fa-twitter"></a>
<a href="https://facebook.com/lbryio" class="md-footer-social__link fa fa-facebook"></a>
</div>
</div> </div>
</div> </div>

View file

@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="80.207558mm"
height="58.081333mm"
viewBox="0 0 284.20001 205.8"
id="svg3479"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="lbry-white-logo-only.svg">
<defs
id="defs3481" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="-470.0429"
inkscape:cy="-5.6714247"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata3484">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-363.61433,-320.89078)">
<g
id="g3396"
transform="translate(363.61433,320.89078)">
<g
id="g3398">
<polygon
style="fill:#ffffff"
points="138.8,155.2 271,74 271,68.2 146.2,8 7,94.1 7,132.6 138.8,197.8 276.4,113.4 280.3,119.4 139.2,205.8 0,137 0,90.2 145.8,0 278,63.8 278,77.9 139.2,163.2 34.6,111.9 34.8,104 "
id="polygon3400" />
</g>
<g
id="g3402">
<polygon
style="fill:#ffffff"
points="276.5,128.5 278.5,115.9 266.3,113.8 267.1,108.9 284.2,111.8 281.4,129.3 "
id="polygon3404" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -42,6 +42,8 @@
<link rel="stylesheet" href="./assets/stylesheets/application.78aab2dc.css"> <link rel="stylesheet" href="./assets/stylesheets/application.78aab2dc.css">
<link rel="stylesheet" href="./assets/stylesheets/application-palette.6079476c.css">
<script src="./assets/javascripts/modernizr.1aa3b519.js"></script> <script src="./assets/javascripts/modernizr.1aa3b519.js"></script>
@ -58,7 +60,9 @@
</head> </head>
<body dir="ltr">
<body dir="ltr" data-md-color-primary="teal" data-md-color-accent="green">
<svg class="md-svg"> <svg class="md-svg">
<defs> <defs>
@ -100,7 +104,7 @@
<div class="md-flex__cell md-flex__cell--shrink"> <div class="md-flex__cell md-flex__cell--shrink">
<a href="." title="LBRY" class="md-header-nav__button md-logo"> <a href="." title="LBRY" class="md-header-nav__button md-logo">
<i class="md-icon"></i> <img src="./images/lbry-white.svg" width="24" height="24">
</a> </a>
</div> </div>
@ -196,7 +200,7 @@
<label class="md-nav__title md-nav__title--site" for="drawer"> <label class="md-nav__title md-nav__title--site" for="drawer">
<span class="md-nav__button md-logo"> <span class="md-nav__button md-logo">
<i class="md-icon"></i> <img src="./images/lbry-white.svg" width="24" height="24">
</span> </span>
LBRY LBRY
@ -466,13 +470,6 @@
publish publish
</a> </a>
</li>
<li class="md-nav__item">
<a href="#report_bug" title="report_bug" class="md-nav__link">
report_bug
</a>
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
@ -887,13 +884,6 @@
publish publish
</a> </a>
</li>
<li class="md-nav__item">
<a href="#report_bug" title="report_bug" class="md-nav__link">
report_bug
</a>
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
@ -1081,12 +1071,12 @@
<pre><code class="text">Announce blobs to the DHT <pre><code class="text">Announce blobs to the DHT
Args: Args:
'announce_all' (optional) : (bool) announce all the blobs possessed by user 'announce_all' : (bool) announce all the blobs possessed by user
'blob_hash' (optional) : (str) announce a blob, specified by blob_hash 'blob_hash' : (str) announce a blob, specified by blob_hash
'stream_hash' (optional) : (str) announce all blobs associated with 'stream_hash' : (str) announce all blobs associated with
stream_hash stream_hash
'sd_hash' (optional) : (str) announce all blobs associated with 'sd_hash' : (str) announce all blobs associated with
sd_hash and the sd_hash itself sd_hash and the sd_hash itself
Returns: Returns:
(bool) true if successful (bool) true if successful
@ -1096,10 +1086,10 @@ Returns:
<pre><code class="text">Get blob availability <pre><code class="text">Get blob availability
Args: Args:
'blob_hash' (optional) : (str) check availability for this blob hash 'blob_hash' : (str) check availability for this blob hash
'search_timeout' (optional) : (int) how long to search for peers for the blob 'search_timeout' : (int) how long to search for peers for the blob
in the dht in the dht
'blob_timeout' (optional) : (int) how long to try downloading from a peer 'blob_timeout' : (int) how long to try downloading from a peer
Returns: Returns:
(dict) { (dict) {
@ -1113,7 +1103,7 @@ Returns:
<pre><code class="text">Delete a blob <pre><code class="text">Delete a blob
Args: Args:
'blob_hash' (optional) : (str) blob hash of the blob to delete 'blob_hash' : (str) blob hash of the blob to delete
Returns: Returns:
(str) Success/fail message (str) Success/fail message
@ -1123,16 +1113,16 @@ Returns:
<pre><code class="text">Download and return a blob <pre><code class="text">Download and return a blob
Args: Args:
'blob_hash' : (str) blob hash of the blob to get 'blob_hash' (required) : (str) blob hash of the blob to get
'timeout' (optional) : (int) timeout in number of seconds 'timeout' : (int) timeout in number of seconds
'encoding' (optional) : (str) by default no attempt at decoding 'encoding' : (str) by default no attempt at decoding
is made, can be set to one of the is made, can be set to one of the
following decoders: following decoders:
'json' 'json'
'payment_rate_manager' (optional) : (str) if not given the default payment rate 'payment_rate_manager' : (str) if not given the default payment rate
manager will be used. manager will be used.
supported alternative rate managers: supported alternative rate managers:
'only-free' 'only-free'
Returns: Returns:
(str) Success/Fail message or (dict) decoded data (str) Success/Fail message or (dict) decoded data
@ -1142,13 +1132,13 @@ Returns:
<pre><code class="text">Returns blob hashes. If not given filters, returns all blobs known by the blob manager <pre><code class="text">Returns blob hashes. If not given filters, returns all blobs known by the blob manager
Args: Args:
'needed' (optional) : (bool) only return needed blobs 'needed' : (bool) only return needed blobs
'finished' (optional) : (bool) only return finished blobs 'finished' : (bool) only return finished blobs
'uri' (optional) : (str) filter blobs by stream in a uri 'uri' : (str) filter blobs by stream in a uri
'stream_hash' (optional) : (str) filter blobs by stream hash 'stream_hash' : (str) filter blobs by stream hash
'sd_hash' (optional) : (str) filter blobs by sd hash 'sd_hash' : (str) filter blobs by sd hash
'page_size' (optional) : (int) results page size 'page_size' : (int) results page size
'page' (optional) : (int) page of results to return 'page' : (int) page of results to return
Returns: Returns:
(list) List of blob hashes (list) List of blob hashes
@ -1168,8 +1158,8 @@ Returns:
<pre><code class="text">Get contents of a block <pre><code class="text">Get contents of a block
Args: Args:
'blockhash' : (str) hash of the block to look up 'blockhash' (required) : (str) hash of the block to look up
'height' : (int) height of the block to look up 'height' (required) : (int) height of the block to look up
Returns: Returns:
(dict) Requested block (dict) Requested block
@ -1179,7 +1169,7 @@ Returns:
<pre><code class="text">Export serialized channel signing information for a given certificate claim id <pre><code class="text">Export serialized channel signing information for a given certificate claim id
Args: Args:
'claim_id' : (str) Claim ID to export information about 'claim_id' (required) : (str) Claim ID to export information about
Returns: Returns:
(str) Serialized certificate information (str) Serialized certificate information
@ -1189,7 +1179,7 @@ Returns:
<pre><code class="text">Import serialized channel signing information (to allow signing new claims to the channel) <pre><code class="text">Import serialized channel signing information (to allow signing new claims to the channel)
Args: Args:
'serialized_certificate_info' (optional) : (str) certificate info 'serialized_certificate_info' : (str) certificate info
Returns: Returns:
(dict) Result dictionary (dict) Result dictionary
@ -1210,8 +1200,8 @@ Returns:
<pre><code class="text">Generate a publisher key and create a new '@' prefixed certificate claim <pre><code class="text">Generate a publisher key and create a new '@' prefixed certificate claim
Args: Args:
'channel_name' : (str) name of the channel prefixed with '@' 'channel_name' (required) : (str) name of the channel prefixed with '@'
'amount' : (float) bid amount on the channel 'amount' (required) : (float) bid amount on the channel
Returns: Returns:
(dict) Dictionary containing result of the claim (dict) Dictionary containing result of the claim
@ -1228,9 +1218,9 @@ Returns:
<pre><code class="text">Abandon a name and reclaim credits from the claim <pre><code class="text">Abandon a name and reclaim credits from the claim
Args: Args:
'claim_id' (optional) : (str) claim_id of the claim to abandon 'claim_id' : (str) claim_id of the claim to abandon
'txid' (optional) : (str) txid of the claim to abandon 'txid' : (str) txid of the claim to abandon
'nout' (optional) : (int) nout of the claim to abandon 'nout' : (int) nout of the claim to abandon
Returns: Returns:
(dict) Dictionary containing result of the claim (dict) Dictionary containing result of the claim
@ -1244,7 +1234,7 @@ Returns:
<pre><code class="text">List current claims and information about them for a given name <pre><code class="text">List current claims and information about them for a given name
Args: Args:
'name' : (str) name of the claim to list info about 'name' (required) : (str) name of the claim to list info about
Returns: Returns:
(dict) State of claims assigned for the name (dict) State of claims assigned for the name
@ -1273,11 +1263,11 @@ Returns:
<pre><code class="text">Get paginated claims in a channel specified by a channel uri <pre><code class="text">Get paginated claims in a channel specified by a channel uri
Args: Args:
'uri' : (str) uri of the channel 'uri' (required) : (str) uri of the channel
'uris' (optional) : (list) uris of the channel 'uris' : (list) uris of the channel
'page' (optional) : (int) which page of results to return where page 1 is the first 'page' : (int) which page of results to return where page 1 is the first
page, defaults to no pages page, defaults to no pages
'page_size' (optional) : (int) number of results in a page, default of 10 'page_size' : (int) number of results in a page, default of 10
Returns: Returns:
{ {
@ -1350,9 +1340,9 @@ Returns:
<pre><code class="text">Support a name claim <pre><code class="text">Support a name claim
Args: Args:
'name' : (str) name of the claim to support 'name' (required) : (str) name of the claim to support
'claim_id' : (str) claim_id of the claim to support 'claim_id' (required) : (str) claim_id of the claim to support
'amount' : (float) amount of support 'amount' (required) : (float) amount of support
Returns: Returns:
(dict) Dictionary containing result of the claim (dict) Dictionary containing result of the claim
@ -1367,8 +1357,8 @@ Returns:
<pre><code class="text">Renew claim(s) or support(s) <pre><code class="text">Renew claim(s) or support(s)
Args: Args:
'outpoint' : (str) outpoint of the claim to renew 'outpoint' (required) : (str) outpoint of the claim to renew
'height' : (str) update claims expiring before or at this block height 'height' (required) : (str) update claims expiring before or at this block height
Returns: Returns:
(dict) Dictionary where key is the the original claim's outpoint and (dict) Dictionary where key is the the original claim's outpoint and
@ -1389,10 +1379,10 @@ Returns:
<pre><code class="text">Send a name claim to an address <pre><code class="text">Send a name claim to an address
Args: Args:
'claim_id' : (str) claim_id to send 'claim_id' (required) : (str) claim_id to send
'address' : (str) address to send the claim to 'address' (required) : (str) address to send the claim to
'amount' (optional) : (int) Amount of credits to claim name for, defaults to the current amount 'amount' : (int) Amount of credits to claim name for, defaults to the current amount
on the claim on the claim
Returns: Returns:
(dict) Dictionary containing result of the claim (dict) Dictionary containing result of the claim
@ -1409,11 +1399,11 @@ Returns:
<pre><code class="text">Resolve claim info from txid/nout or with claim ID <pre><code class="text">Resolve claim info from txid/nout or with claim ID
Args: Args:
'txid' (optional) : (str) look for claim with this txid, nout must 'txid' : (str) look for claim with this txid, nout must
also be specified also be specified
'nout' (optional) : (int) look for claim with this nout, txid must 'nout' : (int) look for claim with this nout, txid must
also be specified also be specified
'claim_id' (optional) : (str) look for claim with this claim id 'claim_id' : (str) look for claim with this claim id
Returns: Returns:
(dict) Dictionary containing claim info as below, (dict) Dictionary containing claim info as below,
@ -1438,12 +1428,12 @@ Returns:
<h2 id="cli_test_command">cli_test_command</h2> <h2 id="cli_test_command">cli_test_command</h2>
<pre><code class="text">This command is only for testing the CLI argument parsing <pre><code class="text">This command is only for testing the CLI argument parsing
Args: Args:
'a_arg' (optional) : a arg 'a_arg' : a arg
'b_arg' (optional) : b arg 'b_arg' : b arg
'pos_arg' : pos arg 'pos_arg' (required) : pos arg
'pos_args' (optional) : pos args 'pos_args' : pos args
'pos_arg2' (optional) : pos arg 2 'pos_arg2' : pos arg 2
'pos_arg3' (optional) : pos arg 3 'pos_arg3' : pos arg 3
Returns: Returns:
pos args pos args
@ -1473,21 +1463,21 @@ Returns:
<pre><code class="text">Delete a LBRY file <pre><code class="text">Delete a LBRY file
Args: Args:
'delete_from_download_dir' (optional) : (bool) delete file from download directory, 'delete_from_download_dir' : (bool) delete file from download directory,
instead of just deleting blobs instead of just deleting blobs
'delete_all' (optional) : (bool) if there are multiple matching files, 'delete_all' : (bool) if there are multiple matching files,
allow the deletion of multiple files. allow the deletion of multiple files.
Otherwise do not delete anything. Otherwise do not delete anything.
'sd_hash' (optional) : (str) delete by file sd hash 'sd_hash' : (str) delete by file sd hash
'file_name' (optional) : (str) delete by file name in downloads folder 'file_name' : (str) delete by file name in downloads folder
'stream_hash' (optional) : (str) delete by file stream hash 'stream_hash' : (str) delete by file stream hash
'rowid' (optional) : (int) delete by file row id 'rowid' : (int) delete by file row id
'claim_id' (optional) : (str) delete by file claim id 'claim_id' : (str) delete by file claim id
'txid' (optional) : (str) delete by file claim txid 'txid' : (str) delete by file claim txid
'nout' (optional) : (int) delete by file claim nout 'nout' : (int) delete by file claim nout
'claim_name' (optional) : (str) delete by file claim name 'claim_name' : (str) delete by file claim name
'channel_claim_id' (optional) : (str) delete by file channel claim id 'channel_claim_id' : (str) delete by file channel claim id
'channel_name' (optional) : (str) delete by file channel claim name 'channel_name' : (str) delete by file channel claim name
Returns: Returns:
(bool) true if deletion was successful (bool) true if deletion was successful
@ -1497,20 +1487,20 @@ Returns:
<pre><code class="text">List files limited by optional filters <pre><code class="text">List files limited by optional filters
Args: Args:
'sd_hash' (optional) : (str) get file with matching sd hash 'sd_hash' : (str) get file with matching sd hash
'file_name' (optional) : (str) get file with matching file name in the 'file_name' : (str) get file with matching file name in the
downloads folder downloads folder
'stream_hash' (optional) : (str) get file with matching stream hash 'stream_hash' : (str) get file with matching stream hash
'rowid' (optional) : (int) get file with matching row id 'rowid' : (int) get file with matching row id
'claim_id' (optional) : (str) get file with matching claim id 'claim_id' : (str) get file with matching claim id
'outpoint' (optional) : (str) get file with matching claim outpoint 'outpoint' : (str) get file with matching claim outpoint
'txid' (optional) : (str) get file with matching claim txid 'txid' : (str) get file with matching claim txid
'nout' (optional) : (int) get file with matching claim nout 'nout' : (int) get file with matching claim nout
'channel_claim_id' (optional) : (str) get file with matching channel claim id 'channel_claim_id' : (str) get file with matching channel claim id
'channel_name' (optional) : (str) get file with matching channel name 'channel_name' : (str) get file with matching channel name
'claim_name' (optional) : (str) get file with matching claim name 'claim_name' : (str) get file with matching claim name
'full_status' (optional) : (bool) full status, populate the 'full_status' : (bool) full status, populate the
'message' and 'size' fields 'message' and 'size' fields
Returns: Returns:
(list) List of files (list) List of files
@ -1550,13 +1540,13 @@ Returns:
<pre><code class="text">Reflect all the blobs in a file matching the filter criteria <pre><code class="text">Reflect all the blobs in a file matching the filter criteria
Args: Args:
'sd_hash' (optional) : (str) get file with matching sd hash 'sd_hash' : (str) get file with matching sd hash
'file_name' (optional) : (str) get file with matching file name in the 'file_name' : (str) get file with matching file name in the
downloads folder downloads folder
'stream_hash' (optional) : (str) get file with matching stream hash 'stream_hash' : (str) get file with matching stream hash
'rowid' (optional) : (int) get file with matching row id 'rowid' : (int) get file with matching row id
'reflector' (optional) : (str) reflector server, ip address or url 'reflector' : (str) reflector server, ip address or url
by default choose a server from the config by default choose a server from the config
Returns: Returns:
(list) list of blobs reflected (list) list of blobs reflected
@ -1566,12 +1556,12 @@ Returns:
<pre><code class="text">Start or stop downloading a file <pre><code class="text">Start or stop downloading a file
Args: Args:
'status' : (str) one of &quot;start&quot; or &quot;stop&quot; 'status' (required) : (str) one of &quot;start&quot; or &quot;stop&quot;
'sd_hash' (optional) : (str) set status of file with matching sd hash 'sd_hash' : (str) set status of file with matching sd hash
'file_name' (optional) : (str) set status of file with matching file name in the 'file_name' : (str) set status of file with matching file name in the
downloads folder downloads folder
'stream_hash' (optional) : (str) set status of file with matching stream hash 'stream_hash' : (str) set status of file with matching stream hash
'rowid' (optional) : (int) set status of file with matching row id 'rowid' : (int) set status of file with matching row id
Returns: Returns:
(str) Confirmation message (str) Confirmation message
@ -1581,9 +1571,9 @@ Returns:
<pre><code class="text">Download stream from a LBRY name. <pre><code class="text">Download stream from a LBRY name.
Args: Args:
'uri' (optional) : (str) uri of the content to download 'uri' : (str) uri of the content to download
'file_name' (optional) : (str) specified name for the downloaded file 'file_name' : (str) specified name for the downloaded file
'timeout' (optional) : (int) download timeout in number of seconds 'timeout' : (int) download timeout in number of seconds
Returns: Returns:
(dict) Dictionary containing information about the stream (dict) Dictionary containing information about the stream
@ -1620,7 +1610,7 @@ Returns:
<pre><code class="text">Return a useful message for an API command <pre><code class="text">Return a useful message for an API command
Args: Args:
'command' (optional) : (str) command to retrieve documentation for 'command' : (str) command to retrieve documentation for
Returns: Returns:
(str) Help message (str) Help message
@ -1630,8 +1620,8 @@ Returns:
<pre><code class="text">Get peers for blob hash <pre><code class="text">Get peers for blob hash
Args: Args:
'blob_hash' : (str) find available peers for this blob hash 'blob_hash' (required) : (str) find available peers for this blob hash
'timeout' (optional) : (int) peer search timeout in seconds 'timeout' : (int) peer search timeout in seconds
Returns: Returns:
(list) List of contacts (list) List of contacts
@ -1654,40 +1644,40 @@ fee, title, description, author, language, license, license_url, thumbnail, prev
or sources. Individual arguments will overwrite the fields specified in metadata argument. or sources. Individual arguments will overwrite the fields specified in metadata argument.
Args: Args:
'name' : (str) name of the content 'name' (required) : (str) name of the content
'bid' : (float) amount to back the claim 'bid' (required) : (float) amount to back the claim
'metadata' (optional) : (dict) ClaimDict to associate with the claim. 'metadata' : (dict) ClaimDict to associate with the claim.
'file_path' (optional) : (str) path to file to be associated with name. If provided, 'file_path' : (str) path to file to be associated with name. If provided,
a lbry stream of this file will be used in 'sources'. a lbry stream of this file will be used in 'sources'.
If no path is given but a sources dict is provided, If no path is given but a sources dict is provided,
it will be used. If neither are provided, an it will be used. If neither are provided, an
error is raised. error is raised.
'fee' (optional) : (dict) Dictionary representing key fee to download content: 'fee' : (dict) Dictionary representing key fee to download content:
{ {
'currency': currency_symbol, 'currency': currency_symbol,
'amount': float, 'amount': float,
'address': str, optional 'address': str, optional
} }
supported currencies: LBC, USD, BTC supported currencies: LBC, USD, BTC
If an address is not provided a new one will be If an address is not provided a new one will be
automatically generated. Default fee is zero. automatically generated. Default fee is zero.
'title' (optional) : (str) title of the publication 'title' : (str) title of the publication
'description' (optional) : (str) description of the publication 'description' : (str) description of the publication
'author' (optional) : (str) author of the publication 'author' : (str) author of the publication
'language' (optional) : (str) language of the publication 'language' : (str) language of the publication
'license' (optional) : (str) publication license 'license' : (str) publication license
'license_url' (optional) : (str) publication license url 'license_url' : (str) publication license url
'thumbnail' (optional) : (str) thumbnail url 'thumbnail' : (str) thumbnail url
'preview' (optional) : (str) preview url 'preview' : (str) preview url
'nsfw' (optional) : (bool) title of the publication 'nsfw' : (bool) title of the publication
'sources' (optional) : (str) {'lbry_sd_hash': sd_hash} specifies sd hash of file 'sources' : (str) {'lbry_sd_hash': sd_hash} specifies sd hash of file
'channel_name' (optional) : (str) name of the publisher channel name in the wallet 'channel_name' : (str) name of the publisher channel name in the wallet
'channel_id' (optional) : (str) claim id of the publisher channel, does not check 'channel_id' : (str) claim id of the publisher channel, does not check
for channel claim being in the wallet. This allows for channel claim being in the wallet. This allows
publishing to a channel where only the certificate publishing to a channel where only the certificate
private key is in the wallet. private key is in the wallet.
'claim_address' (optional) : (str) address where the claim is sent to, if not specified 'claim_address' : (str) address where the claim is sent to, if not specified
new address wil automatically be created new address wil automatically be created
Returns: Returns:
(dict) Dictionary containing result of the claim (dict) Dictionary containing result of the claim
@ -1700,23 +1690,13 @@ Returns:
} }
</code></pre> </code></pre>
<h2 id="report_bug">report_bug</h2>
<pre><code class="text">Report a bug to slack
Args:
'message' : (str) Description of the bug
Returns:
(bool) true if successful
</code></pre>
<h2 id="resolve">resolve</h2> <h2 id="resolve">resolve</h2>
<pre><code class="text">Resolve given LBRY URIs <pre><code class="text">Resolve given LBRY URIs
Args: Args:
'force' (optional) : (bool) force refresh and ignore cache 'force' : (bool) force refresh and ignore cache
'uri' : (str) uri to resolve 'uri' (required) : (str) uri to resolve
'uris' (optional) : (list) uris to resolve 'uris' : (list) uris to resolve
Returns: Returns:
Dictionary of results, keyed by uri Dictionary of results, keyed by uri
@ -1778,8 +1758,8 @@ Returns:
<pre><code class="text">Resolve stream info from a LBRY name <pre><code class="text">Resolve stream info from a LBRY name
Args: Args:
'name' : (str) the name to resolve 'name' (required) : (str) the name to resolve
'force' (optional) : (bool) force refresh and do not check cache 'force' : (bool) force refresh and do not check cache
Returns: Returns:
(dict) Metadata dictionary from name claim, None if the name is not (dict) Metadata dictionary from name claim, None if the name is not
@ -1825,30 +1805,30 @@ Returns:
<pre><code class="text">Set daemon settings <pre><code class="text">Set daemon settings
Args: Args:
'download_directory' (optional) : (str) path of download directory 'download_directory' : (str) path of download directory
'data_rate' (optional) : (float) 0.0001 'data_rate' : (float) 0.0001
'download_timeout' (optional) : (int) 180 'download_timeout' : (int) 180
'peer_port' (optional) : (int) 3333 'peer_port' : (int) 3333
'max_key_fee' (optional) : (dict) maximum key fee for downloads, 'max_key_fee' : (dict) maximum key fee for downloads,
in the format: in the format:
{ {
'currency': &lt;currency_symbol&gt;, 'currency': &lt;currency_symbol&gt;,
'amount': &lt;amount&gt; 'amount': &lt;amount&gt;
}. }.
In the CLI, it must be an escaped JSON string In the CLI, it must be an escaped JSON string
Supported currency symbols: LBC, USD, BTC Supported currency symbols: LBC, USD, BTC
'disable_max_key_fee' (optional) : (bool) False 'disable_max_key_fee' : (bool) False
'use_upnp' (optional) : (bool) True 'use_upnp' : (bool) True
'run_reflector_server' (optional) : (bool) False 'run_reflector_server' : (bool) False
'cache_time' (optional) : (int) 150 'cache_time' : (int) 150
'reflect_uploads' (optional) : (bool) True 'reflect_uploads' : (bool) True
'share_usage_data' (optional) : (bool) True 'share_usage_data' : (bool) True
'peer_search_timeout' (optional) : (int) 3 'peer_search_timeout' : (int) 3
'sd_download_timeout' (optional) : (int) 3 'sd_download_timeout' : (int) 3
'auto_renew_claim_height_delta' (optional) : (int) 0 'auto_renew_claim_height_delta' : (int) 0
claims set to expire within this many blocks will be claims set to expire within this many blocks will be
automatically renewed after startup (if set to 0, renews automatically renewed after startup (if set to 0, renews
will not be made automatically) will not be made automatically)
Returns: Returns:
(dict) Updated dictionary of daemon settings (dict) Updated dictionary of daemon settings
@ -1858,8 +1838,8 @@ Returns:
<pre><code class="text">Get daemon status <pre><code class="text">Get daemon status
Args: Args:
'session_status' (optional) : (bool) include session status in results 'session_status' : (bool) include session status in results
'dht_status' (optional) : (bool) include dht network and peer status 'dht_status' : (bool) include dht network and peer status
Returns: Returns:
(dict) lbrynet-daemon status (dict) lbrynet-daemon status
@ -1909,10 +1889,10 @@ Returns:
<pre><code class="text">Get stream availability for lbry uri <pre><code class="text">Get stream availability for lbry uri
Args: Args:
'uri' : (str) check availability for this uri 'uri' (required) : (str) check availability for this uri
'search_timeout' (optional) : (int) how long to search for peers for the blob 'search_timeout' : (int) how long to search for peers for the blob
in the dht in the dht
'search_timeout' (optional) : (int) how long to try downloading from a peer 'search_timeout' : (int) how long to try downloading from a peer
Returns: Returns:
(dict) { (dict) {
@ -1935,9 +1915,9 @@ Returns:
<pre><code class="text">Get estimated cost for a lbry stream <pre><code class="text">Get estimated cost for a lbry stream
Args: Args:
'uri' : (str) uri to use 'uri' (required) : (str) uri to use
'size' (optional) : (float) stream size in bytes. if provided an sd blob won't be 'size' : (float) stream size in bytes. if provided an sd blob won't be
downloaded. downloaded.
Returns: Returns:
(float) Estimated cost in lbry credits, returns None if uri is not (float) Estimated cost in lbry credits, returns None if uri is not
@ -2000,7 +1980,7 @@ Returns:
<pre><code class="text">Get a decoded transaction from a txid <pre><code class="text">Get a decoded transaction from a txid
Args: Args:
'txid' : (str) txid of the transaction 'txid' (required) : (str) txid of the transaction
Returns: Returns:
(dict) JSON formatted transaction (dict) JSON formatted transaction
@ -2056,9 +2036,9 @@ Returns:
<pre><code class="text">Return the balance of the wallet <pre><code class="text">Return the balance of the wallet
Args: Args:
'address' (optional) : (str) If provided only the balance for this 'address' : (str) If provided only the balance for this
address will be given address will be given
'include_unconfirmed' (optional) : (bool) Include unconfirmed 'include_unconfirmed' : (bool) Include unconfirmed
Returns: Returns:
(float) amount of lbry credits in wallet (float) amount of lbry credits in wallet
@ -2079,7 +2059,7 @@ Returns:
the password the password
Args: Args:
'new_password' : (str) password string to be used for encrypting wallet 'new_password' (required) : (str) password string to be used for encrypting wallet
Returns: Returns:
(bool) true if wallet is decrypted, otherwise false (bool) true if wallet is decrypted, otherwise false
@ -2089,7 +2069,7 @@ Returns:
<pre><code class="text">Checks if an address is associated with the current wallet. <pre><code class="text">Checks if an address is associated with the current wallet.
Args: Args:
'address' : (str) address to check 'address' (required) : (str) address to check
Returns: Returns:
(bool) true, if address is associated with current wallet (bool) true, if address is associated with current wallet
@ -2119,9 +2099,9 @@ Returns:
<pre><code class="text">Create new addresses, each containing `amount` credits <pre><code class="text">Create new addresses, each containing `amount` credits
Args: Args:
'no_broadcast' (optional) : (bool) whether to broadcast or not 'no_broadcast' : (bool) whether to broadcast or not
'num_addresses' : (int) num of addresses to create 'num_addresses' (required) : (int) num of addresses to create
'amount' : (float) initial amount in each address 'amount' (required) : (float) initial amount in each address
Returns: Returns:
(dict) the resulting transaction (dict) the resulting transaction
@ -2131,7 +2111,7 @@ Returns:
<pre><code class="text">Get public key from wallet address <pre><code class="text">Get public key from wallet address
Args: Args:
'address' : (str) address for which to get the public key 'address' (required) : (str) address for which to get the public key
Returns: Returns:
(list) list of public keys associated with address. (list) list of public keys associated with address.
@ -2144,9 +2124,9 @@ to the owner of a claim specified by uri. A tip is a claim support where the rec
of the support is the claim address for the claim being supported. of the support is the claim address for the claim being supported.
Args: Args:
'amount' : (float) amount of credit to send 'amount' (required) : (float) amount of credit to send
'address' : (str) address to send credits to 'address' (required) : (str) address to send credits to
'claim_id' : (float) claim_id of the claim to send to tip to 'claim_id' (required) : (float) claim_id of the claim to send to tip to
Returns: Returns:
If sending to an address: If sending to an address:
@ -2165,7 +2145,7 @@ Returns:
<pre><code class="text">Unlock an encrypted wallet <pre><code class="text">Unlock an encrypted wallet
Args: Args:
'password' : (str) password for unlocking wallet 'password' (required) : (str) password for unlocking wallet
Returns: Returns:
(bool) true if wallet is unlocked, otherwise false (bool) true if wallet is unlocked, otherwise false
@ -2229,18 +2209,6 @@ Returns:
</div> </div>
<div class="md-footer-social">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://github.com/lbryio" class="md-footer-social__link fa fa-github"></a>
<a href="https://twitter.com/lbryio" class="md-footer-social__link fa fa-twitter"></a>
<a href="https://facebook.com/lbryio" class="md-footer-social__link fa fa-facebook"></a>
</div>
</div> </div>
</div> </div>

File diff suppressed because one or more lines are too long

View file

@ -3,21 +3,21 @@ repo_url: https://github.com/lbryio/lbry
pages: pages:
- "API": index.md - "API": index.md
- "CLI": cli.md - "CLI": cli.md
theme: material
site_dir: docs site_dir: docs
docs_dir: docs_build docs_dir: docs_build
google_analytics: google_analytics:
- 'UA-60403362-1' - 'UA-60403362-1'
- 'auto' - 'auto'
extra: theme:
name: material
palette: palette:
primary: 'teal' primary: 'teal'
accent: 'green' accent: 'green'
logo: 'images/lbry-white.svg' # logo: 'images/lbry-white.svg'
social: social:
- type: 'github' - type: 'github'
link: 'https://github.com/lbryio' link: 'https://github.com/lbryio'
- type: 'twitter' - type: 'twitter'
link: 'https://twitter.com/lbryio' link: 'https://twitter.com/lbryio'
- type: 'facebook' - type: 'facebook'
link: 'https://facebook.com/lbryio' link: 'https://facebook.com/lbryio'

39
scripts/gen_docs.py Normal file → Executable file
View file

@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Generate docs: python gen_api_docs.py # Generate docs: python gen_api_docs.py
@ -8,12 +9,16 @@ import re
import inspect import inspect
import subprocess import subprocess
import os import os
import sys
from lbrynet.daemon.Daemon import Daemon from lbrynet.daemon.Daemon import Daemon
try: import pip
import mkdocs installed_packages = [package.project_name for package in pip.get_installed_distributions()]
except ImportError:
raise ImportError("mkdocs is not installed") for package in ["mkdocs", "mkdocs-material"]:
if package not in installed_packages:
print "'" + package + "' is not installed"
sys.exit(1)
try: try:
from tabulate import tabulate from tabulate import tabulate
@ -24,7 +29,7 @@ INDENT = " "
REQD_CMD_REGEX = r"\(.*?=<(?P<reqd>.*?)>\)" REQD_CMD_REGEX = r"\(.*?=<(?P<reqd>.*?)>\)"
OPT_CMD_REGEX = r"\[.*?=<(?P<opt>.*?)>\]" OPT_CMD_REGEX = r"\[.*?=<(?P<opt>.*?)>\]"
CMD_REGEX = r"--.*?(?P<cmd>.*?)[=,\s,<]" CMD_REGEX = r"--.*?(?P<cmd>.*?)[=,\s,<]"
DOCS_DIR = "docs_build" DOCS_BUILD_DIR = "docs_build" # must match mkdocs.yml
def _cli_tabulate_options(_options_docstr, method): def _cli_tabulate_options(_options_docstr, method):
@ -167,9 +172,12 @@ def _api_doc(obj):
def main(): def main():
curdir = os.path.dirname(os.path.realpath(__file__)) root_dir = os.path.dirname(os.path.dirname(__file__))
api_doc_path = os.path.realpath(os.path.join(curdir, '..', DOCS_DIR, 'index.md')) build_dir = os.path.realpath(os.path.join(root_dir, DOCS_BUILD_DIR))
cli_doc_path = os.path.realpath(os.path.join(curdir, '..', DOCS_DIR, 'cli.md')) if not os.path.exists(build_dir):
os.makedirs(build_dir)
api_doc_path = os.path.join(build_dir, 'index.md')
cli_doc_path = os.path.join(build_dir, 'cli.md')
_api_docs = '' _api_docs = ''
_cli_docs = '' _cli_docs = ''
@ -186,12 +194,13 @@ def main():
with open(cli_doc_path, 'w+') as f: with open(cli_doc_path, 'w+') as f:
f.write(_cli_docs) f.write(_cli_docs)
try:
subprocess.check_output("exec mkdocs build", cwd=root_dir, shell=True)
except subprocess.CalledProcessError as e:
print e.output
return 1
return 0
if __name__ == '__main__': if __name__ == '__main__':
cwd = os.path.dirname(os.path.realpath(__file__)) sys.exit(main())
cwd = os.path.realpath(os.path.join(cwd, ".."))
directory = os.path.join(cwd, "docs_build")
if not os.path.exists(directory):
os.makedirs(directory)
proc = subprocess.Popen("exec mkdocs build", cwd=cwd, shell=True)
proc.kill()