skybaks / pyplanet-cup_manager

Competition Management Plugin for Trackmania Pyplanet
GNU General Public License v3.0
6 stars 2 forks source link

Export data directly to clipboard #65

Closed reaby closed 11 months ago

reaby commented 11 months ago

I have issue with the textedit fields, it doesn't keep newlines... Would it be possible for you to automatically export the data to clipboard without ctrl-a ctrl-c from textfield ? You can do this easily with templateview and a small maniascript:

<script><!--
  main() {
  System.ClipboardSet("""{{ str_data }}""");
  }
--></script>

also google sheets export would be nice: it uses simple tab as column separator and newline as line separator example:

for range(x,x):
strdata += f"{value1}\t{value2}\n"
skybaks commented 11 months ago

Would it be possible for you to automatically export the data to clipboard without ctrl-a ctrl-c from textfield ?

image Yes, it is possible! There is a button under the displayed textbox on the export window that will copy the text into your clipboard.

also google sheets export would be nice

For Google sheets, there is already a csv export option (also shown in the screenshot above). It is comma delimited instead of tab delimited but last time I tested sheets seemed to be OK with that.

skybaks commented 11 months ago

I added an icon to the "Copy Text" button in https://github.com/skybaks/pyplanet-cup_manager/commit/93efd2ebc4db78058ff29c0940a191b46190b5ef Hopefully this helps to illuminate the button.