Devel Tokens

Click a token to insert it into the field you've last clicked.
Token Value
[node:author] seedadmin
[node:author:account-name] seedadmin
[node:author:created] Tue, 11/26/2019 - 22:22
[node:author:created:fallback] Tue, 11/26/2019 - 22:22
[node:author:created:foldershare_date_time] 11/26/19 10:22 PM
[node:author:created:html_date] 2019-11-26
[node:author:created:html_datetime] 2019-11-26T22:22:25-0800
[node:author:created:html_month] 2019-11
[node:author:created:html_time] 22:22:25
[node:author:created:html_week] 2019-W48
[node:author:created:html_year] 2019
[node:author:created:html_yearless_date] 11-26
[node:author:created:long] Tuesday, November 26, 2019 - 22:22
[node:author:created:medium] Tue, 11/26/2019 - 22:22
[node:author:created:raw] 1574835745
[node:author:created:short] 11/26/2019 - 22:22
[node:author:created:since] 1 year 8 months
[node:author:name] seedadmin
[node:author:display-name] seedadmin
[node:author:edit-url] http://seedmelab.cushion3.sdsc.edu/user/1/edit
[node:author:mail] amit@sdsc.edu
[node:author:last-login] Thu, 08/12/2021 - 12:03
[node:author:last-login:fallback] Thu, 08/12/2021 - 12:03
[node:author:last-login:foldershare_date_time] 8/12/21 12:03 PM
[node:author:last-login:html_date] 2021-08-12
[node:author:last-login:html_datetime] 2021-08-12T12:03:15-0700
[node:author:last-login:html_month] 2021-08
[node:author:last-login:html_time] 12:03:15
[node:author:last-login:html_week] 2021-W32
[node:author:last-login:html_year] 2021
[node:author:last-login:html_yearless_date] 08-12
[node:author:last-login:long] Thursday, August 12, 2021 - 12:03
[node:author:last-login:medium] Thu, 08/12/2021 - 12:03
[node:author:last-login:raw] 1628794995
[node:author:last-login:short] 08/12/2021 - 12:03
[node:author:last-login:since] 1 week 5 days
[node:author:roles] authenticated, data_manager, administrator
[node:author:roles:count] 3
[node:author:roles:first] authenticated
[node:author:roles:keys] authenticated, data_manager, administrator
[node:author:roles:keys:count] 3
[node:author:roles:keys:first] authenticated
[node:author:roles:keys:last] administrator
[node:author:roles:keys:reversed] administrator, data_manager, authenticated
[node:author:roles:last] administrator
[node:author:roles:reversed] administrator, data_manager, authenticated
[node:author:roles:reversed:count] 3
[node:author:roles:reversed:first] administrator
[node:author:roles:reversed:keys] administrator, data_manager, authenticated
[node:author:roles:reversed:last] authenticated
[node:author:url] http://seedmelab.cushion3.sdsc.edu/user/1
[node:author:url:absolute] http://seedmelab.cushion3.sdsc.edu/user/1
[node:author:url:args] , user, 1
[node:author:url:args:count] 2
[node:author:url:args:first] user
[node:author:url:args:keys] 0, 1
[node:author:url:args:last] 1
[node:author:url:args:reversed] 1, user
[node:author:url:brief] seedmelab.cushion3.sdsc.edu/user/1
[node:author:url:path] /user/1
[node:author:url:relative] /user/1
[node:author:url:unaliased] http://seedmelab.cushion3.sdsc.edu/user/1
[node:author:url:unaliased:absolute] http://seedmelab.cushion3.sdsc.edu/user/1
[node:author:url:unaliased:args] , user, 1
[node:author:url:unaliased:brief] seedmelab.cushion3.sdsc.edu/user/1
[node:author:url:unaliased:path] /user/1
[node:author:url:unaliased:relative] /user/1
[node:author:uid] 1
[node:body]
Terminal

Web services via REST are configured on this site, foldershare client is provided which includes both an API and a command line utility. You may use this client to manage data from a terminal or create scripts for automation.

Command line setup

  1. Check and install php if needed as noted here.
  2. Download and unzip the foldershare php client (requires PHP 7.2+).
  3. #fetch foldershare php client from project website
    curl -O https://seedmelab.org/sites/default/files/downloads/foldershare_php_client.1.1.0.tar.gz
    unzip foldershare_php_client.1.1.0.tar.gz
    cd foldershare_php_client.1.1.0
    
  4. Type "./foldershare --help" in a terminal window to get help. You must have php in your path or type
     /full/path/to/php ./foldershare --help

