Example #1
0
    def movebatch(self, Form):
        items = []
        for index in xrange(self.listWidget.count()):
            items.append(self.listWidget.item(index))
        labels = [i.text() for i in items]

        i = 0
        for filename in labels:
            OTR_Rename(str(filename)).copy_and_sort()
            i += 1
            self.progressBar.setValue(i)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Search for avi files and move them in the right folder
"""

import os
from otr_rename import OTR_Rename

files = [f for f in os.listdir(".") if f.endswith('.avi')]

for filename in files:
    print filename
    tv_show = OTR_Rename(filename)
    tv_show.copy_and_sort()





Example #3
0
 def move(self, Form):
     a = self.lineEdit.text()
     filename = os.path.relpath(str(a))
     OTR_Rename(filename).copy_and_sort()
Example #4
0
    def getInfo(self, Form):
        a = self.lineEdit.text()
        filename = os.path.relpath(str(a))

        newfilename = OTR_Rename(filename).buildNewFilename()
        self.lineEdit_2.setText(newfilename)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from otr_rename import OTR_Rename

otrfile = OTR_Rename('Die_Simpsons_14.09.15_20-15_pro7_25_TVOON_DE.avi')
filename_neu = otrfile.buildNewFilename()
print filename_neu

otrfile = OTR_Rename('Sleepy_Hollow__This_Is_War_14.09.22_21-00_uswnyw_60_TVOON_DE.avi')
filename_neu = otrfile.buildNewFilename()
print filename_neu

otrfile = OTR_Rename('The_Blacklist_14.02.04_21-15_rtl_60_TVOON_DE.avi.otrkey')
filename_neu = otrfile.buildNewFilename()
print filename_neu

#otrfile.copy_and_sort()

print OTR_Rename('Die_Simpsons_14.09.15_20-15_pro7_25_TVOON_DE.avi').buildNewFilename()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Search for avi files and move them in the right folder
"""

import os
from otr_rename import OTR_Rename
import sys

folder = "."

if __name__ == '__main__':
    if len(sys.argv) == 2:
        folder = sys.argv[1]
    else:
        folder = "."

files = [f for f in os.listdir(folder) if f.endswith('.avi')]

for filename in files:
    print filename
    tv_show = OTR_Rename(os.path.join(folder, filename))
    tv_show.copy_and_sort()