Skip to content

Commit

Permalink
uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
leopheard committed Nov 30, 2021
0 parents commit d3f7703
Show file tree
Hide file tree
Showing 25 changed files with 345 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: python
python:
- "2.7"
install:
- pip install beautifulsoup4
- pip install nose
- pip install requests
script: nosetests
18 changes: 18 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<a href="https://kodi.tv">KODI<a> (XBMC/OSMC/Firestick) audio addon for the <a href="https://feeds.eff.org/howtofixtheinternet">How To Fix The Internet</a> podcast from the Electronic Frontier Foundation.<br>

<img src="https://github.com/leopheard/howtofixtheinternet/blob/master/resources/media/icon.jpg?raw=true" width="200" height="200" alt="How To Fix The Internet"><br>

The internet is broken—but it doesn’t have to be. If you’re concerned about how surveillance, online advertising, and automated content moderation are hurting us online and offline, the Electronic Frontier Foundation’s How to Fix the Internet podcast offers a better way forward. <a href="https://www.eff.org">EFF</a> has been defending your rights online for over thirty years and is behind many of the biggest digital rights protections since the invention of the internet. Through curious conversations with some of the leading minds in law and technology, this podcast explores creative solutions to some of today’s biggest tech challenges. Hosted by EFF Executive Director Cindy Cohn and EFF Advisor Danny O’Brien, How to Fix the Internet will help you become deeply informed on vital technology issues as we work to build a better technological future together.<br>

<a href="https://www.kodi.tv">Kodi</a> (formerly known as XBMC) is an award-winning free and open source (GPL) software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS and Android, featuring a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet.<br>

<b>^^^^ To install this addon ^^^^</b>, either use the <a href="https://www.tvaddons.co/github-browser-kodi/">Kodi Github installer</a> addon or save the .zip file downloaded from the Code > '<a href="https://github.com/leopheard/howtofixtheinternet/archive/refs/heads/master.zip">Download Zip</a>' button (on this page above) to somewhere the Kodi can access (e.g. network drive or USB stick). Then on the Kodi, go to addons > install from zip file. A repository to auto-update or install from is being worked on.<br>

<br><a href="https://www.kodi.tv"><img src="https://github.com/leopheard/Audio-Podcasts/blob/master/resources/media/about--devices.jpg?raw=true">
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-slate
35 changes: 35 additions & 0 deletions addon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from xbmcswift2 import Plugin, xbmcgui
from resources.lib import mainaddon

plugin = Plugin()
url1 = "https://feeds.eff.org/howtofixtheinternet"
@plugin.route('/')
def main_menu():
items = [
{
'label': plugin.get_string(30001),
'path': plugin.url_for('episodes1'),
'thumbnail': "https://github.com/leopheard/howtofixtheinternet/blob/master/resources/media/icon.jpg?raw=true"},
{
'label': plugin.get_string(30002),
'path': plugin.url_for('episodes2'),
'thumbnail': "https://github.com/leopheard/howtofixtheinternet/blob/master/resources/media/icon.jpg?raw=true"},
]
return items

@plugin.route('/episodes1/')
def episodes1():
soup1 = mainaddon.get_soup1(url1)
playable_podcast1 = mainaddon.get_playable_podcast1(soup1)
items = mainaddon.compile_playable_podcast1(playable_podcast1)
return items

@plugin.route('/episodes2/')
def episodes2():
soup1 = mainaddon.get_soup1(url1)
playable_podcast2 = mainaddon.get_playable_podcast2(soup1)
items = mainaddon.compile_playable_podcast2(playable_podcast2)
return items

if __name__ == '__main__':
plugin.run()
34 changes: 34 additions & 0 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.howtofixtheinternet" name="How To Fix The Internet" version="1.0.0" provider-name="leopheard">
<requires>
<import addon="xbmc.python" version="2.26.0"/>
<import addon="script.module.xbmcswift2" version="2.4.0"/>
<import addon="script.module.beautifulsoup4" version="4.3.1"/>
<import addon="script.module.requests" version="1.1.0"/>
<import addon="script.module.routing" version="0.2.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>audio</provides>
</extension>
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<language>en_us</language>
<summary lang="en">How To Fix The Internet</summary>
<description lang="en">The internet is broken—but it doesn’t have to be. If you’re concerned about how surveillance, online advertising, and automated content moderation are hurting us online and offline, the Electronic Frontier Foundation’s How to Fix the Internet podcast offers a better way forward. EFF has been defending your rights online for over thirty years and is behind many of the biggest digital rights protections since the invention of the internet. Through curious conversations with some of the leading minds in law and technology, this podcast explores creative solutions to some of today’s biggest tech challenges. Hosted by EFF Executive Director Cindy Cohn and EFF Advisor Danny O’Brien, How to Fix the Internet will help you become deeply informed on vital technology issues as we work to build a better technological future together.</description>
<license>The MIT License (MIT)</license>
<forum></forum>
<email>[email protected]</email>
<source>https://github.com/leopheard/howtofixtheinternet</source>
<website>https://feeds.eff.org/howtofixtheinternet</website>
<assets>
<icon>resources/media/icon.jpg</icon>
<fanart>resources/media/icon.jpg</fanart>
<screenshot>resources/media/1.jpg</screenshot>
<screenshot>resources/media/2.jpg</screenshot>
<screenshot>resources/media/3.jpg</screenshot>
<screenshot>resources/media/4.jpg</screenshot>
<screenshot>resources/media/5.jpg</screenshot>
<screenshot>resources/media/icon.jpg</screenshot>
</assets>
</extension>
</addon>
9 changes: 9 additions & 0 deletions auto-github.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
git init

