Skip to content

Commit c5584d2

Browse files
authored
Merge pull request #35 from mytja/beta
Beta
2 parents 7d13ecb + a9580e1 commit c5584d2

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ install:
1111
- pip install python-vlc
1212
- pip install pafy
1313
- pip install bs4
14+
- pip install youtube-dl
15+
- chmod +x oobe
16+
- ./oobe
1417
# command to run tests
1518
script:
1619
- python my.py

StrToInt.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Guinea pig 1.0
2+
# MIT License
3+
# Allowed also as a commercial use, but only with crediting author, like "c MyTja Team"
4+
5+
def convert(lst):
6+
res = sum(d * 10**i for i, d in enumerate(lst[::-1]))
7+
return(res)
8+
9+
def StrToInt(string):
10+
intcount = 0
11+
integers = []
12+
print(len(string))
13+
while (intcount < (len(string))): #this is a loop
14+
i = string[intcount]
15+
# print(i) -- enable this for debugging
16+
if i=="1":
17+
integers.append(1)
18+
elif i=="2":
19+
integers.append(2)
20+
elif i=="3":
21+
integers.append(3)
22+
elif i=="4":
23+
integers.append(4)
24+
elif i=="5":
25+
integers.append(5)
26+
elif i=="6":
27+
integers.append(6)
28+
elif i=="7":
29+
integers.append(7)
30+
elif i=="8":
31+
integers.append(8)
32+
elif i=="9":
33+
integers.append(9)
34+
elif i=="0":
35+
integers.append(0)
36+
37+
print(i)
38+
intcount = intcount + 1
39+
i = string.lower()
40+
if i=="zero":
41+
integers.append(0)
42+
elif string=="one":
43+
integers.append(1)
44+
elif string=="two":
45+
integers.append(2)
46+
elif string=="three":
47+
integers.append(3)
48+
elif string=="four":
49+
integers.append(4)
50+
elif string=="five":
51+
integers.append(5)
52+
elif string=="six":
53+
integers.append(6)
54+
elif string=="seven":
55+
integers.append(7)
56+
elif string=="eight":
57+
integers.append(8)
58+
elif string=="nine":
59+
integers.append(9)
60+
elif string=="ten":
61+
integers.append(10)
62+
else:
63+
return "This string contains unvalid symbols. Check if you have symbols or unvalid letters in string."
64+
intfinal = convert(integers)
65+
return intfinal

media/alarm.wav

1.43 MB
Binary file not shown.

oobe

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ python -m pip install urllib --user
2020
python -m pip install pafy --user
2121
cd ~/Desktop
2222
touch OWM_license.txt
23+
cd MyAssistantOS-Raspbian
2324
python my.py

0 commit comments

Comments
 (0)