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] 4 days 3 hours
[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

FolderShare supports REST web services for command-line access. You can use this to upload, download, and change files and folders from a terminal window or script on a Mac, Windows, or Linux desktop, laptop, or supercomputer.

Fetch command-line tool:

  1. Download 1.4 and untar. The client requires PHP 7.0+. See installation information here
    # fetch foldershare module which includes the REST client in the 'applications' folder
    curl -OL https://seedmelab.org/sites/default/files/downloads/foldershare_php_client_1.4.tar.gz 
    tar xzf foldershare_php_client_1.4.tar.gz
    cd foldershare_php_client.1.4
    
    Key updates in the new client
    a) The client provides output in json format
    
    b) Upload/Download commands with —sync option include --delete which removes non existing files at the destination
    
    
  2. Deprecated Download 1.2.0 and unzip. The client requires PHP 7.0+. See installation information here
    # fetch foldershare module which includes the REST client in the 'applications' folder
    curl -OL https://seedmelab.org/sites/default/files/downloads/foldershare_php_client.1.1.0_gateway.zip 
    unzip foldershare_php_client.1.1.0_gateway.zip
    cd foldershare_php_client.1.1.0_gateway
    
    Key updates in the new client
    a) Parentheses and + chars are now supported in the client.
    b) mkdir command now supports create intermediate folders for a given path if it does not exist
    mkdir -p /1/2/3/4
    
    c)  Move and copy command have —wait option 
    This should be used to catch any errors, the default behavior is to return quickly before completing actually move and copy operations which are then completed in the background in later time.
    
    d) Upload commands -p option which preserves some timestamps is now the default, so it need not be included.
    
    e) Upload command  also  has —sync option
    This is not a true sync but may be used for uploading content adjacent tries. Say the upload did not work correctly the first time, in the next try this option can be used
    
  3. Deprecated  Download 1.1.0, Download 1.0.0  and unzip. The client requires PHP 7.0+. See installation information here
    # fetch foldershare module which includes the REST client in the 'applications' folder
    curl -O https://seedmelab.org/sites/default/files/downloads/foldershare_php_client.1.0_gateway.zip
    unzip foldershare_php_client.1.0_gateway.zip
    cd foldershare_php_client
    
    
  4. Type "./foldershare --help" in a terminal window to get help.

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 /

./foldershare --host hostname --masquerade username --apikey xyz  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:

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

Example usage

  • Login to the site
    • ./foldershare --host hostname --username login --password password
  • Create a new folder say "myfolder" at the top/root level, visible under Personal folders through the web browser
    • % ./foldershare --host hostname --username login --password password mkdir   help
    • % ./foldershare --host hostname --username login --password password mkdir '/myfolder'
  • Upload local file to the site using the put command 
    • % ./foldershare --host hostname --username login --password password put   help
    • % ./foldershare --host hostname --username login --password password put   '/Users/amit/Desktop/omega.zip'   '/myfolder'
  • Add a description to a file using the update command
    • % ./foldershare --host hostname --username login --password password update   help
    • % ./foldershare --host hostname --username login --password password update   description   'this is metadata'   '/myfolder/omega.zip'
  • Download a folder using the get command, this will zip and download the contents if appropriate
    • % ./foldershare --host hostname --username login --password password get   help
    • % ./foldershare --host hostname --username login --password password get  '/myfolder'   '/Users/john/Downloads'
