Add paste external script
ClosedPublic

Authored by zhigalin on Sep 17 2017, 5:42 PM.

Details

Summary

One-click paste to hastebin (opensource pastebin)
Pastes the selection or the whole file and opens it in browser

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zhigalin created this revision.Sep 17 2017, 5:42 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptSep 17 2017, 5:42 PM
kfunk requested changes to this revision.Sep 20 2017, 7:31 AM
kfunk added a subscriber: kfunk.

Two problems:
a) Doesn't work on Windows
b) Limits this feature to hastebin.com

Due to lack of a better (quick) solution, please wrap this at least in a:

#ifndef Q_OS_WIN
#endif

A more sophisticated solution would need a pastebin client written in Qt/C++ with a proper GUI to select the pastebin services (hint: http://doc.qt.io/qtcreator/creator-editor-codepasting.html)

This revision now requires changes to proceed.Sep 20 2017, 7:31 AM
zhigalin planned changes to this revision.Sep 30 2017, 7:19 AM
In D7863#147030, @kfunk wrote:

b) Limits this feature to hastebin.com

Why hastebin?
Two reasons:

  1. Don't require a client, a single shell command is enough
  2. It's open source! So It isn't really limited to hastebin.com, anyone could set up his own hastebin instance...

A more sophisticated solution would need a pastebin client written in Qt/C++ with a proper GUI to select the pastebin services (hint: http://doc.qt.io/qtcreator/creator-editor-codepasting.html)

If I have time to do it I would prefer doing something more important like new shiny code helpers, php support, project wizard et.c.

zhigalin updated this revision to Diff 20130.Sep 30 2017, 7:32 AM

Remove scripts on windows

brauch accepted this revision.Sep 30 2017, 7:35 AM
brauch added a subscriber: brauch.

It's a hack but meh, why not. It's not like the "sort selection" script wouldn't have the same problem. While you're at it, probably #ifdef that one as well ...

This revision was automatically updated to reflect the committed changes.