Aller au contenu

Adobe CC_Offline_Package_Generator

https://github.com/chriswayg/CC-Offline-Package-Generator

https://gist.github.com/ayyybe/a5f01c6f40020f9a7bc4939beeb2df1d

On crée un environnement virtuel:

~/Documents/venv master* ⇡
❯ python3 -m venv cc

~/Documents/venv master* ⇡
❯ cc/bin/pip3 install -U pip setuptools

~/Documents/venv master* ⇡
❯ cc/bin/pip3 install -U requests tqdm

On télécharge le scrypt Python:

~/Documents/venv/cc master* ⇡
❯ wget https://gist.github.com/ayyybe/a5f01c6f40020f9a7bc4939beeb2df1d/raw/6e82a23d381059a345cdf77fc29595ef11985d31/ccdl.py

On peut exécuter le programme:

~/Documents/venv/cc master* ⇡

❯ /Users/bruno/Documents/venv/cc/bin/python3 /Users/bruno/Documents/venv/cc/ccdl.py
=================================

= Adobe macOS Package Generator =
========= 0.1.2-hotfix1 =========

Downloading products.xml

On crée un script pour lancer le script Python avec un lien dans /Applications:

~/Documents/venv/cc master* ⇡
❯ nano ccdl.command
#!/usr/bin/env bash

/Users/bruno/Documents/venv/cc/bin/python3 /Users/bruno/Documents/venv/cc/ccdl.py
~/Documents/venv/cc master* ⇡
❯ ln -s /Users/bruno/Documents/venv/cc/ccdl.command /Applications/Adobe\ CC_Offline_Package_Generator

Un script qui réalise tout cela:

#!/usr/bin/env bash

venv_path=$HOME/Documents/venv/
folder=adobeCC

# Virtual environnment
cd $venv_path
python3 -m venv $folder
$folder/bin/pip3 install -U pip setuptools
$folder/bin/pip3 install -U requests tqdm

cd $venv_path$folder

# dl gist
wget https://gist.github.com/ayyybe/a5f01c6f40020f9a7bc4939beeb2df1d/raw/6e82a23d381059a345cdf77fc29595ef11985d31/ccdl.py 

# Launch script
echo "#!/usr/bin/env bash" > $folder.command
echo "$venv_path$folder/bin/python3 $venv_path$folder/ccdl.py" > $folder.command

chmod +x $folder.command

# Link in /Applications
ln -s "$venv_path$folder/$folder.command" "/Applications/Adobe CC_Offline_Package_Generator"

Dernière mise à jour: February 4, 2021