[tw] Re: Ann: Script to split text esp. for TiddlyPocketBook

2009-07-19 Thread Mark S.

For what its worth, I've added the ability to specify tags, and a
prepend and post-pend string, since I find its often useful to wrap
the resulting text in something to force a smaller font.

-- Mark

On Jul 16, 11:52 am, Ken Girard ken.gir...@gmail.com wrote:
 Interesting. I can see it also being useful for taking long stories/
 articles and quickly making them screen/page sized. (I find that I get
 more out of my reading when I don't have to keep scrolling, plus it
 make searchs a lot more exact)

 Ken Girard

 On Jul 16, 12:09 am, Mark S. throa...@yahoo.com wrote:

  Now that there's a way to make TiddlyPocketBooks (aka PocketMod) with
  TW, I'm looking for ways to easily create portable documents. My
  current technique is to create one central library with various sets
  of 8 pages that make up the PocketBook. I pull the pages into the
  PocketBook using Eric Shulman's ExternalTiddlerPlugin and  a control
  tiddler to specify the base names of the pages I want, where each page
  is numbered like Tiddler1, Tiddler2, etc.

  One problem is that when sourcing new material, it can be tedious to
  split it into 8 chunks of about the right size. So, here's my first
  stab at it:

   http://marksbasement.tiddlyspot.com/#SplitTextIntoTiddlers

  Open it up to read the documentation and view the supporting
  requirements.

  This script will allow you to split up a large chunk of copied text
  into however many tiddlers you want, using a specified base (stem)
  name for the generated tiddlers. It currently uses a character count
  to to determine the break point, along with word boundaries. A
  character count isn't perfect, but unless someone can point me to a
  technique that can readily calculate the space a given bit of text
  with a given font will take inside a specified box, it will have to
  do. Picking the right character count for your particular project
  should get you pretty close, and make the job mostly one of tweaking
  here or there afterward.

  Thanks to everyone, especially Eric, for all the help and examples in
  these forums that makes it possible to create these types of scripts.

  -- Mark


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~--~~~~--~~--~--~---



[tw] Re: Ann: Script to split text esp. for TiddlyPocketBook

2009-07-18 Thread Ken Girard

Can I ask for one small addition? A way to give the created tiddlers
tags (default would either be blank or maybe the Tiddler Stem name so
they are grouped together).

Ken Girard

On Jul 16, 11:38 pm, Mark S. throa...@yahoo.com wrote:
 Realizing that there are often situations where I can be sure of the
 line width (especially items like grocery lists, long todos, etc),
 I've added the ability to divide up the text by number of lines as
 well.

 Thanks
 Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~--~~~~--~~--~--~---



[tw] Re: Ann: Script to split text esp. for TiddlyPocketBook

2009-07-18 Thread Mark S.

That sounds doable. You can already give them tags indirectly -- if a
tiddler with the stem name already exists, each created tiddler will
have the same tags.

-- Mark

On Jul 18, 7:05 am, Ken Girard ken.gir...@gmail.com wrote:
 Can I ask for one small addition? A way to give the created tiddlers
 tags (default would either be blank or maybe the Tiddler Stem name so
 they are grouped together).

 Ken Girard

 On Jul 16, 11:38 pm, Mark S. throa...@yahoo.com wrote:

  Realizing that there are often situations where I can be sure of the
  line width (especially items like grocery lists, long todos, etc),
  I've added the ability to divide up the text by number of lines as
  well.

  Thanks
  Mark


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~--~~~~--~~--~--~---



[tw] Re: Ann: Script to split text esp. for TiddlyPocketBook

2009-07-18 Thread Mark S.

Well, drat ... that almost does everything. Should have checked ;-)

But it would need a by character and by line count because that's
the only feasible way to split up most free-wrapping text. Hmm, is it
possible to do that with the regular expression item seperator?
Something like /.{400}/ ? But even if that works, mine backs up to
find the whole last word. But that's not very important. Having a
count though is important for the pocketbook application, because each
pocketbook tiddler page can only contain so many characters or so many
lines

The other thing mine does ... is to stop after x number of tiddlers.
This is important for the pocketbook application, because everything
is being done in octets, and you'll want to change the tiddler stem
name after 8 pages. Hmm ... or maybe I should just change the way I
suck in the octets, so that I can specify a base number at which to
start counting.

A lot to think about.

Thanks!
Mark


On Jul 18, 8:36 am, Eric Shulman elsdes...@gmail.com wrote:
  This script will allow you to split up a large chunk of copied text
  into however many tiddlers you want, using a specified base (stem)
  name for the generated tiddlers. It currently uses a character count
  to to determine the break point, along with word boundaries.

 http://www.TiddlyTools.com/#SplitTiddler

 also lets you divide the content from a single tiddler into multiple
 smaller tiddlers.  However, rather than using a character or line
 count, SplitTiddler divides the content by matching a specified 'item
 separator' character sequence... but it shouldn't be too hard for me
 to add options for 'split by character' or 'split by line'...

 enjoy,
 -e
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~--~~~~--~~--~--~---



[tw] Re: Ann: Script to split text esp. for TiddlyPocketBook

2009-07-16 Thread Mark S.



Realizing that there are often situations where I can be sure of the
line width (especially items like grocery lists, long todos, etc),
I've added the ability to divide up the text by number of lines as
well.

Thanks
Mark

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~--~~~~--~~--~--~---