Skip to content

Commit

Permalink
Convert to Python3, and add link to newer stuff where exists.
Browse files Browse the repository at this point in the history
Python2 removed from Debian, see https://news.ycombinator.com/item?id=34227760

Thanks to xet7 !
  • Loading branch information
xet7 committed Jan 3, 2023
1 parent 5f7b134 commit 7d21cdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions clone-all-github-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# Actual Python oneliner from somewhere from Internet long time ago.
# 2017-02-12 by Lauri Ojansivu (xet7): Clarified text. Updated example.
# 2016-10-18 by Lauri Ojansivu (xet7): Added Bash logic.
# 2022-01-03 by Lauri Ojansivu (xet7): Converted to Python3 using online converter.

function cloneall {

python2 -c "import json, urllib, os; [os.system('git clone ' + r['$1_url']) for r in json.load(urllib.urlopen('https://api.github.com/$2/$3/repos?per_page=200'))]"

function cloneall {
#python2 -c "import json, urllib, os; [os.system('git clone ' + r['$1_url']) for r in json.load(urllib.urlopen('https://api.github.com/$2/$3/repos?per_page=200'))]"
python3 -c "import json, urllib.request, urllib.parse, urllib.error, os; [os.system('git clone ' + r['$1_url']) for r in json.load(urllib.request.urlopen('https://api.github.com/$2/$3/repos?per_page=200'))]"
}

# SETTINGS:
Expand Down
6 changes: 4 additions & 2 deletions download-all-youtube-channel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
# Actual oneliner from somewhere from Internet long time ago.
# 2017-02-12 by Lauri Ojansivu (xet7): Cleanup some text.
# 2016-10-18 by Lauri Ojansivu (xet7): Added Bash logic. Modified to save as MP4.
# 2023-01-03 by Lauri Ojansivu (xet7): Instead use other way.

function downloadall {

youtube-dl -citw -v -f mp4 --merge-output-format mp4 https://www.youtube.com/channel/$1/featured
function downloadall {

#youtube-dl -citw -v -f mp4 --merge-output-format mp4 https://www.youtube.com/channel/$1/featured
echo "Use this instead: https://github.com/wekan/wekan/wiki/YouTube"
}

# SETTINGS:
Expand Down

0 comments on commit 7d21cdd

Please sign in to comment.