This Bash script is designed to initialize a Proofhub project by creating a proofhub.json configuration file. It prompts the user to enter Proofhub login details (email and API key) and then allows the user to select a Proofhub project. The selected project's ID, along with the user's login details, is then stored in the proofhub.json file for future use.
Ensure that the following dependencies are installed on your system:
jq(JSON processor): jq Installation Guidecurl: curl Download Page
Replace the placeholder values with your Proofhub API details.
- Bash
- jq (JSON processor)
- Proofhub account
- Proofhub API key
-
Ensure that
jqandfzfare installed on your system.sudo apt-get install jq fzf # Use the appropriate package manager for your system -
Make the script executable:
chmod +x proofhub_init.sh
-
Run the script:
./proofhub_init.sh
-
Enter your Proofhub email and API key when prompted.
-
The script will fetch a list of Proofhub projects and display them with corresponding indices.
-
Enter the number corresponding to the desired project.
-
The script will create a
proofhub.jsonfile with the selected project's information.
{
"API_ENDPOINT": "https://example.proofhub.com/api/v3",
"USER_AGENT": "your_proofhub_email@example.com",
"API_KEY": "your_proofhub_api_key"
}- Ensure that
jqis installed on your system. - Provide your Proofhub email and API key when prompted.
- Select the Proofhub project by entering the corresponding number.
- The script will create a
proofhub.jsonfile with the selected project's information.
This Bash script facilitates time logging in Proofhub by interacting with the Proofhub API. It allows users to select a Proofhub Timesheet, Todolist, Task, and Subtask, and logs time for the selected entry.
- Bash
- jq (JSON processor)
curlproofhub.json
-
Run the Script:
chmod +x phtimelog.sh ./phtimelog.sh
-
Follow the prompts:
- Select a Proofhub Timesheet.
- Choose a Todolist.
- Pick a Task.
- If the Task has subtasks, select a Subtask.
- Enter time details when prompted.
-
Review Results:
- The script will display the selected entries and log the time in Proofhub.
- Ensure you have the necessary permissions in Proofhub to log time.
- Review the script prompts and provide accurate information.