Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Update README #31

Merged
merged 2 commits into from
Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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