[node:book]
[node:comment-count] 0
[node:comment]
[node:comment:status] 1
[node:comment:last_comment_timestamp] 1553825844
[node:comment:last_comment_uid] 1
[node:nid] 3
[node:content-type] Article
[node:content-type:description] Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.
[node:content-type:edit-url] http://seedmelab.cushion3.sdsc.edu/admin/structure/types/manage/article
[node:content-type:machine-name] article
[node:content-type:name] Article
[node:content-type:node-count] 1
[node:changed] Wed, 06/16/2021 - 15:28
[node:changed:fallback] Wed, 06/16/2021 - 15:28
[node:changed:foldershare_date_time] 6/16/21 3:28 PM
[node:changed:html_date] 2021-06-16
[node:changed:html_datetime] 2021-06-16T15:28:50-0700
[node:changed:html_month] 2021-06
[node:changed:html_time] 15:28:50
[node:changed:html_week] 2021-W24
[node:changed:html_year] 2021
[node:changed:html_yearless_date] 06-16
[node:changed:long] Wednesday, June 16, 2021 - 15:28
[node:changed:medium] Wed, 06/16/2021 - 15:28
[node:changed:raw] 1623882530
[node:changed:short] 06/16/2021 - 15:28
[node:changed:since] 2 months
[node:created] Wed, 02/27/2019 - 12:15
[node:created:fallback] Wed, 02/27/2019 - 12:15
[node:created:foldershare_date_time] 2/27/19 12:15 PM
[node:created:html_date] 2019-02-27
[node:created:html_datetime] 2019-02-27T12:15:56-0800
[node:created:html_month] 2019-02
[node:created:html_time] 12:15:56
[node:created:html_week] 2019-W09
[node:created:html_year] 2019
[node:created:html_yearless_date] 02-27
[node:created:long] Wednesday, February 27, 2019 - 12:15
[node:created:medium] Wed, 02/27/2019 - 12:15
[node:created:raw] 1551298556
[node:created:short] 02/27/2019 - 12:15
[node:created:since] 2 years 5 months
[node:edit-url] http://seedmelab.cushion3.sdsc.edu/node/3/edit
[node:field_image]
[node:langcode] en
[node:comment-count-new]
[node:original]
[node:vid] 635
[node:log]
[node:summary] <div style="float: left;"><img alt="Terminal" data-entity-type="file" data-entity-uuid="33773258-cffa-4c42-a63b-37da9be11f7b" src="/sites/default/files/inline-images/TerminalIconBig.png" /></div> <div style="margin-left: 150px;"> <p><strong>FolderShare</strong> supports <a href="https://en.wikipedia.org/wiki/Representational_state_transfer">REST</a> web services for command-line access. You can use this to upload, download, and change files and folders from a terminal window or script on a Mac, Windows, or Linux desktop, laptop, or supercomputer.</p> <p>Fetch command-line tool:</p></div>
[node:field_tags]
[node:title] Using foldershare command line client
[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] 4 days 3 hours
[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

FolderShare supports REST web services for command-line access. You can use this to upload, download, and change files and folders from a terminal window or script on a Mac, Windows, or Linux desktop, laptop, or supercomputer.

Fetch command-line tool:

  1. Download 1.4 and untar. The client requires PHP 7.0+. See installation information here
    # fetch foldershare module which includes the REST client in the 'applications' folder
    curl -OL https://seedmelab.org/sites/default/files/downloads/foldershare_php_client_1.4.tar.gz 
    tar xzf foldershare_php_client_1.4.tar.gz
    cd foldershare_php_client.1.4
    
    Key updates in the new client
    a) The client provides output in json format
    
    b) Upload/Download commands with —sync option include --delete which removes non existing files at the destination
    
    
  2. Deprecated Download 1.2.0 and unzip. The client requires PHP 7.0+. See installation information here
    # fetch foldershare module which includes the REST client in the 'applications' folder
    curl -OL https://seedmelab.org/sites/default/files/downloads/foldershare_php_client.1.1.0_gateway.zip 
    unzip foldershare_php_client.1.1.0_gateway.zip
    cd foldershare_php_client.1.1.0_gateway
    
    Key updates in the new client
    a) Parentheses and + chars are now supported in the client.
    b) mkdir command now supports create intermediate folders for a given path if it does not exist
    mkdir -p /1/2/3/4
    
    c)  Move and copy command have —wait option 
    This should be used to catch any errors, the default behavior is to return quickly before completing actually move and copy operations which are then completed in the background in later time.
    
    d) Upload commands -p option which preserves some timestamps is now the default, so it need not be included.
    
    e) Upload command  also  has —sync option
    This is not a true sync but may be used for uploading content adjacent tries. Say the upload did not work correctly the first time, in the next try this option can be used
    
  3. Deprecated  Download 1.1.0, Download 1.0.0  and unzip. The client requires PHP 7.0+. See installation information here
    # fetch foldershare module which includes the REST client in the 'applications' folder
    curl -O https://seedmelab.org/sites/default/files/downloads/foldershare_php_client.1.0_gateway.zip
    unzip foldershare_php_client.1.0_gateway.zip
    cd foldershare_php_client
    
    
  4. Type "./foldershare --help" in a terminal window to get help.

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 /

./foldershare --host hostname --masquerade username --apikey xyz  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:

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

Example usage

  • Login to the site
    • ./foldershare --host hostname --username login --password password
  • Create a new folder say "myfolder" at the top/root level, visible under Personal folders through the web browser
    • % ./foldershare --host hostname --username login --password password mkdir   help
    • % ./foldershare --host hostname --username login --password password mkdir '/myfolder'
  • Upload local file to the site using the put command 
    • % ./foldershare --host hostname --username login --password password put   help
    • % ./foldershare --host hostname --username login --password password put   '/Users/amit/Desktop/omega.zip'   '/myfolder'
  • Add a description to a file using the update command
    • % ./foldershare --host hostname --username login --password password update   help
    • % ./foldershare --host hostname --username login --password password update   description   'this is metadata'   '/myfolder/omega.zip'
  • Download a folder using the get command, this will zip and download the contents if appropriate
    • % ./foldershare --host hostname --username login --password password get   help
    • % ./foldershare --host hostname --username login --password password get  '/myfolder'   '/Users/john/Downloads'
