-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sort images alphabetical #8
Comments
Hello
I can't do it
pt., 23 gru 2022 o 09:17 Mohammed Elsafty ***@***.***>
napisał(a):
… Dear, gutosie
could you please make command lines to sort images alphabetical in main
screen?
or can you sort alphabetical images in main screen?
thanks
Drogi, Gutosie
czy mógłbyś zrobić wiersze poleceń, aby sortować obrazy alfabetycznie na
ekranie głównym?
czy możesz sortować obrazy alfabetycznie na ekranie głównym?
dzięki
—
Reply to this email directly, view it on GitHub
<#8>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6UD5GW2EHVCVNGUM74QYLWOVGYDANCNFSM6AAAAAATHO42LY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Dear, gutosie Finally I did it .**every thing is working smoothly , I changed some code lines in plugin to sort images alphabetically** the changes in 2 files : In plugin.py : `class NeoBootImageChoose(Screen): ... (existing code)
... (existing code)
... (remaining code)`In neoreboot : `def updateInfo(self):
... (remaining code)`Results : and for repairing NeoReboot.py in all images : I made this bash script :
Thank you so much for your great plugin . Mohamed Elsafty |
Super, thank you very much please send me plugin.py
W dniu sob., 27.07.2024 o 16:01 Mohammed Elsafty ***@***.***>
napisał(a):
… *Dear, gutosie*
Finally I did it .
**every thing is working smoothly ,
Now your plugin is exclusive plugin that can sort images.
I changed some code lines in plugin to sort images alphabetically**
*the changes in 2 files : plugin.py >> [
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot ] neoreboot >> [
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files ]*
In plugin.py :
`class NeoBootImageChoose(Screen):
... (existing code)
def updateList(self):
... (existing code)
if mypath2 == 'Flash':
image = getImageDistroN()
writefile = open('%sImageBoot/.Flash' % getNeoLocation(), 'w')
writefile.write(image)
writefile.close()
image = ' [' + image + ']'
self.list.append('Flash' + image)
elif fileExists('%sImageBoot/.Flash' % getNeoLocation()):
f = open('%sImageBoot/.Flash', 'r' % getNeoLocation())
image = f.readline().strip()
f.close()
image = ' [' + image + ']'
self.list.append('Flash' + image)
self['label5'].setText(mypath)
if fileExists('/.multinfo'):
f2 = open('/.multinfo', 'r')
mypath3 = f2.readline().strip()
f2.close()
self['label6'].setText(mypath3)
else:
f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r')
mypath3 = f2.readline().strip()
f2.close()
self['label6'].setText(mypath3)
# Retrieve the list of images and ignore the "Flash" image
mypath = ('%sImageBoot' % getNeoLocation())
myimages = listdir(mypath)
self.list = [fil for fil in myimages if os.path.isdir(os.path.join(mypath, fil)) and fil != 'Flash'] # Ignore the "Flash" image
# Sort the list before setting it to config (case-insensitive)
self.list = sorted(self.list, key=lambda x: x.lower())
# Add the "Flash [My image = egami 10.5R7]" image to the list
if fileExists('%sImageBoot/.Flash' % getNeoLocation()):
f = open('%sImageBoot/.Flash' % getNeoLocation(), 'r')
image = f.readline().strip()
f.close()
image = ' [' + image + ']'
self.list.insert(0, 'Flash' + image) # Insert the "Flash" image at the beginning of the list
self['config'].setList(self.list)
self['label7'].setText(str(len(self.list) - 1))
self['config'].setList(self.list)
strview = PLUGINVERSION
self['label9'].setText(strview)
KERNELVERSION = getKernelImageVersion()
strview = KERNELVERSION
self['label20'].setText(strview)
self['label17'].setText(readline('/etc/hostname'))
self['label19'].setText(readline('%sImagesUpload/.kernel/used_flash_kernel' % getNeoLocation()))
strview = UPDATEVERSION
self['label10'].setText(strview)
... (remaining code)`
1.png (view on web)
<https://github.com/user-attachments/assets/22dd1579-ad0f-45f8-88eb-2bc5a62760b8>
2.png (view on web)
<https://github.com/user-attachments/assets/ca3d249e-3ac3-46ff-936c-71db7b10d66e>
*Results :*
1_0_1_8AA_16_800_DCA0000_0_0_0_20240726235340.jpg (view on web)
<https://github.com/user-attachments/assets/9be6c80e-f114-4ecf-b2fa-015ff871fdab>
1_0_1_8AA_16_800_DCA0000_0_0_0_20240726235353.jpg (view on web)
<https://github.com/user-attachments/assets/f7f99367-67b6-469c-9e6e-f0177bba8955>
1_0_1_8AA_16_800_DCA0000_0_0_0_20240726235357.jpg (view on web)
<https://github.com/user-attachments/assets/e33e4a5f-75f9-4f14-8a85-6f117f24ddd8>
1_0_1_8AA_16_800_DCA0000_0_0_0_20240726235403.jpg (view on web)
<https://github.com/user-attachments/assets/66725ddd-9d96-4d8e-9ddd-4694f600b8b7>
*In neoreboot :*
`def updateInfo(self):
self.list = []
pluginpath = '' + LinkNeoBoot + ''
f = open(pluginpath + '/.location', 'r')
mypath = f.readline().strip()
f.close()
curimage = 'Flash'
if fileExists('/.multinfo'):
f = open('/.multinfo', 'r')
curimage = f.readline().strip()
f.close()
strview = _('Current Running Image: ') + curimage
self.curimage = curimage
self['lab1'].setText(strview)
linesdevice = open('' + LinkNeoBoot + '/.location', 'r').readlines()
deviceneo = linesdevice[0][0:-1]
device = deviceneo
devicelist = ['cf',
'hdd',
'card',
'usb',
'usb2']
for d in listdir('' + getNeoLocation() +''):
if d == 'ImageBoot':
continue
test = '' + getNeoLocation() +'' + d + '/.neonextboot'
if fileExists(test):
device = d
strview = _('NeoBoot Installed on: ') + device
self['lab2'].setText(strview)
imageslist = ['Flash']
for fn in sorted(listdir('' + getNeoLocation() + '/ImageBoot'), key=lambda x: x.lower()):
dirfile = '' + getNeoLocation() + '/ImageBoot/' + fn
if os_isdir(dirfile):
imageslist.append(fn)
self['list'].list = imageslist
... (remaining code)`
neoreboot.py.png (view on web)
<https://github.com/user-attachments/assets/b64a6213-143f-448c-bbd4-4f6013bf0d16>
*Results :*
1_0_1_70D_12_800_DCA0000_0_0_0_20240727022500.jpg (view on web)
<https://github.com/user-attachments/assets/e51e59ba-e2a9-40a1-ab07-b3151681496a>
*and for repairing NeoReboot.py in all images :*
*I made this bash script :*
#!/bin/bash for folder in
/media/hdd/ImageBoot/*/usr/lib/enigma2/python/Plugins/Extensions/NeoReboot;
do for file in "$folder"/plugin.*; do if [ -f "$file" ]; then rm -f "$file"
fi done cp -af
'/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neoreboot'
"$folder/plugin.py" done exit 0
you can merge it in next version
Thank you so much for your great plugin .
Mohamed Elsafty
one of neoboot adores
—
Reply to this email directly, view it on GitHub
<#8 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6UD5FEU3BCBYGFORGGHYLZOOK2VAVCNFSM6AAAAABLR3VKHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGE2DGNBYGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
you are welcome dear |
dear gutosie this my modification to sort images in tools |
Dear, gutosie
could you please make command lines to sort images alphabetical in main screen?
or can you sort alphabetical images in main screen?
thanks
Drogi, Gutosie
czy mógłbyś zrobić wiersze poleceń, aby sortować obrazy alfabetycznie na ekranie głównym?
czy możesz sortować obrazy alfabetycznie na ekranie głównym?
dzięki
The text was updated successfully, but these errors were encountered: