New system plugin "Write result to file"

Got a good idea? You can suggest new features here.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: New system plugin "Write result to file"

Post by Pako » Fri Oct 03, 2008 6:57 pm

Bitmonster wrote:But after thinking about it, I'm not sure, if an input data encoding is really needed.
I know that the vast majority of cases it is not useful.
Therefore I also chose the default encoding "unicode internal". But I am convinced that it is not unnecessary. For instance I can receive data from serial port, from another program, etc. Don't forget, that the ordinary people who will not be able to use scripting.
Pako

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: New system plugin "Write result to file"

Post by Bitmonster » Fri Oct 03, 2008 7:13 pm

But if you get wrong chars from the serial port, the serial plugin has to do the input encoding. (This is actually missing in the serial plugin and this is a bug.) If you have a plugin that generates a playlist for example, the strings in the playlist should already be decoded to unicode. If you do otherwise and combine the two, there would be no way to handle it right, because there might be no common encoding.

So actually there is only one way to do it right: every code that receives something from the outside world has to immediately do the decoding to unicode and everything that sends something to the outside world has to do the encoding in the last step.

The longer I think about it, the more convinced I get, that we should drop the idea to give a choice of the input data encoding here.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: New system plugin "Write result to file"

Post by Pako » Fri Oct 03, 2008 7:44 pm

Bitmonster wrote:The longer I think about it, the more convinced I get, that we should drop the idea to give a choice of the input data encoding here.
That is true, and I can cancel it.
But consider one more option. I am still not wrote that plugin also provides eg.result. eg.result is the string that I get after decoding. I brought the idea that this plugin may be more universal.
Can also read the data from the specified file.
He should appoint a "Read / write file". What do you think? I got to add this feature?
Pako

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: New system plugin "Write result to file"

Post by Pako » Sat Oct 04, 2008 8:37 am

I was thinking about it, and came to this conclusion:
Plugin will have two actions (Read and Write).
Action Write will look the way you recommended.
eg.result is the input string after parsing. Is this reasonable?
Layout is as follows:
R_W_TF-Action_Write.png
Action Read I only start to do.

I thank you for your patience with me!
Pako

User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: New system plugin "Write result to file"

Post by Bitmonster » Sat Oct 04, 2008 4:03 pm

Ok, maybe we should add this as a "File Operations" plugin.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!

Post Reply