It is currently Sat Apr 27, 2024 3:07 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: my plugin to import a text file to layers, currently alpha version
PostPosted: Mon Jul 31, 2017 3:16 am  (#1) 
Offline
GimpChat Member

Joined: Jul 31, 2017
Posts: 8
It takes a newline delimited utf-8 file and imports each paragraph to a text layer. Not all options are implemented, but the main functionality has been, what is left to do are the vertical alignment and font/later size shrink/expansion functionality. I will get to that as soon as I finish work on another plugin for automated layer processing. Also simple markdown for the bold, italic, etc... styling is on the todo list for this plugin.

There must be a single line with "=====" between each paragraph, or you can use another delimiter such as empty to separate them by a single blank lines.


Attachments:
File comment: the plugin
import_text.py.zip [3 KiB]
Downloaded 239 times
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: my plugin to import a text file to layers, currently alpha version
PostPosted: Mon Jul 31, 2017 7:17 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
Works perfectly for me, thanks, great script!
I noticed there was an error if I tried to use a document that included non-Latin characters, but it's not a huge problem.. still works fine with clear parameters :)

Image


Top
 Post subject: Re: my plugin to import a text file to layers, currently alpha version
PostPosted: Mon Jul 31, 2017 11:15 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
This is good for lyrics, poems and such, can't wait for the updated version!
One thing I was wondering, is it suppose to import each paragraph as separate layer? I got every time one text layer only.
Thank you.


Top
 Post subject: Re: my plugin to import a text file to layers, currently alpha version
PostPosted: Mon Jul 31, 2017 8:14 pm  (#4) 
Offline
GimpChat Member

Joined: Jul 31, 2017
Posts: 8
thanks for the feedback double oh one,

Yeah, if you send ,me a failing sample I will see about fixing the latin character problems. I also noticed a strangeness with some characters. Seems like the utf8 decoding is not doing what I expected.


Last edited by script-dig on Mon Jul 31, 2017 10:05 pm, edited 1 time in total.

Top
 Post subject: Re: my plugin to import a text file to layers, currently alpha version
PostPosted: Mon Jul 31, 2017 8:19 pm  (#5) 
Offline
GimpChat Member

Joined: Jul 31, 2017
Posts: 8
Nidhogg,

Yeah maybe not clear.... if you use an empty delimiter you still need a single blank line between them, in other words that would be two carriage returns:
first bit of text.

second bit of text.
this will be a seperate layer then the first bit.


Also I was lazy to handle \r\n, so I will be fixing that in a later version. I expect I will get to that in the next few days. The "text seperator" field defaults to "=====" which would be:
first bit of text.
=====
second bit of text.
this will be a seperate layer then the first bit.


And yes I have not done intensive testing on this, just for my own purposes so far as it is still at alpha. Once I get the rest of the features in I will do some better testing and documentation.


Top
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Add Alpha Channel to All Layers

1

No new posts script to load text file and create text layer

6

No new posts Attachment(s) Custom Font Paths to Layers version 0.11 Tabbed

8

No new posts Attachment(s) Tabbed Version of Custom Font Paths to Layers v.0.07

2

No new posts Attachment(s) Update to Custom Font Layers from Fonts for Gimp 2.10 to Version 0.07

0



* Login  



Powered by phpBB3 © phpBB Group