Home Library CLI

From Gcube Wiki
Jump to: navigation, search

Introduction

The Home Library CLI is a Java library providing command line interface to Home Library WebApp.

This CLI library has following features:

  • Create Folder: to create a folder in the root or in a subfolder.
  • List Folder: to list the content of a specific folder.
  • Upload a file: to upload a file in given folder.
  • Remove files and folders: to remove a file or a folder (including subforders).
  • Test: a simple test to check the correct behavior of the features above.

The following sections will discuss each of these commands in turn, and discuss how to use them with Home Library CLI.

Option Properties

Usage

Prerequisites

Home Library CLI is a self-runnable jar, you only need a Java 7 JDK. Download the latest release from the here or by clicking this link: xxx

Start

After downloading the Home Library CLI jar just start it as follows:

java -jar home-library-cli-1.0.0-SNAPSHOT-jar-with-dependencies.jar

This starts the library and writes some help lines.

Run the Test

java -jar home-library-cli-1.0.0-SNAPSHOT-jar-with-dependencies.jar test

Create a Folder

java -jar home-library-cli-1.0.0-SNAPSHOT-jar-with-dependencies.jar mkdir myFolder

Save a file

java -jar home-library-cli-1.0.0-SNAPSHOT-jar-with-dependencies.jar put home/user/Downloads/image.jpg myFolder

List a Folder

java -jar home-library-cli-1.0.0-SNAPSHOT-jar-with-dependencies.jar ls myFolder

Remove a file

java -jar home-library-cli-1.0.0-SNAPSHOT-jar-with-dependencies.jar rm myFolder/image.jpg

Remove a folder

java -jar home-library-cli-1.0.0-SNAPSHOT-jar-with-dependencies.jar rm myFolder

Release