FolderShare client command set

You will need this temporary site's host name and your user name and password in order to connect to this site. For instance, you can list top level folders like this:

./foldershare --host hostname --username login --password password  ls /

Many Linux-style file and folder commands are supported, such as:

  • "ls" to list a folder's contents.
  • "stat" to get the status of a file or folder.
  • "mkdir" to make a new folder.
  • "rm" to remove a file or folder tree.
  • "rmdir" to remove an empty folder.
  • "cp" to copy a file or folder.
  • "mv" to move a file or folder.

There are a few more commands particular to web services, such as:

  • "download" to download a file or folder.
  • "upload" to upload a file or folder.
  • "update" to add or change a file or folder's description.

FolderShare shell for interactive usage

Login to the site, this will drop the user in a foldershare shell, which enables easier manual interaction.

./foldershare --host hostname \
              --username login \
              --password password 

Create a new folder say "myfolder" at the top level (Will be available under Personal files when visited via the web browser).

foldershare> mkdir --help
foldershare> mkdir /myfolder

Upload a local file to the site using the "upload" command .

foldershare> upload --help

# Upload a file showing progress and preserving local timestamps
foldershare> upload -v -p /full/localpath/omega.zip /myfolder

# Upload missing files from local folder to remote destination 
foldershare> upload -v --sync /full/localpath/omega.zip /myfolder

Add a description to a file using the "update" command.

foldershare> update --help

# Add a description to a file
foldershare> update description 'this is metadata' /myfolder/omega.zip

Download a folder using the "download" command, this download the contents.

foldershare> download --help

# Download remote folder with progress display and preserve timestamps
foldershare> download -v -p /myfolder /full/localpath

# Download missing local files/folders from remote destination
foldershare> download -v -p /myfolder /full/localpath

 

Scripted usage example

Create a variable to hold the following information.

prefix="./foldershare --host hostname --username login --password password"

Create a new folder say "myfolder" at the top level (Will be available under Personal files when visited via the web browser).

$prefix mkdir /myfolder

Upload a local file to the site using the upload command.

$prefix upload -v -p /full/localpath/omega.zip /myfolder

Add a description to a file using the update command.

$prefix update description 'this is metadata' /myfolder/omega.zip

Download a folder using the "download" command, this download the contents.