[node:source:comment:status] 1
[node:source:comment:last_comment_timestamp] 1553825844
[node:source:comment:last_comment_uid] 1
[node:source:nid] 3
[node:source:content-type] Article
[node:source:content-type:description] Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.
[node:source:content-type:edit-url] http://seedmelab.cushion3.sdsc.edu/admin/structure/types/manage/article
[node:source:content-type:machine-name] article
[node:source:content-type:name] Article
[node:source:content-type:node-count] 1
[node:source:changed] Wed, 06/16/2021 - 15:28
[node:source:changed:fallback] Wed, 06/16/2021 - 15:28
[node:source:changed:foldershare_date_time] 6/16/21 3:28 PM
[node:source:changed:html_date] 2021-06-16
[node:source:changed:html_datetime] 2021-06-16T15:28:50-0700
[node:source:changed:html_month] 2021-06
[node:source:changed:html_time] 15:28:50
[node:source:changed:html_week] 2021-W24
[node:source:changed:html_year] 2021
[node:source:changed:html_yearless_date] 06-16
[node:source:changed:long] Wednesday, June 16, 2021 - 15:28
[node:source:changed:medium] Wed, 06/16/2021 - 15:28
[node:source:changed:raw] 1623882530
[node:source:changed:short] 06/16/2021 - 15:28
[node:source:changed:since] 2 months
[node:source:created] Wed, 02/27/2019 - 12:15
[node:source:created:fallback] Wed, 02/27/2019 - 12:15
[node:source:created:foldershare_date_time] 2/27/19 12:15 PM
[node:source:created:html_date] 2019-02-27
[node:source:created:html_datetime] 2019-02-27T12:15:56-0800
[node:source:created:html_month] 2019-02
[node:source:created:html_time] 12:15:56
[node:source:created:html_week] 2019-W09
[node:source:created:html_year] 2019
[node:source:created:html_yearless_date] 02-27
[node:source:created:long] Wednesday, February 27, 2019 - 12:15
[node:source:created:medium] Wed, 02/27/2019 - 12:15
[node:source:created:raw] 1551298556
[node:source:created:short] 02/27/2019 - 12:15
[node:source:created:since] 2 years 5 months
[node:source:edit-url] http://seedmelab.cushion3.sdsc.edu/node/3/edit
[node:source:langcode] en
[node:source:vid] 635
[node:source:summary] <div style="float: left;"><img alt="Terminal" data-entity-type="file" data-entity-uuid="33773258-cffa-4c42-a63b-37da9be11f7b" src="/sites/default/files/inline-images/TerminalIconBig.png" /></div> <div style="margin-left: 150px;"> <p><strong>FolderShare</strong> supports <a href="https://en.wikipedia.org/wiki/Representational_state_transfer">REST</a> web services for command-line access. You can use this to upload, download, and change files and folders from a terminal window or script on a Mac, Windows, or Linux desktop, laptop, or supercomputer.</p> <p>Fetch command-line tool:</p></div>
[node:source:title] Using foldershare command line client
[node:source:url] http://seedmelab.cushion3.sdsc.edu/dev/cli/foldershare
[node:source:url:absolute] http://seedmelab.cushion3.sdsc.edu/dev/cli/foldershare
[node:source:url:args] , dev, cli, foldershare
[node:source:url:args:count] 3
[node:source:url:args:first] dev
[node:source:url:args:keys] 0, 1, 2
[node:source:url:args:last] foldershare
[node:source:url:args:reversed] foldershare, cli, dev
[node:source:url:brief] seedmelab.cushion3.sdsc.edu/dev/cli/foldershare
[node:source:url:path] /dev/cli/foldershare
[node:source:url:relative] /dev/cli/foldershare
[node:source:url:unaliased] http://seedmelab.cushion3.sdsc.edu/node/3
[node:source:url:unaliased:absolute] http://seedmelab.cushion3.sdsc.edu/node/3
[node:source:url:unaliased:args] , node, 3
[node:source:url:unaliased:brief] seedmelab.cushion3.sdsc.edu/node/3
[node:source:url:unaliased:path] /node/3
[node:source:url:unaliased:relative] /node/3
[node:url] http://seedmelab.cushion3.sdsc.edu/dev/cli/foldershare
[node:url:absolute] http://seedmelab.cushion3.sdsc.edu/dev/cli/foldershare
[node:url:args] , dev, cli, foldershare
[node:url:args:count] 3
[node:url:args:first] dev
[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] foldershare
[node:url:args:reversed] foldershare, cli, dev
[node:url:args:reversed:count] 3
[node:url:args:reversed:first] foldershare
[node:url:args:reversed:keys] 2, 1, 0
[node:url:args:reversed:last] dev
[node:url:brief] seedmelab.cushion3.sdsc.edu/dev/cli/foldershare
[node:url:path] /dev/cli/foldershare
[node:url:relative] /dev/cli/foldershare
[node:url:unaliased] http://seedmelab.cushion3.sdsc.edu/node/3
[node:url:unaliased:absolute] http://seedmelab.cushion3.sdsc.edu/node/3
[node:url:unaliased:args] , node, 3
[node:url:unaliased:args:count] 2
[node:url:unaliased:args:first] node
[node:url:unaliased:args:keys] 0, 1
[node:url:unaliased:args:last] 3
[node:url:unaliased:args:reversed] 3, node
[node:url:unaliased:brief] seedmelab.cushion3.sdsc.edu/node/3
[node:url:unaliased:path] /node/3
[node:url:unaliased:relative] /node/3