[tw] Re: Convert HTML to TW5 Tables?

2016-03-25 Thread Duarte Farrajota Ramos
Ok, gave it a quick test and also updated my CKEditor while I was at it, 
and it seems a lot more stable and usable now, CKEditor now correctly 
resizes and errors seem less frequent.
Some script errors here and there but they are most likely caused by 
CKeditor plugins not Tiddlywiki itself (I've noticed that the "Store in 
Browser" plugin is often the culprit, and frequently generates problems)

Once again many thanks for the update. I'll keep using it regularly as I 
always do, if I find any problems I'll let you know.

On Friday, 25 March 2016 17:01:31 UTC, Duarte Farrajota Ramos wrote:
>
> Hey that's great news BJ, gonna give it a try as soon as I get a chance. 
> Thanks for the update
>
> On Friday, 25 March 2016 10:32:41 UTC, BJ wrote:
>>
>>
>>
>> On Friday, March 25, 2016 at 4:33:22 AM UTC, Duarte Farrajota Ramos wrote:
>>>
>>> The way I see it you could try two different methods
>>>
>>>
>>>1. If you really want to edit them directly inside TiddlyWiki in a 
>>>WYSIWYG manner you could try using the fantastic CKEditor plugin for 
>>>TiddlyWiki 
>>> 
>>>by BJ. It as its fair share of rough edges but I've been using it for 
>>> quite 
>>>a while now and it does it's job well if you put up with it's bugs.
>>>
>>> Hi Duarte, I have made some improvement in the latest version (at 
>> http://bjtools.tiddlyspot.com)
>> cheers
>> BJ 
>>
>>>
>>>1. Since it is an HTML table you can simply copy paste it directly 
>>>into the text area. If you make a custom local install of CKEditor you 
>>> can 
>>>include one of the table editing plugins and have an almost full fledged 
>>>WYSIWYG table editor in TiddlyWiki without any coding or dealing with 
>>> wiki 
>>>text.
>>>
>>>2. Most spreadsheet applications can receive data from HTML tables 
>>>by simple copy paste, like Google Docs, Excel, LibreOffice etc. just 
>>> copy 
>>>your table and paste it wherever you feel most comfortable working. From 
>>>there it should be fairly easy to export to any other more TiddlyWiki 
>>>friendly format like CSV. Last i checked LibreOffice had a pretty decent 
>>>CSV importer/exporter. You can then use any text editor or utility with 
>>>find and replace or regex to tame your table into submission, and 
>>> replace 
>>>any CSV with wiki text delimiters.
>>>
>>>
>>>
>>> On Wednesday, 23 March 2016 16:35:58 UTC, Ed wrote:

 Dear All,

 At work I have a database and I want to get the info into TW5.
 The only way that I can do it is exporting an item to HTML and
 that I can put in a tiddler. That works. It looks even OK>

 But editing that whole HTML-mess it is a downright nuisance, 
 really too much work as there about 1500 - 2000 items.

 I'v been looking at converters online and I can make e.g. PDFs, 
 Excels or or lightly fornatted text.

 Is there a way to convert HTML right away to TW5 tables?
 Thanks is advance
 Salut! Edm.

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/43a7e87a-c73b-4f36-a429-ef631556a00f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Eric Shulman
On Friday, March 25, 2016 at 4:10:03 PM UTC-7, Mark S. wrote:
>
> Hi Eric,
>
> That seems to be the final tweak. I put the triple quotes in (not BJ) 
> before I realized that the name/argument were mismatched. I fixed the 
> mismatch, but should have removed the quotes.
>
> I'm still very confused about all this.  If all that a macro does is 
> substitution, how does it help to put everything inside of the macro? For 
> instance, the line:
>

> <$set name="text2convert"  value={{$x$}}  >
>

The macro just assembles the code, but the parsing of the parameter value 
is done afterwards, when the fully expanded macro is *rendered* in the 
calling context.  Putting everything inside a macro definition allows you 
to use the $x$ and $(x)$ syntax for substitutions of params and variables.

-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8e042661-ba19-4182-ba96-6ae23054dfeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] [TW5] Presenting Klugey HTML to TW5 converter

2016-03-25 Thread 'Mark S.' via TiddlyWiki
This is really kind of klugey (sp?) but it gets you (or at least me) about 
90% of the way towards turning HTML from web pages into TW5 mark-up. It 
attempts to convert most common markups including links, images and tables.

Someone who understood TW5 better would probably build a DOM tree 
structure, and then parse out the parts piece by piece. 

What I did was to simply apply a series of regular expressions. The problem 
with this approach is that mismatched tags can really throw the translation 
off the rails. So use at your own risk. You should check to make sure that 
all original content is still present. You are likely to need to adjust 
bullets and tables. It's likely that certain situations I haven't thought 
of will break it more severely.

Maybe this will be an incentive for someone to come up with something 
better ;-)

