Skip to content

Commit

Permalink
Merge pull request #31 from betatim/update-docs
Browse files Browse the repository at this point in the history
[MRG] Update README
  • Loading branch information
betatim committed Apr 27, 2017
2 parents fe98fa1 + 60e79df commit 42b5e51
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,36 @@ command-line program.
Below some examples on how to use it:
```
# list all files for a public project
$ osf ls <projectid>
$ osf -p <projectid> ls
# list all files for a private project
$ osf -u yourOSFacount@example.com ls <projectid>
# set $OSF_PASSWORD to provide the password
$ osf -p <projectid> -u yourOSFacount@example.com ls
# fetch all files from a project and store them in `output_directory`
$ osf clone <projectid> [output_directory]
$ osf -p <projectid> clone [output_directory]
# create a new file in an OSF project
$ osf -u yourOSFacount@example.com upload <projectid> local/file.txt remote/path.txt
$ osf -p <projectid> -u yourOSFacount@example.com upload local/file.txt remote/path.txt
# download a single file from an OSF project
$ osf fetch <projectid> remote/path.txt local/file.txt
$ osf -p <projectid> fetch remote/path.txt local/file.txt
```

If the project is private you will need to provide authentication details.
You can provide your OSF account name as command-line argument (see the
`osf upload` example) or set the `OSF_USERNAME` environment variable. The
password will be retrieved from the `OSF_PASSWORD` environment variable.

You can set a default values by using a configuration file in the current
directory. To set the username and project ID create `.osfcli.config`:
```
[osf]
username = yourOSFaccount@example.com
project = 9zpcy
```
after which you can simply run `osf ls` to list the contents of the project.


# Contributing

Expand Down
15 changes: 6 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from setuptools import setup


setup(
Expand All @@ -15,7 +15,7 @@
# Author details
author='The OSF-cli authors',
# Choose your license
license='LGPL',
license='BSD3',

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
Expand All @@ -24,23 +24,20 @@
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',

'Environment :: Console',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',

'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'License :: OSI Approved :: BSD License',
'Topic :: Utilities'
],

# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=['osfclient'],

# Alternatively, if you want to distribute just a my_module.py, uncomment
# this:
# py_modules=["my_module"],

# List run-time dependencies here. These will be installed by pip when
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
Expand Down

0 comments on commit 42b5e51

Please sign in to comment.