Skip to content

Commit a12778e

Browse files
committed
Updated
1 parent 6f82184 commit a12778e

File tree

5 files changed

+138
-10
lines changed

5 files changed

+138
-10
lines changed

downloadYoutube.py

100644100755
+10-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#!/usr/bin/env python
2+
13
from pytube import YouTube
4+
import argparse
5+
6+
ap = argparse.ArgumentParser()
7+
ap.add_argument("-l", "--link", type=str, required=True, help="You Tube Link")
8+
args = vars(ap.parse_args())
9+
10+
youtube_link = args["link"]
211

3-
YouTube('https://www.youtube.com/watch?v=D2Tsh4oH9Zc').streams.first().download()
12+
YouTube(youtube_link).streams.first().download()

environment.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: python-utils
2+
channels:
3+
- defaults
4+
dependencies:
5+
- ca-certificates=2020.7.22=0
6+
- certifi=2020.6.20=py38_0
7+
- libcxx=10.0.0=1
8+
- libedit=3.1.20191231=h1de35cc_1
9+
- libffi=3.3=hb1e8313_2
10+
- ncurses=6.2=h0a44026_1
11+
- openssl=1.1.1h=haf1e3a3_0
12+
- pip=20.2.2=py38_0
13+
- python=3.8.5=h26836e1_1
14+
- readline=8.0=h1de35cc_0
15+
- setuptools=49.6.0=py38_0
16+
- sqlite=3.33.0=hffcf06c_0
17+
- tk=8.6.10=hb0a8c7a_0
18+
- wheel=0.35.1=py_0
19+
- xz=5.2.5=h1de35cc_0
20+
- zlib=1.2.11=h1de35cc_3
21+
- pip:
22+
- appdirs==1.4.4
23+
- audioread==2.1.9
24+
- audiotsm==0.1.2
25+
- cffi==1.14.4
26+
- chardet==4.0.0
27+
- decorator==4.4.2
28+
- ffmpeg-python==0.2.0
29+
- fire==0.3.1
30+
- future==0.18.2
31+
- idna==2.10
32+
- imageio==2.9.0
33+
- imageio-ffmpeg==0.4.3
34+
- iso8601==0.1.13
35+
- joblib==1.0.0
36+
- librosa==0.8.0
37+
- llvmlite==0.35.0
38+
- lxml==4.6.2
39+
- m3u8==0.8.0
40+
- moviepy==1.0.3
41+
- numba==0.52.0
42+
- numpy==1.19.4
43+
- packaging==20.8
44+
- pikepdf==2.2.2
45+
- pillow==8.0.1
46+
- pooch==1.3.0
47+
- proglog==0.1.9
48+
- psutil==5.8.0
49+
- pycparser==2.20
50+
- pyparsing==2.4.7
51+
- pypdf2==1.26.0
52+
- pytube==10.4.1
53+
- requests==2.25.1
54+
- resampy==0.2.2
55+
- scikit-learn==0.24.0
56+
- scipy==1.5.4
57+
- selenium==3.141.0
58+
- six==1.15.0
59+
- soundfile==0.10.3.post1
60+
- termcolor==1.1.0
61+
- threadpoolctl==2.1.0
62+
- tqdm==4.56.0
63+
- typing-extensions==3.7.4.3
64+
- urllib3==1.26.2
65+
- whatsapp-web==0.0.1
66+

mergePDF.py

100644100755
+11-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
from PyPDF2 import PdfFileReader, PdfFileWriter
24
import pikepdf
35

@@ -68,13 +70,13 @@ def decrypt_pdf2(input_path, output_path, password):
6870
print("Total pages:", num_pages)
6971

7072
if __name__ == '__main__':
71-
#doc_1 = '/Users/anshul/Downloads/abc.pdf'
72-
#doc_2 = '/Users/anshul/Downloads/abc.pdf'
73+
doc_1 = '/Users/anshul/Downloads/input01.pdf'
74+
doc_2 = '/Users/anshul/Downloads/input02.pdf'
7375
#extract_information('/Users/anshul/Downloads/abc.pdf')
74-
#paths = [doc_1, doc_2]
75-
#merge_pdfs(paths, output='/Users/anshul/Downloads/merged.pdf')
76-
#remove_page(doc_1,doc_2,7)
77-
encrypted = '/Users/anshul/Downloads/abc.pdf'
78-
decrypted = '/Users/anshul/Downloads/abc.pdf'
79-
password = 'password'
80-
decrypt_pdf(encrypted, decrypted, password)
76+
paths = [doc_1, doc_2]
77+
merge_pdfs(paths, output='/Users/anshul/Downloads/output.pdf')
78+
#remove_page(doc_1,doc_2,1)
79+
#encrypted = '/Users/anshul/Downloads/abc.pdf'
80+
#decrypted = '/Users/anshul/Downloads/abc.pdf'
81+
##password = 'password'
82+
#decrypt_pdf(encrypted, decrypted, password)

removeSilenceFromVideo.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from auto_everything.video import video
2+
import os
3+
4+
video = Video()
5+
6+
video.humanly_remove_silence_parts_from_video("/ap.mp4", "/ap-silence.mp4", 25, minimum_interval=0.7)

requirements.txt

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
appdirs==1.4.4
2+
audioread==2.1.9
3+
audiotsm==0.1.2
4+
certifi==2020.6.20
5+
cffi==1.14.4
6+
chardet==4.0.0
7+
decorator==4.4.2
8+
ffmpeg-python==0.2.0
9+
fire==0.3.1
10+
future==0.18.2
11+
idna==2.10
12+
imageio==2.9.0
13+
imageio-ffmpeg==0.4.3
14+
iso8601==0.1.13
15+
joblib==1.0.0
16+
librosa==0.8.0
17+
llvmlite==0.35.0
18+
lxml==4.6.2
19+
m3u8==0.8.0
20+
moviepy==1.0.3
21+
numba==0.52.0
22+
numpy==1.19.4
23+
packaging==20.8
24+
pikepdf==2.2.2
25+
Pillow==8.0.1
26+
pooch==1.3.0
27+
proglog==0.1.9
28+
psutil==5.8.0
29+
pycparser==2.20
30+
pyparsing==2.4.7
31+
PyPDF2==1.26.0
32+
pytube==10.4.1
33+
requests==2.25.1
34+
resampy==0.2.2
35+
scikit-learn==0.24.0
36+
scipy==1.5.4
37+
selenium==3.141.0
38+
six==1.15.0
39+
SoundFile==0.10.3.post1
40+
termcolor==1.1.0
41+
threadpoolctl==2.1.0
42+
tqdm==4.56.0
43+
typing-extensions==3.7.4.3
44+
urllib3==1.26.2
45+
whatsapp-web==0.0.1

0 commit comments

Comments
 (0)