$prefix download -v -p /myfolder /full/localpath
[node:book]
[node:book:author:account-name] seedadmin
[node:book:author:created] Tue, 11/26/2019 - 22:22
[node:book:author:created:fallback] Tue, 11/26/2019 - 22:22
[node:book:author:created:foldershare_date_time] 11/26/19 10:22 PM
[node:book:author:created:html_date] 2019-11-26
[node:book:author:created:html_datetime] 2019-11-26T22:22:25-0800
[node:book:author:created:html_month] 2019-11
[node:book:author:created:html_time] 22:22:25
[node:book:author:created:html_week] 2019-W48
[node:book:author:created:html_year] 2019
[node:book:author:created:html_yearless_date] 11-26
[node:book:author:created:long] Tuesday, November 26, 2019 - 22:22
[node:book:author:created:medium] Tue, 11/26/2019 - 22:22
[node:book:author:created:raw] 1574835745
[node:book:author:created:short] 11/26/2019 - 22:22
[node:book:author:created:since] 1 year 8 months
[node:book:author:name] seedadmin
[node:book:author:display-name] seedadmin
[node:book:author:edit-url] http://seedmelab.cushion3.sdsc.edu/user/1/edit
[node:book:author:mail] amit@sdsc.edu
[node:book:author:last-login] Thu, 08/12/2021 - 12:03
[node:book:author:last-login:fallback] Thu, 08/12/2021 - 12:03
[node:book:author:last-login:foldershare_date_time] 8/12/21 12:03 PM
[node:book:author:last-login:html_date] 2021-08-12
[node:book:author:last-login:html_datetime] 2021-08-12T12:03:15-0700
[node:book:author:last-login:html_month] 2021-08
[node:book:author:last-login:html_time] 12:03:15
[node:book:author:last-login:html_week] 2021-W32
[node:book:author:last-login:html_year] 2021
[node:book:author:last-login:html_yearless_date] 08-12
[node:book:author:last-login:long] Thursday, August 12, 2021 - 12:03
[node:book:author:last-login:medium] Thu, 08/12/2021 - 12:03
[node:book:author:last-login:raw] 1628794995
[node:book:author:last-login:short] 08/12/2021 - 12:03
[node:book:author:last-login:since] 1 week 5 days
[node:book:author:roles] authenticated, data_manager, administrator
[node:book:author:roles:count] 3
[node:book:author:roles:first] authenticated
[node:book:author:roles:keys] authenticated, data_manager, administrator
[node:book:author:roles:last] administrator
[node:book:author:roles:reversed] administrator, data_manager, authenticated
[node:book:author:url] http://seedmelab.cushion3.sdsc.edu/user/1
[node:book:author:url:absolute] http://seedmelab.cushion3.sdsc.edu/user/1
[node:book:author:url:args] , user, 1
[node:book:author:url:brief] seedmelab.cushion3.sdsc.edu/user/1
[node:book:author:url:path] /user/1
[node:book:author:url:relative] /user/1
[node:book:author:url:unaliased] http://seedmelab.cushion3.sdsc.edu/user/1
[node:book:author:uid] 1
[node:book:parent] Help
[node:book:parent:author] seedadmin
[node:book:parent:author:account-name] seedadmin
[node:book:parent:author:created] Tue, 11/26/2019 - 22:22
[node:book:parent:author:name] seedadmin
[node:book:parent:author:display-name] seedadmin
[node:book:parent:author:edit-url] http://seedmelab.cushion3.sdsc.edu/user/1/edit
[node:book:parent:author:mail] amit@sdsc.edu
[node:book:parent:author:last-login] Thu, 08/12/2021 - 12:03
[node:book:parent:author:roles] authenticated, data_manager, administrator
[node:book:parent:author:url] http://seedmelab.cushion3.sdsc.edu/user/1
[node:book:parent:author:uid] 1
[node:book:parent:body]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:parent:nid] 24
[node:book:parent:content-type] Book page
[node:book:parent:content-type:description] <em>Books</em> have a built-in hierarchical navigation. Use for handbooks or tutorials.
[node:book:parent:content-type:edit-url] http://seedmelab.cushion3.sdsc.edu/admin/structure/types/manage/book
[node:book:parent:content-type:machine-name] book
[node:book:parent:content-type:name] Book page
[node:book:parent:content-type:node-count] 1
[node:book:parent:changed] Wed, 06/03/2020 - 22:51
[node:book:parent:changed:fallback] Wed, 06/03/2020 - 22:51
[node:book:parent:changed:foldershare_date_time] 6/3/20 10:51 PM
[node:book:parent:changed:html_date] 2020-06-03
[node:book:parent:changed:html_datetime] 2020-06-03T22:51:19-0700
[node:book:parent:changed:html_month] 2020-06
[node:book:parent:changed:html_time] 22:51:19
[node:book:parent:changed:html_week] 2020-W23
[node:book:parent:changed:html_year] 2020
[node:book:parent:changed:html_yearless_date] 06-03
[node:book:parent:changed:long] Wednesday, June 3, 2020 - 22:51
[node:book:parent:changed:medium] Wed, 06/03/2020 - 22:51
[node:book:parent:changed:raw] 1591249879
[node:book:parent:changed:short] 06/03/2020 - 22:51
[node:book:parent:changed:since] 1 year 2 months
[node:book:parent:created] Wed, 10/10/2018 - 13:05
[node:book:parent:created:fallback] Wed, 10/10/2018 - 13:05
[node:book:parent:created:foldershare_date_time] 10/10/18 1:05 PM
[node:book:parent:created:html_date] 2018-10-10
[node:book:parent:created:html_datetime] 2018-10-10T13:05:18-0700
[node:book:parent:created:html_month] 2018-10
[node:book:parent:created:html_time] 13:05:18
[node:book:parent:created:html_week] 2018-W41
[node:book:parent:created:html_year] 2018
[node:book:parent:created:html_yearless_date] 10-10
[node:book:parent:created:long] Wednesday, October 10, 2018 - 13:05
[node:book:parent:created:medium] Wed, 10/10/2018 - 13:05
[node:book:parent:created:raw] 1539201918
[node:book:parent:created:short] 10/10/2018 - 13:05
[node:book:parent:created:since] 2 years 10 months
[node:book:parent:edit-url] http://seedmelab.cushion3.sdsc.edu/node/24/edit
[node:book:parent:langcode] en
[node:book:parent:vid] 614
[node:book:parent:summary]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:parent:title] Help
[node:book:parent:source:author] seedadmin
[node:book:parent:source:body]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:parent:source:nid] 24
[node:book:parent:source:content-type] Book page
[node:book:parent:source:changed] Wed, 06/03/2020 - 22:51
[node:book:parent:source:created] Wed, 10/10/2018 - 13:05
[node:book:parent:source:edit-url] http://seedmelab.cushion3.sdsc.edu/node/24/edit
[node:book:parent:source:langcode] en
[node:book:parent:source:vid] 614
[node:book:parent:source:summary]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:parent:source:title] Help
[node:book:parent:source:url] http://seedmelab.cushion3.sdsc.edu/help
[node:book:parent:url] http://seedmelab.cushion3.sdsc.edu/help
[node:book:parent:url:absolute] http://seedmelab.cushion3.sdsc.edu/help
[node:book:parent:url:args] , help
[node:book:parent:url:brief] seedmelab.cushion3.sdsc.edu/help
[node:book:parent:url:path] /help
[node:book:parent:url:relative] /help
[node:book:parent:url:unaliased] http://seedmelab.cushion3.sdsc.edu/node/24
[node:book:parents] Help
[node:book:parents:count] 1
[node:book:parents:first] Help
[node:book:parents:keys:count] 1
[node:book:parents:last] Help
[node:book:parents:reversed] Help
[node:book:parents:reversed:count] 1
[node:book:parents:reversed:first] Help
[node:book:parents:reversed:last] Help
[node:book:root] Help
[node:book:root:author] seedadmin
[node:book:root:author:account-name] seedadmin
[node:book:root:author:created] Tue, 11/26/2019 - 22:22
[node:book:root:author:name] seedadmin
[node:book:root:author:display-name] seedadmin
[node:book:root:author:edit-url] http://seedmelab.cushion3.sdsc.edu/user/1/edit
[node:book:root:author:mail] amit@sdsc.edu
[node:book:root:author:last-login] Thu, 08/12/2021 - 12:03
[node:book:root:author:roles] authenticated, data_manager, administrator
[node:book:root:author:url] http://seedmelab.cushion3.sdsc.edu/user/1
[node:book:root:author:uid] 1
[node:book:root:body]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:root:nid] 24
[node:book:root:content-type] Book page
[node:book:root:content-type:description] <em>Books</em> have a built-in hierarchical navigation. Use for handbooks or tutorials.
[node:book:root:content-type:edit-url] http://seedmelab.cushion3.sdsc.edu/admin/structure/types/manage/book
[node:book:root:content-type:machine-name] book
[node:book:root:content-type:name] Book page
[node:book:root:content-type:node-count] 1
[node:book:root:changed] Wed, 06/03/2020 - 22:51
[node:book:root:changed:fallback] Wed, 06/03/2020 - 22:51
[node:book:root:changed:foldershare_date_time] 6/3/20 10:51 PM
[node:book:root:changed:html_date] 2020-06-03
[node:book:root:changed:html_datetime] 2020-06-03T22:51:19-0700
[node:book:root:changed:html_month] 2020-06
[node:book:root:changed:html_time] 22:51:19
[node:book:root:changed:html_week] 2020-W23
[node:book:root:changed:html_year] 2020
[node:book:root:changed:html_yearless_date] 06-03
[node:book:root:changed:long] Wednesday, June 3, 2020 - 22:51
[node:book:root:changed:medium] Wed, 06/03/2020 - 22:51
[node:book:root:changed:raw] 1591249879
[node:book:root:changed:short] 06/03/2020 - 22:51
[node:book:root:changed:since] 1 year 2 months
[node:book:root:created] Wed, 10/10/2018 - 13:05
[node:book:root:created:fallback] Wed, 10/10/2018 - 13:05
[node:book:root:created:foldershare_date_time] 10/10/18 1:05 PM
[node:book:root:created:html_date] 2018-10-10
[node:book:root:created:html_datetime] 2018-10-10T13:05:18-0700
[node:book:root:created:html_month] 2018-10
[node:book:root:created:html_time] 13:05:18
[node:book:root:created:html_week] 2018-W41
[node:book:root:created:html_year] 2018
[node:book:root:created:html_yearless_date] 10-10
[node:book:root:created:long] Wednesday, October 10, 2018 - 13:05
[node:book:root:created:medium] Wed, 10/10/2018 - 13:05
[node:book:root:created:raw] 1539201918
[node:book:root:created:short] 10/10/2018 - 13:05
[node:book:root:created:since] 2 years 10 months
[node:book:root:edit-url] http://seedmelab.cushion3.sdsc.edu/node/24/edit
[node:book:root:langcode] en
[node:book:root:vid] 614
[node:book:root:summary]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:root:title] Help
[node:book:root:source:author] seedadmin
[node:book:root:source:body]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:root:source:nid] 24
[node:book:root:source:content-type] Book page
[node:book:root:source:changed] Wed, 06/03/2020 - 22:51
[node:book:root:source:created] Wed, 10/10/2018 - 13:05
[node:book:root:source:edit-url] http://seedmelab.cushion3.sdsc.edu/node/24/edit
[node:book:root:source:langcode] en
[node:book:root:source:vid] 614
[node:book:root:source:summary]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:book:root:source:title] Help
[node:book:root:source:url] http://seedmelab.cushion3.sdsc.edu/help
[node:book:root:url] http://seedmelab.cushion3.sdsc.edu/help
[node:book:root:url:absolute] http://seedmelab.cushion3.sdsc.edu/help
[node:book:root:url:args] , help
[node:book:root:url:brief] seedmelab.cushion3.sdsc.edu/help
[node:book:root:url:path] /help
[node:book:root:url:relative] /help
[node:book:root:url:unaliased] http://seedmelab.cushion3.sdsc.edu/node/24
[node:book:title] Help
[node:comment-count] 0
[node:comment]
[node:nid] 28
[node:content-type] Book page
[node:content-type:description] <em>Books</em> have a built-in hierarchical navigation. Use for handbooks or tutorials.
[node:content-type:edit-url] http://seedmelab.cushion3.sdsc.edu/admin/structure/types/manage/book
[node:content-type:machine-name] book
[node:content-type:name] Book page
[node:content-type:node-count] 1
[node:changed] Sat, 02/13/2021 - 16:38
[node:changed:fallback] Sat, 02/13/2021 - 16:38
[node:changed:foldershare_date_time] 2/13/21 4:38 PM
[node:changed:html_date] 2021-02-13
[node:changed:html_datetime] 2021-02-13T16:38:43-0800
[node:changed:html_month] 2021-02
[node:changed:html_time] 16:38:43
[node:changed:html_week] 2021-W06
[node:changed:html_year] 2021
[node:changed:html_yearless_date] 02-13
[node:changed:long] Saturday, February 13, 2021 - 16:38
[node:changed:medium] Sat, 02/13/2021 - 16:38
[node:changed:raw] 1613263123
[node:changed:short] 02/13/2021 - 16:38
[node:changed:since] 6 months 1 week
[node:created] Wed, 10/10/2018 - 13:21
[node:created:fallback] Wed, 10/10/2018 - 13:21
[node:created:foldershare_date_time] 10/10/18 1:21 PM
[node:created:html_date] 2018-10-10
[node:created:html_datetime] 2018-10-10T13:21:05-0700
[node:created:html_month] 2018-10
[node:created:html_time] 13:21:05
[node:created:html_week] 2018-W41
[node:created:html_year] 2018
[node:created:html_yearless_date] 10-10
[node:created:long] Wednesday, October 10, 2018 - 13:21
[node:created:medium] Wed, 10/10/2018 - 13:21
[node:created:raw] 1539202865
[node:created:short] 10/10/2018 - 13:21
[node:created:since] 2 years 10 months
[node:edit-url] http://seedmelab.cushion3.sdsc.edu/node/28/edit
[node:field_image]
[node:langcode] en
[node:comment-count-new]
[node:original]
[node:vid] 631
[node:log]
[node:summary] <style type="text/css"> <!--/*--><![CDATA[/* ><!--*/ <!--/*--><![CDATA[/* ><!--*/ <!--/*--><![CDATA[/* ><!--*/ .container { display: grid; grid-template-columns: auto auto; /* 2 COL LAYOUT */ } .divL, .divR { box-sizing: border-box; padding: 10px; } .divL { text-align: center; min-width: 128px; } .divR { } @media only screen and (max-width: 768px) { .container { display: block; } } /*--><!]]]]]]><![CDATA[><![CDATA[>*/ /*--><!]]]]><![CDATA[>*/ /*--><!]]>*/ </style> <div class="container"> <div class="divL"><img alt="Terminal" data="" /></div></div>
[node:field_tags]
[node:title] Command line usage
[node:source]
[node:source:author] seedadmin
[node:source:author:account-name] seedadmin
[node:source:author:created] Tue, 11/26/2019 - 22:22
[node:source:author:created:fallback] Tue, 11/26/2019 - 22:22
[node:source:author:created:foldershare_date_time] 11/26/19 10:22 PM
[node:source:author:created:html_date] 2019-11-26
[node:source:author:created:html_datetime] 2019-11-26T22:22:25-0800
[node:source:author:created:html_month] 2019-11
[node:source:author:created:html_time] 22:22:25
[node:source:author:created:html_week] 2019-W48
[node:source:author:created:html_year] 2019
[node:source:author:created:html_yearless_date] 11-26
[node:source:author:created:long] Tuesday, November 26, 2019 - 22:22
[node:source:author:created:medium] Tue, 11/26/2019 - 22:22
[node:source:author:created:raw] 1574835745
[node:source:author:created:short] 11/26/2019 - 22:22
[node:source:author:created:since] 1 year 8 months
[node:source:author:name] seedadmin
[node:source:author:display-name] seedadmin
[node:source:author:edit-url] http://seedmelab.cushion3.sdsc.edu/user/1/edit
[node:source:author:mail] amit@sdsc.edu
[node:source:author:last-login] Thu, 08/12/2021 - 12:03
[node:source:author:last-login:fallback] Thu, 08/12/2021 - 12:03
[node:source:author:last-login:foldershare_date_time] 8/12/21 12:03 PM
[node:source:author:last-login:html_date] 2021-08-12
[node:source:author:last-login:html_datetime] 2021-08-12T12:03:15-0700
[node:source:author:last-login:html_month] 2021-08
[node:source:author:last-login:html_time] 12:03:15
[node:source:author:last-login:html_week] 2021-W32
[node:source:author:last-login:html_year] 2021
[node:source:author:last-login:html_yearless_date] 08-12
[node:source:author:last-login:long] Thursday, August 12, 2021 - 12:03
[node:source:author:last-login:medium] Thu, 08/12/2021 - 12:03
[node:source:author:last-login:raw] 1628794995
[node:source:author:last-login:short] 08/12/2021 - 12:03
[node:source:author:last-login:since] 1 week 5 days
[node:source:author:roles] authenticated, data_manager, administrator
[node:source:author:roles:count] 3
[node:source:author:roles:first] authenticated
[node:source:author:roles:keys] authenticated, data_manager, administrator
[node:source:author:roles:last] administrator
[node:source:author:roles:reversed] administrator, data_manager, authenticated
[node:source:author:url] http://seedmelab.cushion3.sdsc.edu/user/1
[node:source:author:url:absolute] http://seedmelab.cushion3.sdsc.edu/user/1
[node:source:author:url:args] , user, 1
[node:source:author:url:brief] seedmelab.cushion3.sdsc.edu/user/1
[node:source:author:url:path] /user/1
[node:source:author:url:relative] /user/1
[node:source:author:url:unaliased] http://seedmelab.cushion3.sdsc.edu/user/1
[node:source:author:uid] 1
[node:source:body]
Terminal

