You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To speed up the process of managing the PDG portal's content, it would be helpful to develop a Bash script that automates the process of retrieving and updating the portal XML doc in both production and test environments using the DataONE API. The current update-PDG-portal.Rmd file is helpful in this task, but a bash script will be quicker to run and will require less setup for new users (especially those not familiar with R).
The script will:
Retrieve the Latest Portal Version: The script should be able to query the DataONE API to find the latest version of the permafrost portal. It should handle both production (PROD) and test (STAGING) environments.
Download Portal XML: After identifying the latest version, the script should download the corresponding XML document, allowing for local editing.
Update Portal XML: The script should be capable of uploading a modified XML document back to the ADC, thus updating the portal.
Command Line Flexibility: The script should accept command line arguments for different actions (download or update), environments (production or test), and the user's authentication token.
The text was updated successfully, but these errors were encountered:
This sounds great. Most of that functionality is already present in the dataone R package. All you'd need to do is customize the query function to find the portal of interest. the token, download, and upload code is already there. So a lightweight wrapper around the R client would be straightforward. Also true for the python client I think. Of course, you could do it in curl/bash as well, but there's a fair amount you'd need to do in shell on the upload side to get it to work (like creating/updating a valid sysmeta document).
To speed up the process of managing the PDG portal's content, it would be helpful to develop a Bash script that automates the process of retrieving and updating the portal XML doc in both production and test environments using the DataONE API. The current
update-PDG-portal.Rmd
file is helpful in this task, but a bash script will be quicker to run and will require less setup for new users (especially those not familiar with R).The script will:
Retrieve the Latest Portal Version: The script should be able to query the DataONE API to find the latest version of the permafrost portal. It should handle both production (
PROD
) and test (STAGING
) environments.Download Portal XML: After identifying the latest version, the script should download the corresponding XML document, allowing for local editing.
Update Portal XML: The script should be capable of uploading a modified XML document back to the ADC, thus updating the portal.
Command Line Flexibility: The script should accept command line arguments for different actions (download or update), environments (production or test), and the user's authentication token.
The text was updated successfully, but these errors were encountered: