Re: [tw] Re: TW5 - Migrate tiddlywiki to node.js
The only problem I've had so far were with externalized tiddlers of type application/pdf, where the field _canonical_uri contained an absolute path to a pdf file; for those tiddlers, the pdf is no longer displayed in a frame, as it did before. Imported pdfs show just fine. You should be able to reference the PDFs via a file URI even from a TiddlyWiki that is served over HTTP from the server edition. The same origin policy doesn't apply to the `img` or `embed` elements. What do the URIs in the _canonical_uri field look like? They should be absolute URIs that include the file:// protocol identifier. Best wishes Jeremy On Fri, Sep 26, 2014 at 9:39 PM, PMario pmari...@gmail.com wrote: On Friday, September 26, 2014 10:27:10 PM UTC+2, PMario wrote: I'm not sure, if it works with the server too. ... So you'll need to test it. All your tiddlers that are tagged external-image will get a field _canonical_uri rendered with the $:/core/templates/canonical-uri-external-image template. https://github.com/Jermolene/TiddlyWiki5/blob/master/core/ templates/canonical-uri-external-image.tid I did a test. ... The server actually included the images. so it won't work that way. BJs concern is right. If you want to run TW server and get static image files, you'll need to run a real server in front of TW, which lets you load the static content. -m -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout. -- Jeremy Ruston mailto:jeremy.rus...@gmail.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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
Re: [tw] Re: TW5 - Migrate tiddlywiki to node.js
On Saturday, September 27, 2014 9:18:36 AM UTC+2, Jeremy Ruston wrote: The only problem I've had so far were with externalized tiddlers of type application/pdf, where the field _canonical_uri contained an absolute path to a pdf file; for those tiddlers, the pdf is no longer displayed in a frame, as it did before. Imported pdfs show just fine. You should be able to reference the PDFs via a file URI even from a TiddlyWiki that is served over HTTP from the server edition. The same origin policy doesn't apply to the `img` or `embed` elements. What do the URIs in the _canonical_uri field look like? They should be absolute URIs that include the file:// protocol identifier. Best wishes Jeremy I am getting security exceptions when using node.js with firefox or chrome on ubuntu 12.04: with a tiddly containing img src =file:///media/3497f82e-3b95-41de-90af-df905eceeab4/data/radice/firefoxextension/Tw516/plugins/jermolene.github.com/images/map1.png/ I get Security Error: Content at http://127.0.0.1:8086/ may not load or link to file:///media/3497f82e-3b95-41de-90af-df905eceeab4/data/radice/firefoxextension/Tw516/plugins/jermolene.github.com/images/map1.png. BJ On Fri, Sep 26, 2014 at 9:39 PM, PMario pmar...@gmail.com javascript: wrote: On Friday, September 26, 2014 10:27:10 PM UTC+2, PMario wrote: I'm not sure, if it works with the server too. ... So you'll need to test it. All your tiddlers that are tagged external-image will get a field _canonical_uri rendered with the $:/core/templates/canonical-uri-external-image template. https://github.com/Jermolene/TiddlyWiki5/blob/master/core/ templates/canonical-uri-external-image.tid I did a test. ... The server actually included the images. so it won't work that way. BJs concern is right. If you want to run TW server and get static image files, you'll need to run a real server in front of TW, which lets you load the static content. -m -- 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+...@googlegroups.com javascript:. To post to this group, send email to tiddl...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout. -- Jeremy Ruston mailto:jeremy...@gmail.com javascript: -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
Re: [tw] Re: TW5 - Migrate tiddlywiki to node.js
Hi BJ I am getting security exceptions when using node.js with firefox or chrome on ubuntu 12.04: with a tiddly containing img src =file:///media/3497f82e-3b95-41de-90af-df905eceeab4/data/radice/firefoxextension/Tw516/plugins/ jermolene.github.com/images/map1.png/ I get Security Error: Content at http://127.0.0.1:8086/ may not load or link to file:///media/3497f82e-3b95-41de-90af-df905eceeab4/data/radice/firefoxextension/Tw516/plugins/ jermolene.github.com/images/map1.png. Gosh, I guess Firefox has turned the dial up on security considerably. It's consistent: I've noticed that it's the only common browser that disallows an HTTP post from an HTML page loaded via a file URI to an HTTP URI. It would certainly increase flexibility if we added a plain static web server to TW5 under Node.js. Two things are needed: the ability to suppress a tiddler from being included when building the TW file, and the ability to GET individual tiddlers in their raw form. Best wishes Jeremy. BJ On Fri, Sep 26, 2014 at 9:39 PM, PMario pmar...@gmail.com wrote: On Friday, September 26, 2014 10:27:10 PM UTC+2, PMario wrote: I'm not sure, if it works with the server too. ... So you'll need to test it. All your tiddlers that are tagged external-image will get a field _canonical_uri rendered with the $:/core/templates/canonical-uri-external-image template. https://github.com/Jermolene/TiddlyWiki5/blob/master/core/te mplates/canonical-uri-external-image.tid I did a test. ... The server actually included the images. so it won't work that way. BJs concern is right. If you want to run TW server and get static image files, you'll need to run a real server in front of TW, which lets you load the static content. -m -- 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+...@googlegroups.com. To post to this group, send email to tiddl...@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout. -- Jeremy Ruston mailto:jeremy...@gmail.com -- Jeremy Ruston mailto:jeremy.rus...@gmail.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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
Re: [tw] Re: TW5 - Migrate tiddlywiki to node.js
On Saturday, September 27, 2014 10:14:59 AM UTC+2, Jeremy Ruston wrote: It would certainly increase flexibility if we added a plain static web server to TW5 under Node.js. Two things are needed: the ability to suppress a tiddler from being included when building the TW file, and the ability to GET individual tiddlers in their raw form. If you want to serve static content, the advise everywhere on the web is: use an existing server that does exactly that, is battle tested for many years, and put it in front of the nodejs app. Why invent a new wheel, with a system, that's designed for a different usecase. I'd suggest nginx. It's a well documented small footprint web server and rides the wave atm. -mario -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
Hi prsmendonca, Have a look at the tw5.com tiddlywiki.info [1] file. It may be what you need. -mario [1] https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlywiki.info#L33 -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
Isn't there a problem with what will server the external file?? (I have not found any code in tiddlywiki5 for servering local files under the node.js build). cheers BJ On Friday, September 26, 2014 9:39:21 AM UTC+2, PMario wrote: Hi prsmendonca, Have a look at the tw5.com tiddlywiki.info [1] file. It may be what you need. -mario [1] https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlywiki.info#L33 -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
Just trying to correctly guess here, as I'm out of wits here: I would suspect that the same origin policy comes in here; this means that your referenced PDFs need to be imported into your Node.js-based TW5 too. To the best of my limited knowledge this would be a manual process you need to carry out directly on the file system where your tiddlers are stored. You need to place the PDFs into a subfolder with the same name and hierarchy as you did so far with your stand-alone TW5. Regards, -- TheDiveO On Thursday, September 25, 2014 10:02:45 PM UTC+2, prsmendonca wrote: Hi! Many thanks, that did 90% of the work. The only problem I've had so far were with externalized tiddlers of type application/pdf, where the field _canonical_uri contained an absolute path to a pdf file; for those tiddlers, the pdf is no longer displayed in a frame, as it did before. Imported pdfs show just fine. I have seen the post under under Node.js, why does _canonical_uri need a doubleurlencoded of the tiddler title? it seems to be relevant to my problem, but I am not entirely sure. At any rate, I wouldn't know how to provide to _canonical_uri a doubleurlencoded of the tiddler title. The answer there seems to indicate the use of $view ... format=doubleurlencoded/, but, if yes, where? Thanks again! P On Thursday, September 25, 2014 11:10:25 AM UTC-7, TheDiveO wrote: If you already have an empty TW5 server instance up and running then one way could be to navigate your browser to this server instance (localhost:8080). Then drag the file containing your single-file TW5 instance into the browser and follow the normal import procedure. You should then see the newly imported tiddlers getting synchronized as individual files with your local file system. If you have many tiddlers then you may want to organize them into subfolders. Maybe the hierarchical filesystem sync adaptor then may be of interest, see my ThirdFlow plugin. There are probably other ways to explode a single-file TW5 into its tiddlers ... so I'm also interested to learn about other solutions. Regards, TheDiveO Am Donnerstag, 25. September 2014 18:28:28 UTC+2 schrieb prsmendonca: Hi, there! (First posting on this group, please do school me on the appropriate netiquete.) Not quite sure how to phrase my question - I lack the tiddlywiki vocabulary, - but here it goes: I have a single-file tiddlywiki built on TW5. I'd like to move it to a setup based on node.js. Could you please give me some pointers on how to do it? I am all set on setting up node.js and running a server-based tiddlywiki. Many thanks! P -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
Hi, everyone! PMario, thanks for your input. Do you mean that all I have to do is to include the lines build: { index: [ --setfield,[tag[external-image]],_canonical_uri,$:/core/templates/canonical-uri-external-image,text/plain] } in the appropriate place in my tiddlywiki.info file, or is there more to it? BJ, TheDiveO, thank you. In my original single file tiddlywiki I didn't place my PDFs in any special subfolder; some of the PDFs are even in other file systems. It won't be a show stopper if all I need to do is to create symbolic links to the original PDFs at a location that is TW5 and node.js friendly, but actually copying the files to some location does not appeal to me. As you can tell, I am doing this under Linux. Many thanks! P On Friday, September 26, 2014 1:41:21 AM UTC-7, TheDiveO wrote: Just trying to correctly guess here, as I'm out of wits here: I would suspect that the same origin policy comes in here; this means that your referenced PDFs need to be imported into your Node.js-based TW5 too. To the best of my limited knowledge this would be a manual process you need to carry out directly on the file system where your tiddlers are stored. You need to place the PDFs into a subfolder with the same name and hierarchy as you did so far with your stand-alone TW5. Regards, -- TheDiveO On Thursday, September 25, 2014 10:02:45 PM UTC+2, prsmendonca wrote: Hi! Many thanks, that did 90% of the work. The only problem I've had so far were with externalized tiddlers of type application/pdf, where the field _canonical_uri contained an absolute path to a pdf file; for those tiddlers, the pdf is no longer displayed in a frame, as it did before. Imported pdfs show just fine. I have seen the post under under Node.js, why does _canonical_uri need a doubleurlencoded of the tiddler title? it seems to be relevant to my problem, but I am not entirely sure. At any rate, I wouldn't know how to provide to _canonical_uri a doubleurlencoded of the tiddler title. The answer there seems to indicate the use of $view ... format=doubleurlencoded/, but, if yes, where? Thanks again! P On Thursday, September 25, 2014 11:10:25 AM UTC-7, TheDiveO wrote: If you already have an empty TW5 server instance up and running then one way could be to navigate your browser to this server instance (localhost:8080). Then drag the file containing your single-file TW5 instance into the browser and follow the normal import procedure. You should then see the newly imported tiddlers getting synchronized as individual files with your local file system. If you have many tiddlers then you may want to organize them into subfolders. Maybe the hierarchical filesystem sync adaptor then may be of interest, see my ThirdFlow plugin. There are probably other ways to explode a single-file TW5 into its tiddlers ... so I'm also interested to learn about other solutions. Regards, TheDiveO Am Donnerstag, 25. September 2014 18:28:28 UTC+2 schrieb prsmendonca: Hi, there! (First posting on this group, please do school me on the appropriate netiquete.) Not quite sure how to phrase my question - I lack the tiddlywiki vocabulary, - but here it goes: I have a single-file tiddlywiki built on TW5. I'd like to move it to a setup based on node.js. Could you please give me some pointers on how to do it? I am all set on setting up node.js and running a server-based tiddlywiki. Many thanks! P -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
BJ most probably refers to this part of the TW5 documentation: http://tiddlywiki.com/#ExternalImages This seems to cover your task in more detail. As this is a build rule you need to run your TW5 under Node.js instead as a server (--server) now once with this build rule, should be --build index or so. -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
On Friday, September 26, 2014 6:30:50 PM UTC+2, prsmendonca wrote: PMario, thanks for your input. Do you mean that all I have to do is to include the lines build: { index: [ --setfield,[tag[external-image]],_canonical_uri,$:/core/templates/canonical-uri-external-image,text/plain] } in the appropriate place in my tiddlywiki.info file, or is there more to it? I'm not sure, if it works with the server too. ... So you'll need to test it. All your tiddlers that are tagged external-image will get a field _canonical_uri rendered with the $:/core/templates/canonical-uri-external-image template. https://github.com/Jermolene/TiddlyWiki5/blob/master/core/templates/canonical-uri-external-image.tid -m -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
On Friday, September 26, 2014 10:27:10 PM UTC+2, PMario wrote: I'm not sure, if it works with the server too. ... So you'll need to test it. All your tiddlers that are tagged external-image will get a field _canonical_uri rendered with the $:/core/templates/canonical-uri-external-image template. https://github.com/Jermolene/TiddlyWiki5/blob/master/core/templates/canonical-uri-external-image.tid I did a test. ... The server actually included the images. so it won't work that way. BJs concern is right. If you want to run TW server and get static image files, you'll need to run a real server in front of TW, which lets you load the static content. -m -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
If you already have an empty TW5 server instance up and running then one way could be to navigate your browser to this server instance (localhost:8080). Then drag the file containing your single-file TW5 instance into the browser and follow the normal import procedure. You should then see the newly imported tiddlers getting synchronized as individual files with your local file system. If you have many tiddlers then you may want to organize them into subfolders. Maybe the hierarchical filesystem sync adaptor then may be of interest, see my ThirdFlow plugin. There are probably other ways to explode a single-file TW5 into its tiddlers ... so I'm also interested to learn about other solutions. Regards, TheDiveO Am Donnerstag, 25. September 2014 18:28:28 UTC+2 schrieb prsmendonca: Hi, there! (First posting on this group, please do school me on the appropriate netiquete.) Not quite sure how to phrase my question - I lack the tiddlywiki vocabulary, - but here it goes: I have a single-file tiddlywiki built on TW5. I'd like to move it to a setup based on node.js. Could you please give me some pointers on how to do it? I am all set on setting up node.js and running a server-based tiddlywiki. Many thanks! P -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.
[tw] Re: TW5 - Migrate tiddlywiki to node.js
Hi! Many thanks, that did 90% of the work. The only problem I've had so far were with externalized tiddlers of type application/pdf, where the field _canonical_uri contained an absolute path to a pdf file; for those tiddlers, the pdf is no longer displayed in a frame, as it did before. Imported pdfs show just fine. I have seen the post under under Node.js, why does _canonical_uri need a doubleurlencoded of the tiddler title? it seems to be relevant to my problem, but I am not entirely sure. At any rate, I wouldn't know how to provide to _canonical_uri a doubleurlencoded of the tiddler title. The answer there seems to indicate the use of $view ... format=doubleurlencoded/, but, if yes, where? Thanks again! P On Thursday, September 25, 2014 11:10:25 AM UTC-7, TheDiveO wrote: If you already have an empty TW5 server instance up and running then one way could be to navigate your browser to this server instance (localhost:8080). Then drag the file containing your single-file TW5 instance into the browser and follow the normal import procedure. You should then see the newly imported tiddlers getting synchronized as individual files with your local file system. If you have many tiddlers then you may want to organize them into subfolders. Maybe the hierarchical filesystem sync adaptor then may be of interest, see my ThirdFlow plugin. There are probably other ways to explode a single-file TW5 into its tiddlers ... so I'm also interested to learn about other solutions. Regards, TheDiveO Am Donnerstag, 25. September 2014 18:28:28 UTC+2 schrieb prsmendonca: Hi, there! (First posting on this group, please do school me on the appropriate netiquete.) Not quite sure how to phrase my question - I lack the tiddlywiki vocabulary, - but here it goes: I have a single-file tiddlywiki built on TW5. I'd like to move it to a setup based on node.js. Could you please give me some pointers on how to do it? I am all set on setting up node.js and running a server-based tiddlywiki. Many thanks! P -- 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 http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.