Web services via REST are configured on this site, foldershare client is provided which includes both an API and a command line utility. You may use this client to manage data from a terminal or create scripts for automation.

Command line setup

  1. Check and install php if needed as noted here.
  2. Download and unzip the foldershare php client (requires PHP 7.2+).
  3. #fetch foldershare php client from project website
    curl -O https://seedmelab.org/sites/default/files/downloads/foldershare_php_client.1.1.0.tar.gz
    unzip foldershare_php_client.1.1.0.tar.gz
    cd foldershare_php_client.1.1.0
    
  4. Type "./foldershare --help" in a terminal window to get help. You must have php in your path or type
     /full/path/to/php ./foldershare --help

FolderShare client command set

You will need this temporary site's host name and your user name and password in order to connect to this site. For instance, you can list top level folders like this:

./foldershare --host hostname --username login --password password  ls /

Many Linux-style file and folder commands are supported, such as:

  • "ls" to list a folder's contents.
  • "stat" to get the status of a file or folder.
  • "mkdir" to make a new folder.
  • "rm" to remove a file or folder tree.
  • "rmdir" to remove an empty folder.
  • "cp" to copy a file or folder.
  • "mv" to move a file or folder.

There are a few more commands particular to web services, such as:

  • "download" to download a file or folder.
  • "upload" to upload a file or folder.
  • "update" to add or change a file or folder's description.

