File size: 1,483 Bytes
5c8cbfc
 
 
 
 
 
 
cb171ce
 
 
 
 
 
 
 
 
 
 
 
5c8cbfc
 
 
 
cb171ce
5c8cbfc
 
 
 
 
 
 
 
 
cb171ce
 
5c8cbfc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash

# Function to export requirements using Poetry
export_requirements() {
    poetry export --without-hashes --format=requirements.txt --output=requirements.txt
}

# Function to fetch the Python .gitignore file
fetch_python_gitignore() {
    echo "Fetching the Python .gitignore file..."
    # Using curl to download the Python .gitignore file
    curl -o .gitignore https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
    if [ $? -eq 0 ]; then
        echo "Python .gitignore file fetched successfully."
    else
        echo "Failed to fetch the Python .gitignore file."
    fi
}

# Main function
main() {
    echo "Choose an option:"
    echo "1. Export requirements using Poetry"
    echo "2. Fetch Python .gitignore file"
    echo "3. Option 3"
    echo "4. Option 4"
    echo "5. Option 5"
    read -p "Enter your choice [1-5]: " choice

    case $choice in
        1)
            export_requirements
            ;;
         2)
            fetch_python_gitignore
            ;;
        3)
            echo "You chose option 3"
            # Add your code for option 3 here
            ;;
        4)
            echo "You chose option 4"
            # Add your code for option 4 here
            ;;
        5)
            echo "You chose option 5"
            # Add your code for option 5 here
            ;;
        *)
            echo "Invalid choice. Please enter a number from 1 to 5."
            ;;
    esac
}

# Call the main function
main