Total Revolution Management Console - sign up for a free trial today.

TRMC


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestions / New Updates
#1
I'll update this whenever a new bug fix / update / addition has been added to the Python Koding framework.

If you have any suggestions of what you'd like to see added feel free to post up details in here.

Do
not ask for code to be added for scraping websites or resolving videos. Although I'm happy to add a few video based features if they aren't already natively available in Kodi it's not something that really interests me. There's already plenty of others out there focusing on video content so I aim to continue focusing on improving the other aspects of Kodi.
Reply
#2
v.0.9.9.1.2:

Added Remove_Formatting() function:
Found in the vartools.py file this will cleanup a Kodi string. It can remove color, bold and italic tags as well as preceding spaces, dots and dashes. Particularly useful if you want to show the names of add-ons in alphabetical order where add-on names have deliberately had certain formatting added to them to get them to always show at the top of lists.

CODE: Remove_Formatting(string, [color, bold, italic, spaces, dots, dashes])

AVAILABLE PARAMS:
  • (*) string  -  This is string you want to remove formatting from.
  • color  -  By default this is set to true and all references to the color tag will be removed, set this to false if you don't want color formatting removed
  • bold  -  By default this is set to true and all references to the bold tag will be removed, set this to false if you don't want bold formatting removed.
  • italic  -  By default this is set to true and all references to the italic tag will be removed, set this to false if you don't want italic formatting removed.
  • spaces  -  By default this is set to true and any spaces at the start of the text  will be removed, set this to false if you don't want the spaces removed
  • dots  -  By default this is set to true and any dots (.) at the start of the text will be removed, set this to false if you don't want the dots removed.
  • dashes  -  By default this is set to true and any dashes (-) at the start of the text will be removed, set this to false if you don't want the dashes removed.
EXAMPLE CODE:
Code:
dialog = xbmcgui.Dialog()
mystring = '...-- [I]This[/I]  is the [COLOR dodgerblue]ORIGINAL[/COLOR] [B][COLOR cyan]TEXT[/COLOR][/B]'

dialog.ok('[COLOR gold]ORIGINAL TEXT[/COLOR]','Below is the original text we\'re going to try and clean up:[CR]%s'%mystring)

dialog.ok('[COLOR gold]DOTS REMOVED[/COLOR]','[COLOR gold]Original:[/COLOR][CR]%s[CR][COLOR gold]This is with only dots set to True:[/COLOR][CR]%s'%(mystring,koding.Remove_Formatting(mystring, color=False, bold=False, italic=False, spaces=False, dots=True, dashes=False)))

dialog.ok('[COLOR gold]DOTS & DASHES REMOVED[/COLOR]','[COLOR gold]Original:[/COLOR][CR]%s[CR][COLOR gold]This is with dots & dashes set to True:[/COLOR][CR]%s'%(mystring,koding.Remove_Formatting(mystring, color=False, bold=False, italic=False, spaces=False, dots=True, dashes=True)))

dialog.ok('[COLOR gold]DOTS, DASHES & SPACES REMOVED[/COLOR]','[COLOR gold]Original:[/COLOR][CR]%s[CR][COLOR gold]This is with dots, dashes & spaces set to True:[/COLOR][CR]%s'%(mystring,koding.Remove_Formatting(mystring, color=False, bold=False, italic=False, spaces=True, dots=True, dashes=True)))

dialog.ok('[COLOR gold]ALL FORMATTING REMOVED[/COLOR]','[COLOR gold]Original:[/COLOR][CR]%s[CR][COLOR gold]This is with all options set to True:[/COLOR][CR]%s'%(mystring,koding.Remove_Formatting(mystring)))
Reply
#3
(12-07-2017, 01:42 PM)trevdev Wrote: I'll update this whenever a new bug fix / update / addition has been added to the Python Koding framework.

If you have any suggestions of what you'd like to see added feel free to post up details in here.

Do
not ask for code to be added for scraping websites or resolving videos. Although I'm happy to add a few video based features if they aren't already natively available in Kodi it's not something that really interests me. There's already plenty of others out there focusing on video content so I aim to continue focusing on improving the other aspects of Kodi.


No loss, if you ask me! I have no interest in doing what a million others ave done before, as u well know, I'd rather pursue new ideas....


Sent from my iPhone using Tapatalk
Reply
#4
This message has started appearing maybe by coincidence since the Koding update on the 16th

Duplicate Mode
The following mode already exists
Main
Reply
#5
Thanks for the update bromerzz, I just checked the code and can't see any reference to "main".
There used to be a reference to it in a much older version but that was taken out last year I think.

Could you please try the following:

- Check your code for "main" and make sure it's only set against one function.
- Check what version of Python Koding you're running, the latest is 1.0. It could potentially be someone has re-uploaded an old version to a repo on your system and have incremented the version number.

If you have no joy with the above please send me a copy of your add-on and I'll try and see what's happened.
Reply
#6
Thanks for the reply. Been doing the self help fault finding approach.
I have gone back to a previous saved and fully working back up and all is working fine. When the motivation peaks I will start to install a couple of recent add ons /repos and see which one is causing the problem.
I am on Python 1.0.
Have a feeling its TVA and their Git browser add on that is installing an old repo version.

No sooner than I post and I went back to look at dependencies on a recently installed add on. I see it is using 0.9.6.6 and not .0.0.1.
Maybe that is the problem. WOW.
Reply
#7
I'm not exactly surprised, the powers that be at TVA are total fucking dickheads.

If anyone is offended by this i really couldn't give 2 fucks. I'm only here to help, anyone that talks shit about me or my acquaintances can go fuck themselves.

Sent from my MI MAX using Tapatalk
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)