FolderShare shell for interactive usage

Login to the site, this will drop the user in a foldershare shell, which enables easier manual interaction.

./foldershare --host hostname \
              --username login \
              --password password 

Create a new folder say "myfolder" at the top level (Will be available under Personal files when visited via the web browser).

foldershare> mkdir --help
foldershare> mkdir /myfolder

Upload a local file to the site using the "upload" command .

foldershare> upload --help

# Upload a file showing progress and preserving local timestamps
foldershare> upload -v -p /full/localpath/omega.zip /myfolder

# Upload missing files from local folder to remote destination 
foldershare> upload -v --sync /full/localpath/omega.zip /myfolder

Add a description to a file using the "update" command.

foldershare> update --help

# Add a description to a file
foldershare> update description 'this is metadata' /myfolder/omega.zip

Download a folder using the "download" command, this download the contents.

foldershare> download --help

# Download remote folder with progress display and preserve timestamps
foldershare> download -v -p /myfolder /full/localpath

# Download missing local files/folders from remote destination
foldershare> download -v -p /myfolder /full/localpath

 

Scripted usage example

Create a variable to hold the following information.

prefix="./foldershare --host hostname --username login --password password"

Create a new folder say "myfolder" at the top level (Will be available under Personal files when visited via the web browser).

$prefix mkdir /myfolder

