raisin:usage
Last edited by rjmb 1101 days ago.

the client

quick uploads

if you run the client with an URL for an argument, it will create a URL-redirect key for that URL. if you run the client with a single filepath, it will upload that file as a new filekey. if you run the client with a series of filepaths, it will upload each file as a filekey and create a collection key for all the files. for each of these, it will report the url after the upload is finished. in windows, you can drag files onto the executeable.

interactive mode

once you've configured the client appropriately, run the client with no arguments and you'll see a login prompt that will look something like:

yourdomain> 

this means you're logged in and your session is valid. from here, you can do any number of commands listed below. if you ever forget the syntax for a command or a commandname, just use 'help' or '?' to list the commands. then, use "help commandname" when you find the appropriate command to look up. this will display a detailed help listing for that command.

in this command listing, the < and > characters denote a required field. the ( and ) characters denote an optional field. a set of elipses, "..." denotes the ability to add as many of the optional fields to the commandline as necessary. within the client itself, an optional field is denoted by the open-brackets and close-brackets.

all client information; the url, the session id, and the key database is stored in '.b.session' in your home directory. if you use windows, it will be located in 'Documents And Settings/username/.b.session'

> blacklist <key> (key) ...

(or 'bl' for short)

prevent a certain IP or IP mask from downloading a file denoted by <key>. see the 'matching' section at the bottom for mask details. see "variable entry" at the bottom for details on entering data for this limit-type.

> collection <key>

a collection is a grouping of either file or url keys. (or both.) there are two types of collections; member collections and tag collections.

a member collection is a collection that has key members set by the user specifically. using the above command will create a collection with the specified <key> and ask for individual keys to add into the collection. if no keys are entered, it will create an empty collection. see "variable entry" at the bottom for details on entering members for this type of collection.

a tag collection is a collection that has 'tags'. use the tags command to enter tags for a collection, specifying each tag with a starting '+' or '-' to signify adding or subtracting members with the tag following the sign. for instance, if a collection had the tags '+butterscotch', '-cherry', and '+potato' .. the collection would be made to contain first all keys that have a tag 'butterscotch', then all the keys with the tag 'cherry' would be removed, and finally, the keys with the tag 'potato' would be added. only collections can have tags starting with '+' or '-'. actually populating a collection is done through the tagsync command.

> comment <key> <comment>

set the comment field on <key> to <comment>.

> comment test a b c 1 2 3
would set the comment on key 'test' to 'a b c 1 2 3'.

> exit

(or 'quit')

exits the client without ending your login session.

> expire <timecode> <key> (key) ...

expire all specified keys at <timecode>.

<timecode> is series of number/letter pairs, the number showing the number of (d)ays, (h)ours, (m)inutes, or (s)econds.set expire to 0 to delete expire limit. a timecode of "2h" would set the expiration for 2 hours. a timecode of "4d3h10m2s" would expire the key in 4 days, 3 hours, 10 minutes, and 2 seconds from now.

> help (commandname)

shows help command summary or detailed help for (commandname).

> lock on <key> (key) ...

prevents use of specified keys. (changing 'on' to 'off' turns off a lock for specified keys.)

> logout

exit the client and end the session, forcing a login at next startup.

> ls (filter regex)

lists all current keys and collections. (filter regex) is a regular expression to filter the results. for instance, if you're looking for a key containing a file called butterscotch.mp3, you could use the filter 'uttersco' and it would match the filename of the key you're searching for.

if you see this:

+ retrieving key dataset, please wait

it means the client has not yet retrieved a starting dataset of the current keys. this can take longer to retrieve than most commands as all the key data is being transferred to the client. once it has been transferred, the client will use this data as a starting point for any further queries and update it as necessary. data is retrieved fresh at the start of each new session, but remains active for any currently active session.

> mv <key> <key-destination>

moves <key> to <key-destination>. (requires the existence of <key> and the non-existence of <key-destination>)

> refer <key> (key) ...

limits all specified keys to a set of referrers. see "variable entry" at the bottom for details on entering data for this limit-type.

> rm <key> (key) ...

permanently delete all specified keys.

> tags <key> (key) ...

sets the tags variable for all specified keys. see "variable entry" at the bottom for details on entering data for this limit-type.

> tagsync (key)

force reconstruction of tag collections for all (or single specified ) collection keys.

> upload </path/to/filename>

autogenerate a key and upload /path/to/filename.

> url <http://url.to/key>

autogenerate a key and create key for <http://url.to/key>

> uses <# of uses> <key> (key) ...

limits specified keys to # of uses. to un-set this limit, set their use '0' and the limit will be reset and removed.

> view <key>

view all informative details of <key>.

> whitelist <key> (key) ...

(or 'wl' for short)

allow a certain IP or IP mask to download a file denoted by <key>. see the 'matching' section at the bottom for mask details. whitelisting circumvents all other limits. see "variable entry" at the bottom for details on entering data for this limit-type.

variable entry

if a command requires variable entry, it will prompt you with something like

command:

and you enter each variable one at a time, pressing enter to signify the end of the variable and the desire to start a new one. once you have finished entering variables, press enter on a blank prompt and the client will see that you have ended variable entry. in the case of limits, you can un-set a limit placed on a key by pressing enter on a blank first line.

special note for windows users

cutting and pasting within the text window can be problematic if you do not change the settings on the application. right-click the titlebar and select 'Properties'.. then, select the radio-button value on the right side for "Quick Edit mode" and apply/ok out of the menu. now, instead of the usual rigamarole, you can just left-click to highlight, right-click once to copy, then right-click again to paste. easy as pie.