Can I do that with scripting?

Discussion about writing code for Inkscape.
ajay14
Posts: 1
Joined: Wed Aug 23, 2017 7:22 am

Can I do that with scripting?

Postby ajay14 » Fri Sep 08, 2017 7:49 pm

[I'm not good with English, so please bear with me]
This is a very simple question.
So let me explain.
I am currently working in this project [film] , wherein i have make images of lots of text messages being sent and received, using Instagram's direct messaging chat interface... That is... I need to make images of conversations... [Screenshots, to be exact]
Each of the texts we send on Instagram has a rounded rectangle enclosing the sent text. Since I have to make this rounded rectangle a lot of times, it takes so much time to make those images.
What I need is a script (i don't know what it is in Inkscape... I think that it's something similar to Script-Fu of gimp) which presents me with a dialog box asking for the text. After I have entered the text, it must provide me with the text enclosed by the rounded rectangle...
And the text must also word-wrap itself in order to accommodate the width of the display.. So let's assume that the phone has a 1080p 16:9 display. Or maybe we can limit the number of characters on a single line
Can this be done with Inkscape? Is there scripts already available that could do this? Please help me out.
Thank you for reading... :)

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Can I do that with scripting?

Postby tylerdurden » Fri Sep 08, 2017 10:17 pm

That could be pretty complicated.

Why not find a screen recorder and actually record Instagram messaging in use?
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Can I do that with scripting?

Postby Moini » Sat Sep 09, 2017 1:38 am

I don't know of any extension that can do that currently. There is one that allows you to insert texts into preset positions, but it does not adapt any sizes (Generator: http://wiki.inkscape.org/wiki/index.php ... #Generator).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Can I do that with scripting?

Postby v1nce » Sun Sep 10, 2017 4:02 am

With a screenshot It'll be easier to understand (for non instagram user)

If I'd have to do it, I'll probably do it in html+javascript

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Can I do that with scripting?

Postby brynn » Sun Sep 10, 2017 3:06 pm

You don't have to say. But if you can, I'm just curious why you need to make such images?

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Can I do that with scripting?

Postby tylerdurden » Sun Sep 10, 2017 9:45 pm

Explained in first post .

ajay14 wrote:So let me explain.
I am currently working in this project [film] , wherein i have make images of lots of text messages being sent and received, using Instagram's direct messaging chat interface... That is... I need to make images of conversations... [Screenshots, to be exact]
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Can I do that with scripting?

Postby brynn » Mon Sep 11, 2017 12:31 am

Of course I read that. But I don't immediately see the connection between making a film and needing text messages set into rounded rectangles. Are the rounded rectangles with text messages actually going to be in the film? Do they need to be animated, or scroll? Or he wants to share text messages with the entire crew? Or needs to document certain conversations? Or....??

Often we find that the context matters a lot.

Edit
Actually, I've seen text messages printed out like that. I don't know how it's done, because I don't use text messaging. But there does seem to be some way to print them out.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Can I do that with scripting?

Postby tylerdurden » Mon Sep 11, 2017 4:47 am

Messaging generally looks like this:
Image

As you can see, it's a dynamic process, the boxes fitting the text, plus there are often images, emoji, etc.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Can I do that with scripting?

Postby brynn » Tue Sep 12, 2017 1:49 pm

Well I know what text messaging looks like. I do occassionally have to tell someone they have the wrong number and leave me alone. But I've seen text message threads printed out where each message is in a rounded rectangle. Actually I've seen 2 different forms. One is the rounded rectangles, which I don't remember clearly....seems like there was some pink in the rectangles, maybe with a couple of outset bands.

The other is something like text balloons or text bubbles, whatever you want to call them. Something like attached....rats, not sure if I can attach here.... Yeah, not allowed.

Something like this

Image

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Can I do that with scripting?

Postby tylerdurden » Wed Sep 13, 2017 10:36 pm

Not exactly...

As in the animated Gif higher above, the text stays the same size, the lines break depending on the size of the message-app window, the bubbles fit to the text HxW (not the other way around) and the bubbles scroll up as the conversation develops.

So, not easy to script/automate in Inkscape. Very easy to record from a screen.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Can I do that with scripting?

Postby brynn » Fri Sep 15, 2017 8:10 am

Yes, I took a sort of liberty by making the text smaller in one of the boxes. In reality, the text would be the same size, and the box would be much larger. I just wanted to show how the printouts that I've seen are using the sort of speech bubbles or balloons or whatever.

I have no idea how the user gets the discussions from the phone into a printout. All I know is that it's possible, somehow.


Return to “Programming”