Upload a local file to the site using the upload command.

$prefix upload -v -p /full/localpath/omega.zip /myfolder

Add a description to a file using the update command.

$prefix update description 'this is metadata' /myfolder/omega.zip

Download a folder using the "download" command, this download the contents.

$prefix download -v -p /myfolder /full/localpath
[node:source:book:author:account-name] seedadmin
[node:source:book:author:created] Tue, 11/26/2019 - 22:22
[node:source:book:author:name] seedadmin
[node:source:book:author:display-name] seedadmin
[node:source:book:author:edit-url] http://seedmelab.cushion3.sdsc.edu/user/1/edit
[node:source:book:author:mail] amit@sdsc.edu
[node:source:book:author:last-login] Thu, 08/12/2021 - 12:03
[node:source:book:author:roles] authenticated, data_manager, administrator
[node:source:book:author:url] http://seedmelab.cushion3.sdsc.edu/user/1
[node:source:book:author:uid] 1
[node:source:book:parent] Help
[node:source:book:parent:author] seedadmin
[node:source:book:parent:body]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:source:book:parent:nid] 24
[node:source:book:parent:content-type] Book page
[node:source:book:parent:changed] Wed, 06/03/2020 - 22:51
[node:source:book:parent:created] Wed, 10/10/2018 - 13:05
[node:source:book:parent:edit-url] http://seedmelab.cushion3.sdsc.edu/node/24/edit
[node:source:book:parent:langcode] en
[node:source:book:parent:vid] 614
[node:source:book:parent:summary]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:source:book:parent:title] Help
[node:source:book:parent:url] http://seedmelab.cushion3.sdsc.edu/help
[node:source:book:parents] Help
[node:source:book:parents:count] 1
[node:source:book:parents:first] Help
[node:source:book:parents:last] Help
[node:source:book:parents:reversed] Help
[node:source:book:root] Help
[node:source:book:root:author] seedadmin
[node:source:book:root:body]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:source:book:root:nid] 24
[node:source:book:root:content-type] Book page
[node:source:book:root:changed] Wed, 06/03/2020 - 22:51
[node:source:book:root:created] Wed, 10/10/2018 - 13:05
[node:source:book:root:edit-url] http://seedmelab.cushion3.sdsc.edu/node/24/edit
[node:source:book:root:langcode] en
[node:source:book:root:vid] 614
[node:source:book:root:summary]