git add .

git commit -m "uploads"

git push -u -f origin master

read
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__Version 1.0.0__
1. Initial working version
12 changes: 12 additions & 0 deletions github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: #
3 changes: 3 additions & 0 deletions gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pyc
auto.sh
image.sh
Empty file added resources/__init__.py
Empty file.
Binary file added resources/__init__.pyo
Binary file not shown.
29 changes: 29 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Kodi Media Center language file
# Addon Provider: leopheard
msgid ""
msgstr ""
"Project-Id-Version: Kodi Addons\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2019-08-12 HO:MI+ZONE\n"
"PO-Revision-Date: 2019-08-12 HO:MI+ZONE\n"
"Last-Translator: Kodi Translation Team\n"
"Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgctxt "#30001"
msgid "Latest episodes"
msgstr ""

msgctxt "#30002"
msgid "All episodes"
msgstr ""

msgctxt "#30003"
msgid ""
msgstr ""

# empty string with id 32003
29 changes: 29 additions & 0 deletions resources/language/resource.language.en_us/strings.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Kodi Media Center language file
# Addon Provider: leopheard
msgid ""
msgstr ""
"Project-Id-Version: Kodi Addons\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2019-08-12 HO:MI+ZONE\n"
"PO-Revision-Date: 2019-08-12 HO:MI+ZONE\n"
"Last-Translator: Kodi Translation Team\n"
"Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgctxt "#30001"
msgid "Latest episodes"
msgstr ""

msgctxt "#30002"
msgid "All episodes"
msgstr ""

msgctxt "#30003"
msgid ""
msgstr ""

# empty string with id 32003
Empty file added resources/lib/__init__.py
Empty file.
Binary file added resources/lib/__init__.pyo
Binary file not shown.
71 changes: 71 additions & 0 deletions resources/lib/mainaddon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import requests
import re
from bs4 import BeautifulSoup

def get_soup1(url1):
page = requests.get(url1)
soup1 = BeautifulSoup(page.text, 'html.parser')
print("type: ", type(soup1))
return soup1

def get_playable_podcast1(soup1):
subjects = []
for content in soup1.find_all('item', limit=14):
try:
link = content.find('enclosure')
link = link.get('url')
print("\n\nLink: ", link)
title = content.find('title')
title = title.get_text()
thumbnail = content.find('itunes:image')
thumbnail = thumbnail.get('href')
except AttributeError:
continue
item = {
'url': link,
'title': title,
'thumbnail': thumbnail,
}
subjects.append(item)
return subjects
def compile_playable_podcast1(playable_podcast1):
items = []
for podcast in playable_podcast1:
items.append({
'label': podcast['title'],
'thumbnail': podcast['thumbnail'],
'path': podcast['url'],
'is_playable': True,
})
return items

