Changes for page Working with HDC Project Files in the Command Line Interface
Last modified by Dennis Segebarth on 2024/10/02 18:38
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,7 @@ 1 +{{box cssClass="floatinginfobox" title="Table of Contents"}} 2 +{{toc/}} 3 +{{/box}} 4 + 1 1 The Pilot Command Line Interface (pilotcli) is a binary executable program that provides a convenient way for users to perform file actions and platform-related tasks programmatically. The Pilot Command Line Interface can be downloaded and run on on your local Linux and Linux subsystems (as Windows user, see for instance the [[Windows Subsystem for Linux installation guide>>url:https://learn.microsoft.com/en-us/windows/wsl/install]]) to support large file uploads. For convenience, pilotcli is also pre-deployed and installed in the users JupyterHub accessible via worskpace tools. 2 2 3 3 = Data Stewardship = ... ... @@ -721,11 +721,169 @@ 721 721 File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2 722 722 {{/code}} 723 723 724 --- --728 +Download a file or folder from the Green Room of a Project. This will only be possible if pilotcli is used within the Platform, e.g. in one of the Workspace tools. It works the same way as downloading from Core, including all the additional options like zipping, by either adding {{code}}-z greenroom{{/code}} or by omitting the {{code}}-z{{/code}} option entirely, as “greenroom” is the default value: 725 725 726 -- 727 -{{code language="none"}}{{/code}} 730 +{{code language="none"}} 731 +$ pilotcli file sync cli/admin/sample_file2 cli/admin/sample_file7 ~/Downloads 732 +Preparing status: READY_FOR_DOWNLOADING 733 +/home/uname/Downloads/sample_file2 already exist, file will be saved as /home/uname/Downloads/sample_file2 (1) 734 +start downloading... 735 +Downloading sample_file2 (1) |██████████████████████████████ 100% 00:00 736 +File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file2 (1) 737 +Preparing status: READY_FOR_DOWNLOADING 738 +start downloading... 739 +Downloading sample_file7 |██████████████████████████████ 100% 00:00 740 +File has been downloaded successfully and saved to: /home/uname/Downloads/sample_file7 741 +{{/code}} 728 728 743 += Dataset Commands: pilotcli **dataset** = 744 + 745 +== Help == 746 + 747 +{{code language="none"}} 748 +$ pilotcli dataset --help 749 +Usage: pilotcli dataset [OPTIONS] COMMAND [ARGS]... 750 + 751 +Options: 752 + --help Show this message and exit. 753 + 754 +Commands: 755 + download Download a dataset or a particular version of a dataset. 756 + list List datasets belonging to logged in user. 757 + show-detail Show details of a dataset. 758 +{{/code}} 759 + 760 +== Command: **list** == 761 + 762 +* **Usage**: List all datasets for the logged in user 763 +* ((( 764 +**Prerequisite**: 765 + 766 +* User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue." 767 +))) 768 + 769 +{{code language="none"}} 770 +$ pilotcli dataset list --help 771 +Usage: pilotcli dataset list [OPTIONS] 772 + 773 + List datasets belonging to logged in user. 774 + 775 +Options: 776 + --page INTEGER The page to be listed [default: 0] 777 + --page-size INTEGER number of objects per page [default: 10] 778 + -d, --detached whether run in detached mode 779 + --help Show this message and exit. 780 +{{/code}} 781 + 782 +=== Examples === 783 + 784 +List all datasets that are accessible for the user: 785 + 786 +{{code language="none"}} 787 +$ pilotcli dataset list 788 + Dataset Title Dataset Code 789 +--------------------------------------------------------------------------- 790 + dataset2 aug24202102 791 + dataset-01 aug242021 792 +Page: 0, Number of datasets: 2 793 +{{/code}} 794 + 795 +== Command: **show-detail** == 796 + 797 +* **Usage**: Show the detailed information of a dataset. 798 +* ((( 799 +**Prerequisite**: 800 + 801 +* User login is required, otherwise an error is returned: "The current login session is invalid. Please login to continue." 802 +))) 803 + 804 +{{code language="none"}} 805 +$ pilotcli dataset show-detail --help 806 +Usage: pilotcli dataset show-detail [OPTIONS] CODE 807 + 808 + Show details of a dataset. 809 + 810 +Options: 811 + --page INTEGER The page to be listed [default: 0] 812 + --page-size INTEGER number of objects per page [default: 10] 813 + -d, --detached whether run in detached mode 814 + --help Show this message and exit. 815 +{{/code}} 816 + 817 +=== Examples === 818 + 819 +Show the details of the specified Dataset by providing the unique Dataset Code - “aug242021” in this case: 820 + 821 +{{code language="none"}} 822 +$ pilotcli dataset show-detail aug242021 823 +-------------------------------------------------------------------------------- 824 +| Title | dataset-01 | 825 +-------------------------------------------------------------------------------- 826 +| Code | aug242021 | 827 +-------------------------------------------------------------------------------- 828 +| Authors | uname, cli | 829 +-------------------------------------------------------------------------------- 830 +| Type | GENERAL | 831 +-------------------------------------------------------------------------------- 832 +| Modality | neuroimaging, microscopy, histological approach | 833 +-------------------------------------------------------------------------------- 834 +| Collection_method | import, test, upload | 835 +-------------------------------------------------------------------------------- 836 +| Tags | tag1, tag2, tag3 | 837 +-------------------------------------------------------------------------------- 838 +| Versions | 1.0, 1.1, 1.2 | 839 +-------------------------------------------------------------------------------- 840 +{{/code}} 841 + 842 +== Command: **download** == 843 + 844 +* **Usage**: Download a particular version of a dataset. 845 +* **Options**: -v ~-~-version 846 +* ((( 847 +**Prerequisite**: 848 + 849 +* User login is required, otherwise error is returned: "The current login session is invalid. Please login to continue." 850 +))) 851 + 852 +{{code language="none"}} 853 +$ pilotcli dataset download --help 854 +Usage: pilotcli dataset download [OPTIONS] [CODE]... OUTPUT_PATH 855 + 856 + Download a dataset or a particular version of a dataset. 857 + 858 +Options: 859 + -v, --version TEXT Download a particular version of a dataset. 860 + --help Show this message and exit. 861 +{{/code}} 862 + 863 + 864 +=== Examples === 865 + 866 +Download a Dataset with Code “aug242021”: 867 + 868 +{{code language="none"}} 869 +$ pilotcli dataset download aug242021 ~/Downloads/ 870 +Pre downloading dataset 871 +Preparing status: READY_FOR_DOWNLOADING 872 +start downloading... 873 +Downloading aug242021_1632342868.882398.zip |██████████████████████████████ 100% 00:00 874 +File has been downloaded successfully and saved to: /home/uname/Downloads/aug242021_163234 875 +2868.882398.zip 876 +{{/code}} 877 + 878 +Download the version 1.1 of a Dataset with Code “aug242021”: 879 + 880 +{{code language="none"}} 881 +$ pilotcli dataset download aug242021 ~/Downloads/ -v 1.1 882 +Current dataset version: 1.1 883 +Pre downloading dataset 884 +start downloading... 885 +Downloading aug242021_2021-08-24 11:10:00.042277.zip |██████████████████████████████ 100% 00:00 886 +File has been downloaded successfully and saved to: /home/uname/Downloads/aug242021_2021-08-24 11:10:00.042277.zip 887 +{{/code}} 888 + 889 + 890 + 729 729 ---- 730 730 731 731 Copyright © 2023 [[Indoc Research>>url:https://www.indocresearch.org/]].