faq prettification

This commit is contained in:
Alex Grintsvayg 2016-06-21 20:58:01 -04:00
parent 8fdb540a09
commit f6225d67e7
13 changed files with 60 additions and 32 deletions

View file

@ -152,6 +152,11 @@ class Post
return $this->author !== null; return $this->author !== null;
} }
public function hasDate()
{
return $this->date !== null;
}
public function getAuthorName() public function getAuthorName()
{ {
switch(strtolower($this->author)) switch(strtolower($this->author))

View file

@ -1,6 +1,5 @@
--- ---
title: How do I see the list of API functions I can call, and how do I call them? title: How do I see the list of API functions I can call, and how do I call them?
date: '2015-06-21 16:00:00'
--- ---
Here is an example script to get the documentation for the various API calls. To use any of the functions displayed, just provide any specified arguments in a dictionary. Here is an example script to get the documentation for the various API calls. To use any of the functions displayed, just provide any specified arguments in a dictionary.
@ -15,7 +14,7 @@ Note: the lbry api can only be used while either the app or lbrynet-daemon comma
except: except:
print "You don't have lbrynet installed!" print "You don't have lbrynet installed!"
sys.exit(0) sys.exit(0)
api = JSONRPCProxy.from_url(API_CONNECTION_STRING) api = JSONRPCProxy.from_url(API_CONNECTION_STRING)
if not api.is_running(): if not api.is_running():
print api.daemon_status() print api.daemon_status()

View file

@ -1,10 +1,13 @@
--- ---
title: How do I specify a web-UI to use? title: How do I specify a web-UI to use?
date: '2015-06-21 16:00:00'
--- ---
If the files for the UI you'd like to use are storred locally on your computer, start lbry with the --ui flag: `lbrynet-daemon --ui=/full/path/to/ui/files/root/folder` If the files for the UI you'd like to use are stored locally on your computer, start lbry with the `--ui` flag:
Note, once set with the UI flag the given UI will be cached by lbry and used as the default going forward. Also, it will only successfully load a UI if it contains a conforming requirements.txt file to specify required lbrynet and lbryum versions. [Here](https://github.com/lbryio/lbry-web-ui/blob/master/dist/requirements.txt) is an example requirements.txt file. lbrynet-daemon --ui=/full/path/to/ui/files/root/folder
To reset your ui to pull from lbryio, or to try a UI still in development, run lbry with the --branch flag: `lbrynet=daemon --branch=master` Once set with the UI flag, the given UI will be cached by lbry and used as the default going forward. Also, it will only successfully load a UI if it contains a conforming requirements.txt file to specify required lbrynet and lbryum versions. [Here](https://github.com/lbryio/lbry-web-ui/blob/master/dist/requirements.txt) is an example requirements.txt file.
To reset your ui to pull from lbryio, or to try a UI still in development, run lbry with the `--branch` flag:
lbrynet=daemon --branch=master

View file

@ -1,19 +1,20 @@
--- ---
title: How do I get LBRY for development title: How do I get LBRY for development
date: '2015-06-21 16:00:00'
--- ---
In order to run lbry from command line, you need more than the packaged app/deb. #### On Linux
####On OS X LBRY is installed into `/usr/share/python/lbrynet`. The executables are in
`/usr/share/python/lbrynet/bin`. For example, to run lbrynet-daemon, type:
You can install LBRY command line by running `curl -sL https://rawgit.com/lbryio/lbry-setup/master/lbry_setup_osx.sh | sudo bash` in a terminal. This script will install lbrynet and its dependancies, as well as the app. /usr/share/python/lbrynet/bin/lbry
####On Linux
On Ubuntu or Mint you can install the prerequisites and lbrynet by running
sudo apt-get install libgmp3-dev build-essential python2.7 python2.7-dev python-pip #### On OS X
git clone https://github.com/lbryio/lbry.git
cd lbry On OS X, you need more than the packaged app. You can install LBRY command line by running this in a terminal:
sudo python setup.py install
curl -sL https://raw.githubusercontent.com/lbryio/lbry-setup/master/lbry_setup_osx.sh | sudo bash
This script will install lbrynet and its dependancies, as well as the app.

View file

@ -1,8 +1,9 @@
--- ---
title: How do I run LBRY with lbrycrdd? title: How do I run LBRY with lbrycrdd?
date: '2015-06-21 16:00:00'
--- ---
Start lbry with the --wallet flag set: `lbrynet-daemon --wallet=lbrycrd` Start lbry with the `--wallet flag` set:
Note: when you change the wallet it is persistant until you specify you want to use another wallet - lbryum - with the --wallet flag again. lbrynet-daemon --wallet=lbrycrd
Note: when you change the wallet, it is persistant until you specify you want to use another wallet - lbryum - with the --wallet flag again.

View file

@ -1,6 +1,5 @@
--- ---
title: How do I run lbry from command line? title: How do I run lbry from command line?
date: '2015-06-21 16:00:00'
--- ---
In a terminal window, run `lbrynet-daemon`. In a terminal window, run `lbrynet-daemon`.

View file

@ -1,6 +1,5 @@
--- ---
title: How do I stop lbry from the command line? title: How do I stop lbry from the command line?
date: '2015-06-21 16:00:00'
--- ---
You can ctrl-c or run `stop-lbrynet-daemon` You can ctrl-c or run `stop-lbrynet-daemon`

View file

@ -1,6 +1,5 @@
--- ---
title: Is LBRY Open Source? title: Is LBRY Open Source?
date: '2015-05-24 16:00:00'
--- ---
All of the code we have written for LBRY is open source - even this very website! You can access it on [GitHub](https://github.com/lbryio/). All of the code we have written for LBRY is open source - even this very website! You can access it on [GitHub](https://github.com/lbryio/).

View file

@ -1,6 +1,5 @@
--- ---
title: Where are all the behind the scenes files? title: Where are all the behind the scenes files?
date: '2015-06-21 16:00:00'
--- ---
On linux, the relevant directories are `~/.lbrynet`, `~/.lbrycrd`, and `~/.lbryum`, depending on which wallets you've used. On OS X, the folders of interest are `~/Library/Application Support/LBRY`, `~/.lbrycrd` and `~/.lbryum`, also depending on which wallets you've used. On linux, the relevant directories are `~/.lbrynet`, `~/.lbrycrd`, and `~/.lbryum`, depending on which wallets you've used. On OS X, the folders of interest are `~/Library/Application Support/LBRY`, `~/.lbrycrd` and `~/.lbryum`, also depending on which wallets you've used.

View file

@ -1,6 +1,7 @@
--- ---
title: How can I see the log in the terminal? title: How can I see the log in the terminal?
date: '2015-06-21 16:00:00'
--- ---
Run lbry with the --log-to-console flag set: `lbrynet-daemon --log-to-console` Run lbry with the `--log-to-console` flag set:
lbrynet-daemon --log-to-console

View file

@ -9,8 +9,10 @@
<h1><?php echo htmlentities($post->getTitle()) ?></h1> <h1><?php echo htmlentities($post->getTitle()) ?></h1>
<div class="meta spacer1"> <div class="meta spacer1">
<?php echo $post->getAuthorName() ?> <?php echo $post->getAuthorName() ?>
<?php echo $post->hasAuthor() ? '&bull;' : '' ?> <?php echo $post->hasAuthor() && $post->hasDate() ? '&bull;' : '' ?>
<span title="<?php echo $post->getDate()->format('F jS, Y') ?>"><?php echo $post->getDate()->format('M j') ?></span> <?php if ($post->hasDate()): ?>
<span title="<?php echo $post->getDate()->format('F jS, Y') ?>"><?php echo $post->getDate()->format('M j') ?></span>
<?php endif ?>
</div> </div>
</div> </div>
</header> </header>
@ -27,10 +29,10 @@
<div class="prev span6"> <div class="prev span6">
<?php if ($prevPost = $post->getPrevPost()): ?> <?php if ($prevPost = $post->getPrevPost()): ?>
<div class="prev-next-label"> <div class="prev-next-label">
<a href="<?php echo $prevPost->getRelativeUrl() ?>" class="link-primary"> Previous</a> <a href="/<?php echo $prevPost->getRelativeUrl() ?>" class="link-primary"> Previous</a>
</div> </div>
<div class="meta"> <div class="meta">
<a href="<?php echo $prevPost->getRelativeUrl() ?>"> <a href="/<?php echo $prevPost->getRelativeUrl() ?>">
<?php echo htmlentities($prevPost->getTitle()) ?> <?php echo htmlentities($prevPost->getTitle()) ?>
</a> </a>
</div> </div>
@ -39,10 +41,10 @@
<div class="next span6"> <div class="next span6">
<?php if ($nextPost = $post->getNextPost()): ?> <?php if ($nextPost = $post->getNextPost()): ?>
<div class="prev-next-label"> <div class="prev-next-label">
<a href="<?php echo $nextPost->getRelativeUrl() ?>" class="link-primary">Next </a> <a href="/<?php echo $nextPost->getRelativeUrl() ?>" class="link-primary">Next </a>
</div> </div>
<div class="meta"> <div class="meta">
<a class="prev-next-title" href="<?php echo $nextPost->getRelativeUrl() ?>"> <a class="prev-next-title" href="/<?php echo $nextPost->getRelativeUrl() ?>">
<?php echo htmlentities($nextPost->getTitle()) ?> <?php echo htmlentities($nextPost->getTitle()) ?>
</a> </a>
</div> </div>

View file

@ -32,7 +32,6 @@ body
} }
iframe, img { max-width: 100%; } iframe, img { max-width: 100%; }
iframe { margin: 0 auto; display: block; } iframe { margin: 0 auto; display: block; }
code { font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif; }
h1, h2, h3, h4, h5, h6 h1, h2, h3, h4, h5, h6
{ {

View file

@ -1,4 +1,25 @@
@import "global"; @import "global";
pre, code
{
background-color: #f1f1f1;
}
code
{
padding: 3px 5px;
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif;
font-size: 90%;
color: darken($color-primary, 10%);
}
pre
{
margin-bottom: $spacing-vertical;
border-left: .3rem solid $color-primary;
padding: 10px 20px;
white-space: pre-wrap;
}
.code-bash .code-bash
{ {
-webkit-user-select: text; -webkit-user-select: text;