def get_playable_podcast2(soup1):
subjects = []
for content in soup1.find_all('item'):
try:
link = content.find('enclosure')
link = link.get('url')
print("\n\nLink: ", link)
title = content.find('title')
title = title.get_text()
thumbnail = content.find('itunes:image')
thumbnail = thumbnail.get('href')
except AttributeError:
continue
item = {
'url': link,
'title': title,
'thumbnail': thumbnail,
}
subjects.append(item)
return subjects
def compile_playable_podcast2(playable_podcast2):
items = []
for podcast in playable_podcast2:
items.append({
'label': podcast['title'],
'thumbnail': podcast['thumbnail'],
'path': podcast['url'],
'is_playable': True,
})
return items
Binary file added resources/lib/mainaddon.pyo
Binary file not shown.
Binary file added resources/media/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/media/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/media/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/media/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/media/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/media/icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions resources/media/image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
convert -resize 512x512 icon.jpg icon.jpg
convert -resize 512x512 icon.jpeg icon.jpg
convert -resize 512x512 icon.png icon.jpg
convert -resize 512x512 logo.jpg icon.jpg
convert -resize 512x512 logo.png icon.jpg
convert -resize 512x512 logo.jpeg icon.jpg
convert -resize 512x512 logo.svg icon.jpg
convert -resize 512x512 icon.svg icon.jpg
convert -resize 512x512 600x600bb.jpg icon.jpg
convert -resize 512x512 1.jpg 1.jpg
convert -resize 512x512 1.jpeg 1.jpg
convert -resize 512x512 1.png 1.jpg
convert -resize 512x512 2.jpeg 2.jpg
convert -resize 512x512 2.jpg 2.jpg
convert -resize 512x512 2.png 2.jpg
convert -resize 512x512 3.jpeg 3.jpg
convert -resize 512x512 3.jpg 3.jpg
convert -resize 512x512 3.png 3.jpg
convert -resize 512x512 4.jpeg 4.jpg
convert -resize 512x512 4.jpg 4.jpg
convert -resize 512x512 4.png 4.jpg
convert -resize 512x512 5.jpeg 5.jpg
convert -resize 512x512 5.jpg 5.jpg
convert -resize 512x512 5.png 5.jpg
convert -resize 512x512 6.jpeg 6.jpg
convert -resize 512x512 6.jpg 6.jpg
convert -resize 512x512 6.png 6.jpg
convert -resize 512x512 7.jpeg 7.jpg
convert -resize 512x512 7.jpg 7.jpg
convert -resize 512x512 7.png 7.jpg
convert -resize 512x512 8.jpeg 8.jpg
convert -resize 512x512 8.jpg 8.jpg
convert -resize 512x512 8.png 8.jpg
convert -resize 512x512 9.jpeg 9.jpg
convert -resize 512x512 9.jpg 9.jpg
convert -resize 512x512 9.png 9.jpg
convert -resize 512x512 9.jpeg 9.jpg
convert -resize 512x512 10.jpg 10.jpg
convert -resize 512x512 10.png 10.jpg
convert -resize 512x512 10.jpeg 10.jpg
convert -resize 512x512 11.jpg 11.jpg
convert -resize 512x512 11.png 11.jpg
convert -resize 512x512 11.jpeg 11.jpg
convert -resize 512x512 12.jpg 12.jpg
convert -resize 512x512 12.png 12.jpg
convert -resize 512x512 12.jpeg 12.jpg
convert -resize 512x512 13.jpg 13.jpg
convert -resize 512x512 13.png 13.jpg
convert -resize 512x512 13.jpeg 13.jpg
convert -resize 512x512 14.jpg 14.jpg
convert -resize 512x512 14.png 14.jpg
convert -resize 512x512 14.jpeg 14.jpg
convert -resize 512x512 15.jpg 15.jpg
convert -resize 512x512 15.png 15.jpg
convert -resize 512x512 15.jpeg 15.jpg
convert -resize 512x512 16.jpg 16.jpg
convert -resize 512x512 16.png 16.jpg
convert -resize 512x512 16.jpeg 16.jpg
convert -resize 512x512 17.jpg 17.jpg
convert -resize 512x512 17.png 17.jpg
convert -resize 512x512 17.jpeg 17.jpg
convert -resize 512x512 18.jpg 18.jpg
convert -resize 512x512 18.png 18.jpg
convert -resize 512x512 18.jpeg 18.jpg
convert -resize 512x512 19.jpg 19.jpg
convert -resize 512x512 19.png 19.jpg
convert -resize 512x512 19.jpeg 19.jpg
convert -resize 512x512 20.jpg 20.jpg
convert -resize 512x512 20.png 20.jpg
convert -resize 512x512 20.jpeg 20.jpg
convert -resize 1280x720 fanart.jpg fanart.jpg
convert -resize 1280x720 fanart.jpeg fanart.jpg
convert -resize 1280x720 fanart.png fanart.jpg
convert -resize 1280x720 fanart.svg fanart.jpg
convert -resize 1280x720 fanart1.svg fanart1.jpg
convert -resize 1280x720 fanart1.jpg fanart1.jpg
convert -resize 1280x720 fanart1.jpeg fanart1.jpg
convert -resize 1280x720 fanart1.png fanart1.jpg
convert -resize 1280x720 fanart2.svg fanart2.jpg
convert -resize 1280x720 fanart2.jpg fanart2.jpg
convert -resize 1280x720 fanart2.jpeg fanart2.jpg
convert -resize 1280x720 fanart2.png fanart2.jpg
read

0 comments on commit d3f7703

Please sign in to comment.