CIPRES Share Documentation

Review the detailed help instruction below.

[node:source:book:root:title] Help
[node:source:book:root:url] http://seedmelab.cushion3.sdsc.edu/help
[node:source:book:title] Help
[node:source:nid] 28
[node:source:content-type] Book page
[node:source:content-type:description] <em>Books</em> have a built-in hierarchical navigation. Use for handbooks or tutorials.
[node:source:content-type:edit-url] http://seedmelab.cushion3.sdsc.edu/admin/structure/types/manage/book
[node:source:content-type:machine-name] book
[node:source:content-type:name] Book page
[node:source:content-type:node-count] 1
[node:source:changed] Sat, 02/13/2021 - 16:38
[node:source:changed:fallback] Sat, 02/13/2021 - 16:38
[node:source:changed:foldershare_date_time] 2/13/21 4:38 PM
[node:source:changed:html_date] 2021-02-13
[node:source:changed:html_datetime] 2021-02-13T16:38:43-0800
[node:source:changed:html_month] 2021-02
[node:source:changed:html_time] 16:38:43
[node:source:changed:html_week] 2021-W06
[node:source:changed:html_year] 2021
[node:source:changed:html_yearless_date] 02-13
[node:source:changed:long] Saturday, February 13, 2021 - 16:38
[node:source:changed:medium] Sat, 02/13/2021 - 16:38
[node:source:changed:raw] 1613263123
[node:source:changed:short] 02/13/2021 - 16:38
[node:source:changed:since] 6 months 1 week
[node:source:created] Wed, 10/10/2018 - 13:21
[node:source:created:fallback] Wed, 10/10/2018 - 13:21
[node:source:created:foldershare_date_time] 10/10/18 1:21 PM
[node:source:created:html_date] 2018-10-10
[node:source:created:html_datetime] 2018-10-10T13:21:05-0700
[node:source:created:html_month] 2018-10
[node:source:created:html_time] 13:21:05
[node:source:created:html_week] 2018-W41
[node:source:created:html_year] 2018
[node:source:created:html_yearless_date] 10-10
[node:source:created:long] Wednesday, October 10, 2018 - 13:21
[node:source:created:medium] Wed, 10/10/2018 - 13:21
[node:source:created:raw] 1539202865
[node:source:created:short] 10/10/2018 - 13:21
[node:source:created:since] 2 years 10 months
[node:source:edit-url] http://seedmelab.cushion3.sdsc.edu/node/28/edit
[node:source:langcode] en
[node:source:vid] 631
[node:source:summary] <style type="text/css"> <!--/*--><![CDATA[/* ><!--*/ <!--/*--><![CDATA[/* ><!--*/ <!--/*--><![CDATA[/* ><!--*/ .container { display: grid; grid-template-columns: auto auto; /* 2 COL LAYOUT */ } .divL, .divR { box-sizing: border-box; padding: 10px; } .divL { text-align: center; min-width: 128px; } .divR { } @media only screen and (max-width: 768px) { .container { display: block; } } /*--><!]]]]]]><![CDATA[><![CDATA[>*/ /*--><!]]]]><![CDATA[>*/ /*--><!]]>*/ </style> <div class="container"> <div class="divL"><img alt="Terminal" data="" /></div></div>
[node:source:title] Command line usage
[node:source:url] http://seedmelab.cushion3.sdsc.edu/help/cli/using-foldershare-client
[node:source:url:absolute] http://seedmelab.cushion3.sdsc.edu/help/cli/using-foldershare-client
[node:source:url:args] , help, cli, using-foldershare-client
[node:source:url:args:count] 3
[node:source:url:args:first] help
[node:source:url:args:keys] 0, 1, 2
[node:source:url:args:last] using-foldershare-client
[node:source:url:args:reversed] using-foldershare-client, cli, help
[node:source:url:brief] seedmelab.cushion3.sdsc.edu/help/cli/using-foldershare-client
[node:source:url:path] /help/cli/using-foldershare-client
[node:source:url:relative] /help/cli/using-foldershare-client
[node:source:url:unaliased] http://seedmelab.cushion3.sdsc.edu/node/28
[node:source:url:unaliased:absolute] http://seedmelab.cushion3.sdsc.edu/node/28
[node:source:url:unaliased:args] , node, 28
[node:source:url:unaliased:brief] seedmelab.cushion3.sdsc.edu/node/28
[node:source:url:unaliased:path] /node/28
[node:source:url:unaliased:relative] /node/28
[node:url] http://seedmelab.cushion3.sdsc.edu/help/cli/using-foldershare-client
[node:url:absolute] http://seedmelab.cushion3.sdsc.edu/help/cli/using-foldershare-client
[node:url:args] , help, cli, using-foldershare-client
[node:url:args:count] 3
[node:url:args:first] help
[node:url:args:keys] 0, 1, 2
[node:url:args:keys:count] 3
[node:url:args:keys:last] 2
[node:url:args:keys:reversed] 2, 1, 0
[node:url:args:last] using-foldershare-client
[node:url:args:reversed] using-foldershare-client, cli, help
[node:url:args:reversed:count] 3
[node:url:args:reversed:first] using-foldershare-client
[node:url:args:reversed:keys] 2, 1, 0
[node:url:args:reversed:last] help
[node:url:brief] seedmelab.cushion3.sdsc.edu/help/cli/using-foldershare-client
[node:url:path] /help/cli/using-foldershare-client
[node:url:relative] /help/cli/using-foldershare-client
[node:url:unaliased] http://seedmelab.cushion3.sdsc.edu/node/28
[node:url:unaliased:absolute] http://seedmelab.cushion3.sdsc.edu/node/28
[node:url:unaliased:args] , node, 28
[node:url:unaliased:args:count] 2
[node:url:unaliased:args:first] node
[node:url:unaliased:args:keys] 0, 1
[node:url:unaliased:args:last] 28
[node:url:unaliased:args:reversed] 28, node
[node:url:unaliased:brief] seedmelab.cushion3.sdsc.edu/node/28
[node:url:unaliased:path] /node/28
[node:url:unaliased:relative] /node/28