As always, make sure that you have a backup of any TW you try this in. Just 
import the attached json and then reload your TW file. Put your HTML 
contents in a designated tiddler. In the HTML2TW Launcher supply the name 
of the source tiddler and click on the convert button. The resulting 
mark-up should appear in the tiddler with the same name as the original 
tiddler plus "-converted" appended to the title..

Thanks to BJ, Eric, and Jed for helping me with the launcher.

Mark

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/543fe6f7-bc8e-4e91-8e49-8a30e342de46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


html2tw.json
Description: application/json


[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread 'Mark S.' via TiddlyWiki
Hi Eric,

That seems to be the final tweak. I put the triple quotes in (not BJ) 
before I realized that the name/argument were mismatched. I fixed the 
mismatch, but should have removed the quotes.

I'm still very confused about all this.  If all that a macro does is 
substitution, how does it help to put everything inside of the macro? For 
instance, the line:

<$set name="text2convert"  value={{$x$}}  >


is inside of the macro now. If there is no interpolation/transclusion 
inside of the macro, why does value now get properly assigned when it 
wasn't being properly assigned when interpreted outside the macro? It feels 
like it should be the other way around.

Thanks Eric, Jed, and BJ!
Mark

On Friday, March 25, 2016 at 3:25:12 PM UTC-7, Eric Shulman wrote:
>
> On Friday, March 25, 2016 at 2:53:48 PM UTC-7, Mark S. wrote:
>>
>> <$macrocall $name="amacro" x="""{{$:/html2tw/title}}"""/>
>>
>> Maybe some other tweak?
>>
>
> should be:
>
> <$macrocall $name="amacro" x={{$:/html2tw/title}}/>
>
> e.g., remove the tripled-quotes so that the parameter retrieves the value 
> that was entered in the input field.
>
> enjoy,
> -e
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3ba39ca8-2bea-4010-a402-55c961570d2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Feedback for TiddlyClip

2016-03-25 Thread Julio Cantarero
Hi BJ,

While defining new rules for TiddlyClip, and I have bumped into a 
characteristic of TiddlyClip's #variables: the scope of a #variable is 
limited to the operations run inside the tiddler referenced in the 'Fields 
modifiers' column. 
Would it be possible to extend the scope of #variables so that their values 
can be passed across Rules in the same operation?

If so, I would be able to reuse values across different Tiddlers that I 
create with a single TC click (category). I think this would make the rules 
syntax more flexible. I do not know if extending the scope could cause 
other problems/risks to TC itself.

I must confess that I have tried to do this myself in your code (commenting 
out //table['#']={}; in all instances in tidpaste.js 
 
but the first one), but I did not manage to reuse #variables across Rule 
tiddlers with just these changes.
Thank you,

Julio

El lunes, 1 de febrero de 2016, 12:16:03 (UTC+1), BJ escribió:
>
> hi Julio,
> thanks for the feedback, it's nice to know that people use  tiddlyclip. 
> Feedback like this is invaluable as it enables me to see what needs to be 
> improved/added. - I have added comments below.
>
> On Sunday, January 31, 2016 at 11:07:01 PM UTC, Julio Cantarero wrote:
>>
>> Hi BJ,
>>
>> Thank you very much for the TiddlyClip TW5 plugin and FF addon. I use 
>> them very often to capture news to my TW when browsing around.
>>
>> Since you were also asking about particular uses, I also tried a few 
>> months ago to use TW5 + TiddlyClip to create a web notebook for studying 
>> vocabulary of foreign languages. The goal was to easily create new 
>> vocabulary entries in a TW5 thanks to TiddlyClip, and then use other TW5 
>> features to treat these entries as flashcards to support studying them. I 
>> didn't get to finish it, but I found TiddlyClip was very flexible. I was 
>> even capable of creating new tiddlers and renaming them, as well as create 
>> and delete tiddler fields (I have uploaded a copy of the latest status 
>> here: http://juliocantarero.github.io/TW5-LanguageStudyNotebook/ . It is 
>> not fully working though)
>>
>> Regarding suggestions, I would have never dared, but since you asked :-)
>>
>>- In the documentation, it took me a while to realize that there are 
>>tags and modes settings (table columns) both at Category (operation) and 
>>Rule level. Modes at Category level are BrowserConfigModes, which is 
>>different than Rule modes.
>>
>> As I wrote tiddlyclip I fully understand how it works, so I really need 
> feedback on what is not clear - I will make this more clear in the 
> documentation. 
>
>>
>>- 
>>- I tried to transclude a tiddler in the tags column at Category 
>>level, using {{TiddlerName}} but it did not work. I think I read 
>> somewhere 
>>in the plugin documentation that the {{ }} option should work. It works 
>> in 
>>the body column. The purpose of this was to be able to tag clips from 
>>different sessions with different identifiers, like lesson N or subjects, 
>>etc.
>>
>> There is only this type of flexibility in the rules (I need to add this 
> to the documentation ) so you would have to use the tag entry there for 
> this function. 
>
>>
>>- And if I may: I guess there is a reason for it, but I found that 
>>the syntax of the substitution expressions and macros was complex and 
>>rigid. I guess I was stretching the use of TiddlyClip, or missed an 
>> easiest 
>>way to collect information in multiple passes from a web page. The only 
>>option I could think of to pass structured information to TW5 (I mean a 
>>vocabulary entry with term, definition, examples, pronuntiation, etc.) 
>> was 
>>tiddler fields.
>>
>> Your language study application is very interesting. Like you say the 
> basic tiddlyclip operation is to select some text and clip the selection 
> into tiddler(s) fields. It is also possible to clip the contents of the 
> clipboard using the  @clip variable, so one can copy some text to the 
> clipboard, then highlight some text and clip both to tiddlers. To clip more 
> selections on the page (other than using multiple clip actions as you have 
> done) either requires using regular expressions or writing macros. It is 
> possible to highlight multiple selections on a page (using the highlight 
> rule), then select all of the page's text and clip that through selection 
> macros (that would need to written - this is not difficult), eg 
> @Selected#1(@web), @Selected#2(@web) etc.  
>
> For the next release I may expand macro to take multiple arguments to 
> support functions like  @Selected(#1,@web).
>
> My choice of syntax for Tiddlyclip was constrained to be usable with 
> wikitext, which restricted the syntax that could be used for its template 
> braces (of the syntax compatible with wikitext I thought that '((*' '*))' 
> would standout in the 

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Eric Shulman
On Friday, March 25, 2016 at 2:53:48 PM UTC-7, Mark S. wrote:
>
> <$macrocall $name="amacro" x="""{{$:/html2tw/title}}"""/>
>
> Maybe some other tweak?
>

should be:

<$macrocall $name="amacro" x={{$:/html2tw/title}}/>

e.g., remove the tripled-quotes so that the parameter retrieves the value 
that was entered in the input field.

enjoy,
-e



-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3410a800-a82d-481e-bb4a-e073ad240609%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Mat
Could be more problems but one is it should probably read:

<$set name="name_of_tiddler" value="$x$">

i.e with quotes around $x$. Maybe even """$x$""".

<:-)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f5a98496-2f99-4c21-8102-9d4e36bac64e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread 'Mark S.' via TiddlyWiki
Thanks BJ. I had great hopes for this approach. But in this case, 
<> is empty and doesn't even show up when dropped in ... as 
shown below.

I had to tweak your suggested code to match up parameter and argument 
names. I put the label THIS IS EMPTY to show where there's no contents at 
all being retrieved. Here's what it looks like:

\define convertto() $(name_of_tiddler)$-converted
\define amacro(x)
<$set name="name_of_tiddler"  value=$x$>
<$set name="text2convert"  value={{$x$}}  >

<$button>
<$action-setfield
$tiddler=<>
text=<>   />
<$action-navigate $to=<>/>
Convert Tiddler Text

Using text from ''<>'' and sending to ''<>''
. 

THIS IS EMPTY: <>



\end

<$edit-text tiddler="$:/html2tw/title" rows="1" size="50" placeholder="Name 
of tiddler to convert"  tag="input"   >

<$macrocall $name="amacro" x="""{{$:/html2tw/title}}"""/>


Maybe some other tweak?

Thanks,
Mark


On Friday, March 25, 2016 at 1:55:17 PM UTC-7, BJ wrote:
>
> Hi mark,
> this is a typical tw5 'gotcha'
>
> <$set name="text2convert"  value=<>  >
>
> the macro only does basic text substitution.
>
> You need to use this pattern
>
> <$set name="text2convert"  value={{$x$}}  >
>
> and so must put your code inside a macro
>
>
>
> \define amacro(x)
> <$set name="name_of_tiddler"  value=$x$> 
> <$set name="text2convert"  value={{$x$}}  >
> <$button>
> <$action-setfield 
> $tiddler=<> 
> text=<>   />
> <$action-navigate $to=<>/>
> Convert Tiddler Text
> 
> \end
>
>
> <$macrocall $name="amacro" tname={{$:/html2tw/title}}/>
>
> all the best
>
> BJ
>
> On Friday, March 25, 2016 at 8:14:56 PM UTC, Mark S. wrote:
>>
>> Hi Jed,
>>
>> I've tried this in all sorts of iterations. I was hoping that wrapping a 
>> macro in a macro could finally force it to acknowledge the actual text in 
>> the dereferenced name tiddler.
>>
>> Your variation put this into the "converted" tiddler:
>>
>> *{{TitleIUsedInTheForm}}*
>>
>> So the literal string with brackets is getting passed rather than the 
>> transcluded text. It seems like it ought to be easy. 
>>
>> Thanks for trying,
>> Mark
>>
>> On Friday, March 25, 2016 at 12:12:38 PM UTC-7, Jed Carty wrote:
>>>
>>> It is probably the <$set name="text2convert"  value=<>  > line 
>>> that does it.
>>>
>>> Why don't you just use one macro instead of creating a macro that just 
>>> calls a second macro? Make textin:
>>>
>>> \define textin() {{$(name_of_tiddler)$}}
>>>
>>> and use that as the value for text2convert instead of textin2
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d041fe90-1fa5-4f82-938f-e6dc9c571f61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread BJ
Hi mark,
this is a typical tw5 2'gotcha'

<$set name="text2convert"  value=<>  >

the macro only does basic text substitution.

You need to use this pattern

<$set name="text2convert"  value={{$x$}}  >

and so must put your code inside a macro



\define amacro(x)
<$set name="name_of_tiddler"  value=$x$> 
<$set name="text2convert"  value={{$x$}}  >
<$button>
<$action-setfield 
$tiddler=<> 
text=<>   />
<$action-navigate $to=<>/>
Convert Tiddler Text

\end


<$macrocall $name="amacro" tname={{$:/html2tw/title}}/>

all the best

BJ

On Friday, March 25, 2016 at 8:14:56 PM UTC, Mark S. wrote:
>
> Hi Jed,
>
> I've tried this in all sorts of iterations. I was hoping that wrapping a 
> macro in a macro could finally force it to acknowledge the actual text in 
> the dereferenced name tiddler.
>
> Your variation put this into the "converted" tiddler:
>
> *{{TitleIUsedInTheForm}}*
>
> So the literal string with brackets is getting passed rather than the 
> transcluded text. It seems like it ought to be easy. 
>
> Thanks for trying,
> Mark
>
> On Friday, March 25, 2016 at 12:12:38 PM UTC-7, Jed Carty wrote:
>>
>> It is probably the <$set name="text2convert"  value=<>  > line 
>> that does it.
>>
>> Why don't you just use one macro instead of creating a macro that just 
>> calls a second macro? Make textin:
>>
>> \define textin() {{$(name_of_tiddler)$}}
>>
>> and use that as the value for text2convert instead of textin2
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/dad51087-2b31-481b-a2de-2be972efb0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Running TW5 on TiddlyWeb

2016-03-25 Thread Robert Kreuzer
Hi Chris,

I have followed your instructions as far as I understood them, but I 
unfortunately know too little about tiddlyweb to make sense of everything. 
Here is what I have done:

1. created a test instance in tiddlyweb with `twinstance test`
2. Added the tiddlywebplugins.status and tiddlywebplugins.cors plugins to 
test/tiddlywebconfig.py ('system_plugins': ['tiddlywebwiki', 
'tiddlywebplugins.status', 'tiddlywebplugins.cors'])
3. Create a new recipe called 'somerecipe' using: curl -X PUT -H 
'Content-Type: application/vnd.tiddlyweb+json' -d 
'{"recipe":[["system",""],["common",""]]}' 
http://0.0.0.0:8080/recipes/somerecipe

Does this make sense so far? If I understand you correctly, I should now 
have a $:/config/tiddlyweb/recipe that points to 'somerecipe'.
But I'm not sure where the TW5 files should go in my 'test' instance. And 
do I just clone the TW5 repo and copy it in, or is there some other way to 
do this?

Thanks,
Robert

On Monday, March 14, 2016 at 11:08:09 PM UTC+1, Chris Dent wrote:
>
> On Mon, 14 Mar 2016, Chris Dent wrote: 
>
> > * Either create a new edition for tiddlywiki5 which could be described 
> as 
> > "standalone access to tiddlyweb", or make the existing tw5tiddlyweb 
> edition 
> > support that use case as well. 
> > * Such as edition would need to account for the changes to 
> > tiddlywebadaptor.js described above. Probably by effectively branching 
> in 
> > the right places based on certain conditions. This is hard for me to do 
> > because I don't know the available contextual variables. 
>
> There's a very rough diff of my local tw5 changes here: 
>
> https://github.com/Jermolene/TiddlyWiki5/compare/master...cdent:cd/tiddlywebforrealz
>  
>
> -- 
> Chris Dent   http://burningchrome.com/ 
>  [...] 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/55b29d16-d855-4e23-bfd8-d08731d1fdea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread 'Mark S.' via TiddlyWiki
Hi Jed,

I've tried this in all sorts of iterations. I was hoping that wrapping a 
macro in a macro could finally force it to acknowledge the actual text in 
the dereferenced name tiddler.

Your variation put this into the "converted" tiddler:

*{{TitleIUsedInTheForm}}*

So the literal string with brackets is getting passed rather than the 
transcluded text. It seems like it ought to be easy. 

Thanks for trying,
Mark

On Friday, March 25, 2016 at 12:12:38 PM UTC-7, Jed Carty wrote:
>
> It is probably the <$set name="text2convert"  value=<>  > line 
> that does it.
>
> Why don't you just use one macro instead of creating a macro that just 
> calls a second macro? Make textin:
>
> \define textin() {{$(name_of_tiddler)$}}
>
> and use that as the value for text2convert instead of textin2
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3040d72e-d178-4ee7-8ed7-216b7555%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Jed Carty
It is probably the <$set name="text2convert"  value=<>  > line 
that does it.

Why don't you just use one macro instead of creating a macro that just 
calls a second macro? Make textin:

\define textin() {{$(name_of_tiddler)$}}

and use that as the value for text2convert instead of textin2

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f1f78505-561c-42e5-a6de-44de1e6872c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Convert HTML to TW5 Tables?

2016-03-25 Thread Duarte Farrajota Ramos
Hey that's great news BJ, gonna give it a try as soon as I get a chance. 
Thanks for the update

On Friday, 25 March 2016 10:32:41 UTC, BJ wrote:
>
>
>
> On Friday, March 25, 2016 at 4:33:22 AM UTC, Duarte Farrajota Ramos wrote:
>>
>> The way I see it you could try two different methods
>>
>>
>>1. If you really want to edit them directly inside TiddlyWiki in a 
>>WYSIWYG manner you could try using the fantastic CKEditor plugin for 
>>TiddlyWiki 
>> 
>>by BJ. It as its fair share of rough edges but I've been using it for 
>> quite 
>>a while now and it does it's job well if you put up with it's bugs.
>>
>> Hi Duarte, I have made some improvement in the latest version (at 
> http://bjtools.tiddlyspot.com)
> cheers
> BJ 
>
>>
>>1. Since it is an HTML table you can simply copy paste it directly 
>>into the text area. If you make a custom local install of CKEditor you 
>> can 
>>include one of the table editing plugins and have an almost full fledged 
>>WYSIWYG table editor in TiddlyWiki without any coding or dealing with 
>> wiki 
>>text.
>>
>>2. Most spreadsheet applications can receive data from HTML tables by 
>>simple copy paste, like Google Docs, Excel, LibreOffice etc. just copy 
>> your 
>>table and paste it wherever you feel most comfortable working. From there 
>>it should be fairly easy to export to any other more TiddlyWiki friendly 
>>format like CSV. Last i checked LibreOffice had a pretty decent CSV 
>>importer/exporter. You can then use any text editor or utility with find 
>>and replace or regex to tame your table into submission, and replace any 
>>CSV with wiki text delimiters.
>>
>>
>>
>> On Wednesday, 23 March 2016 16:35:58 UTC, Ed wrote:
>>>
>>> Dear All,
>>>
>>> At work I have a database and I want to get the info into TW5.
>>> The only way that I can do it is exporting an item to HTML and
>>> that I can put in a tiddler. That works. It looks even OK>
>>>
>>> But editing that whole HTML-mess it is a downright nuisance, 
>>> really too much work as there about 1500 - 2000 items.
>>>
>>> I'v been looking at converters online and I can make e.g. PDFs, 
>>> Excels or or lightly fornatted text.
>>>
>>> Is there a way to convert HTML right away to TW5 tables?
>>> Thanks is advance
>>> Salut! Edm.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/11fbb89f-bc67-47ce-a3d3-47a13d24a0d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] [TW5] Need help with TW5-script

2016-03-25 Thread 'Mark S.' via TiddlyWiki
I wrote a javascript macro for converting html into TW5 markup. It works 
fine when I run it on a tiddler with a known name. But when I tried to 
launch it it from a form, it never gets the text -- even though the macro 
itself sitting on it's own line will run perfectly.

In the form, I collect the name of the tiddler containing the HTML to be 
converted. The name is stored in a system tiddler. The various macros are 
meant to fetch the contents of the named tiddler. The variable 
"text2convert" contains the original text. The ht2ml2tw expects to see 
variable "text2convert".  

I don't understand why adding one level of abstraction should break 
everything.

Thanks for any help!
Mark

This is the launcher code which doesn't work:

\define convertto() $(name_of_tiddler)$-converted
\define textin(tname) {{$tname$}}
\define textin2() <$macrocall $name="textin" tname="""$(name_of_tiddler)$"""
/>

<$edit-text tiddler="$:/html2tw/title" rows="1" size="50" placeholder="Name 
of tiddler to convert"  tag="input"   >

<$set name="name_of_tiddler"  value={{$:/html2tw/title}}> 
<$set name="text2convert"  value=<>  >
<$button>
<$action-setfield 
$tiddler=<> 
text=<>   />
<$action-navigate $to=<>/>
Convert Tiddler Text


Using text from ''<>'' and sending to ''<>''
. 

The following macro displays fine here:
<>





This is the earlier code, with hard-wired tiddler names that does work. :

<$set name="text2convert"  value={{HTML2TW: Incoming HTML!!text}}>

<$button>
<$action-setfield 
$tiddler="HTML2TW: Converted Text" 
text=<>   />
Convert Tiddler Text via action-setfield




-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fb0e630f-0b45-4fd6-9c4c-28fd4324f777%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Convert HTML to TW5 Tables?

2016-03-25 Thread BJ


On Friday, March 25, 2016 at 4:33:22 AM UTC, Duarte Farrajota Ramos wrote:
>
> The way I see it you could try two different methods
>
>
>1. If you really want to edit them directly inside TiddlyWiki in a 
>WYSIWYG manner you could try using the fantastic CKEditor plugin for 
>TiddlyWiki 
> 
>by BJ. It as its fair share of rough edges but I've been using it for 
> quite 
>a while now and it does it's job well if you put up with it's bugs.
>
> Hi Duarte, I have made some improvement in the latest version (at 
http://bjtools.tiddlyspot.com)
cheers
BJ 

>
>1. Since it is an HTML table you can simply copy paste it directly 
>into the text area. If you make a custom local install of CKEditor you can 
>include one of the table editing plugins and have an almost full fledged 
>WYSIWYG table editor in TiddlyWiki without any coding or dealing with wiki 
>text.
>
>2. Most spreadsheet applications can receive data from HTML tables by 
>simple copy paste, like Google Docs, Excel, LibreOffice etc. just copy 
> your 
>table and paste it wherever you feel most comfortable working. From there 
>it should be fairly easy to export to any other more TiddlyWiki friendly 
>format like CSV. Last i checked LibreOffice had a pretty decent CSV 
>importer/exporter. You can then use any text editor or utility with find 
>and replace or regex to tame your table into submission, and replace any 
>CSV with wiki text delimiters.
>
>
>
> On Wednesday, 23 March 2016 16:35:58 UTC, Ed wrote:
>>
>> Dear All,
>>
>> At work I have a database and I want to get the info into TW5.
>> The only way that I can do it is exporting an item to HTML and
>> that I can put in a tiddler. That works. It looks even OK>
>>
>> But editing that whole HTML-mess it is a downright nuisance, 
>> really too much work as there about 1500 - 2000 items.
>>
>> I'v been looking at converters online and I can make e.g. PDFs, 
>> Excels or or lightly fornatted text.
>>
>> Is there a way to convert HTML right away to TW5 tables?
>> Thanks is advance
>> Salut! Edm.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/35aaa600-4173-46a8-9708-43e2b4a73abd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Additional panes

2016-03-25 Thread BJ
In addition to the tabs you can create scrolling for each tab/tiddler by 
changing the style. create a tiddler (you could call it $:/scroll), tag it 
$:/tags/Stylesheet and add this as contents:

 .tc-tiddler-body {
height: 70vh;
overflow: scroll;
}

I think this is what you want

all the best 

BJ



On Friday, March 25, 2016 at 2:47:20 AM UTC, Tryign It wrote:
>
>
> Thank you both for the suggestions, 
> As for the Zoomin option, that is slightly less annoying than the scroll - 
> but it still takes me from my reading spot
> The tab is better still, but again, it takes me fromt he reading spot.
>
> I want to view multiple tiddlers collectively, and some pinned all the 
> time in that pane...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/57fa052f-aea6-4ecc-81d9-f3d680b28467%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Additional panes

2016-03-25 Thread Scott Simmons (Secret-HQ)
Hi, Tryign —

You may like substories, which allow you to open and close tiddlers 
"inside" a current tiddler.  They're great for opening content you need to 
read before getting back to reading the main tiddler content.

http://tiddlywiki.com/#Creating%20SubStories

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/cdd479ff-0583-4a18-9d05-fb0eb8eb28e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Additional panes

2016-03-25 Thread Mat
@Tryign - could you post a simple drawing of your vision? I'm not even sure 
what you mean with a "pane" so it would hopefully clarify a lot.

<:-)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f8015d55-209d-40d7-9da8-1a85982bd347%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Additional panes

2016-03-25 Thread Alex Hough
I sometimes "pin" a tiddler to the top left menu or put it above the story
using system tags


Alex

On Friday, 25 March 2016, Tryign It  wrote:

>
> Thank you both for the suggestions,
> As for the Zoomin option, that is slightly less annoying than the scroll -
> but it still takes me from my reading spot
> The tab is better still, but again, it takes me fromt he reading spot.
>
> I want to view multiple tiddlers collectively, and some pinned all the
> time in that pane...
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to tiddlywiki@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/2f623591-26d8-4ceb-bb62-7d0f6230dca5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CALc1hYfAen2d9MtCY6S%3DLwxMuwq223WYj9Sddfeg-EwbQCU27Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.