Skip to content

Instantly share code, notes, and snippets.

@X-88
Created October 28, 2019 18:10
Show Gist options
  • Save X-88/a7468b6abf66692da0964117d2177098 to your computer and use it in GitHub Desktop.
Save X-88/a7468b6abf66692da0964117d2177098 to your computer and use it in GitHub Desktop.
Playlist Generator for DVB S2 Skybox
####################################
## App Name: Z-PlayList Generator ##
## Language : Python 3xxx. ##
## Coded by: Zephio ##
## Date : 16-Nop-2018 ##
## Target : Skybox. ##
####################################
import os
x = 0
ifn = "/storage/emulated/0/List.txt"
ofn = "/storage/emulated/0/custom_url.txt"
if os.path.isfile(ifn) and os.access(ifn, os.R_OK):
print ('\n ##############################\n App Name: Z-Playlist Generator\n Coded by: Zephio\n Date: 16-11-2018\n ##############################\n Info: File Exists\n Process Done!...')
else:
print ('info: file not found')
with open(ifn, 'r') as f:
l = list(f)
with open(ofn, 'w') as s:
while x < len(l):
a = os.path.basename(l[x])
e = os.path.splitext(a)[0]
s.write(format('%s%s%s' % (e, ', ', l[x])))
x += 1
f.close()
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment