Re: [tw] Re: Treating other file extensions as .tid
Hi Jeremy Thanks for the explanation. I thought there'd be some way of determining behaviour based on file extension or type: field. As I would like SAS files to be interpreted as .tid, I added the following in Chrome JS console:- $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[.tid]; I checked it with:- $tw.config.fileExtensionInfo[.sas] and got 'Object {type: application/x-tiddler}' This is what I'm after, I believe. However, importing the SAS file made no difference with TW5 according a type of 'application/x-sas'. If it's any help, the text I'm inserting is as follows (saved in a file called 'tmp.sas'):- /*: Win/Unix title: Table for non-mutually exclusive groups caption: Non-mut excl grps type: application/x-tiddler tags: Output Table Percentages Test_Data sas: 9.3 ! Purpose A simple way to output figures */ Thanks, Rich On 13 June 2014 09:12, Jeremy Ruston jeremy.rus...@gmail.com wrote: Hi Richard If I understand correctly, the problem here is that you've got a pile of text files with the extension .sas that you'd like to be able to easily import into TW5. Would you like them to be treated as if they were .txt files or .tid files? If so, we can create a very simple module that plugs .sas in as an alternative extension. If you need to massage the files in some non-standard way as they are imported, then we'd need a more complex module. TW5 has the concept of deserializer modules that extract tiddlers from different file formats. The mechanism starts by looking up the file extension within the JavaScript hashmap $tw.config.fileExtensionInfo. For example, open tiddlywiki.com and try this in the browser JS console: $tw.config.fileExtensionInfo[.tid] You should see Object {type: application/x-tiddler}, which tells us that .tid files should be interpreted as being of the type application/x-tiddler. That type is then looked up in another hashmap: $tw.config.contentTypeInfo[application/x-tiddler] For this example you should see: {encoding: utf8, extension: .tid, flags: Array[0], deserializerType: application/x-tiddler} The field deserializerType is then looked up amongst the module definitions for modules of type tiddlerdeserializer. You can see the available deserializers listed: $tw.modules.types.tiddlerdeserializer Finally, the actual deserializer for application/x-tiddler is created by boot.js: https://github.com/Jermolene/TiddlyWiki5/blob/master/boot%2Fboot.js#L1170 Most other deserialisers live in this file: https://github.com/Jermolene/TiddlyWiki5/blob/master/core%2Fmodules%2Fdeserializers.js So, we can plug in .sas so that it is treated as .txt with this single line of JavaScript: $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[.txt]; Try running that line in your browsers JS console and then drag in a .sas file and see if it behaves as you expect. If so, we can look at baking that tweak into a module tiddler so that it runs each time you restart your wiki. Best wishes Jeremy On Thu, Jun 12, 2014 at 8:35 PM, Danielo Rodríguez rdani...@gmail.com wrote: What you want works wonderfully with javascript. Go to tiddlywiky5 github page. Enter in plugins and then check any of them. You will se there is no tid file, just regular javascript code. Inside each JS file there is a commented header. Field defined on that header are converted to tid files with that fields. You can ask your colleagues to include that header. Then use a custom view template based on, for example a particular tag. Let my know if I explained myself. -- 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 a topic in the Google Groups TiddlyWiki group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/HEqq8JZFCEI/unsubscribe. To unsubscribe from this group and all its topics, 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. -- 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
Re: [tw] Re: Treating other file extensions as .tid
Hi Rich I think part of the problem is that you don't need the /* and */ lines; can you prepare content to look like this: title: Table for non-mutually exclusive groups caption: Non-mut excl grps type: application/x-tiddler tags: Output Table Percentages Test_Data sas: 9.3 ! Purpose A simple way to output figures Best wishes Jeremy On Fri, Jun 13, 2014 at 10:32 AM, Rich baxter@gmail.com wrote: Hi Jeremy Thanks for the explanation. I thought there'd be some way of determining behaviour based on file extension or type: field. As I would like SAS files to be interpreted as .tid, I added the following in Chrome JS console:- $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[ .tid]; I checked it with:- $tw.config.fileExtensionInfo[.sas] and got 'Object {type: application/x-tiddler}' This is what I'm after, I believe. However, importing the SAS file made no difference with TW5 according a type of 'application/x-sas'. If it's any help, the text I'm inserting is as follows (saved in a file called 'tmp.sas'):- /*: Win/Unix title: Table for non-mutually exclusive groups caption: Non-mut excl grps type: application/x-tiddler tags: Output Table Percentages Test_Data sas: 9.3 ! Purpose A simple way to output figures */ Thanks, Rich On 13 June 2014 09:12, Jeremy Ruston jeremy.rus...@gmail.com wrote: Hi Richard If I understand correctly, the problem here is that you've got a pile of text files with the extension .sas that you'd like to be able to easily import into TW5. Would you like them to be treated as if they were .txt files or .tid files? If so, we can create a very simple module that plugs .sas in as an alternative extension. If you need to massage the files in some non-standard way as they are imported, then we'd need a more complex module. TW5 has the concept of deserializer modules that extract tiddlers from different file formats. The mechanism starts by looking up the file extension within the JavaScript hashmap $tw.config.fileExtensionInfo. For example, open tiddlywiki.com and try this in the browser JS console: $tw.config.fileExtensionInfo[.tid] You should see Object {type: application/x-tiddler}, which tells us that .tid files should be interpreted as being of the type application/x-tiddler. That type is then looked up in another hashmap: $tw.config.contentTypeInfo[application/x-tiddler] For this example you should see: {encoding: utf8, extension: .tid, flags: Array[0], deserializerType: application/x-tiddler} The field deserializerType is then looked up amongst the module definitions for modules of type tiddlerdeserializer. You can see the available deserializers listed: $tw.modules.types.tiddlerdeserializer Finally, the actual deserializer for application/x-tiddler is created by boot.js: https://github.com/Jermolene/TiddlyWiki5/blob/master/boot%2Fboot.js#L1170 Most other deserialisers live in this file: https://github.com/Jermolene/TiddlyWiki5/blob/master/core%2Fmodules%2Fdeserializers.js So, we can plug in .sas so that it is treated as .txt with this single line of JavaScript: $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[.txt]; Try running that line in your browsers JS console and then drag in a .sas file and see if it behaves as you expect. If so, we can look at baking that tweak into a module tiddler so that it runs each time you restart your wiki. Best wishes Jeremy On Thu, Jun 12, 2014 at 8:35 PM, Danielo Rodríguez rdani...@gmail.com wrote: What you want works wonderfully with javascript. Go to tiddlywiky5 github page. Enter in plugins and then check any of them. You will se there is no tid file, just regular javascript code. Inside each JS file there is a commented header. Field defined on that header are converted to tid files with that fields. You can ask your colleagues to include that header. Then use a custom view template based on, for example a particular tag. Let my know if I explained myself. -- 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 a topic in the Google Groups TiddlyWiki group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/HEqq8JZFCEI/unsubscribe. To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to
Re: [tw] Re: Treating other file extensions as .tid
Hi I've just tried it without the /*...*/ comments but still no joy. I'm using tiddlywiki.com if that's any help. I appreciate the comments part isn't needed for TW5 - but it's needed by SAS so the file remains a SAS program (if you know what I mean). Honestly though, don't worry about it. Given how good TW5 is and how it will be helpful to us, it's no bother to get folk to change the file extension. Thanks, Richard On 13 June 2014 10:39, Jeremy Ruston jeremy.rus...@gmail.com wrote: Hi Rich I think part of the problem is that you don't need the /* and */ lines; can you prepare content to look like this: title: Table for non-mutually exclusive groups caption: Non-mut excl grps type: application/x-tiddler tags: Output Table Percentages Test_Data sas: 9.3 ! Purpose A simple way to output figures Best wishes Jeremy On Fri, Jun 13, 2014 at 10:32 AM, Rich baxter@gmail.com wrote: Hi Jeremy Thanks for the explanation. I thought there'd be some way of determining behaviour based on file extension or type: field. As I would like SAS files to be interpreted as .tid, I added the following in Chrome JS console:- $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[ .tid]; I checked it with:- $tw.config.fileExtensionInfo[.sas] and got 'Object {type: application/x-tiddler}' This is what I'm after, I believe. However, importing the SAS file made no difference with TW5 according a type of 'application/x-sas'. If it's any help, the text I'm inserting is as follows (saved in a file called 'tmp.sas'):- /*: Win/Unix title: Table for non-mutually exclusive groups caption: Non-mut excl grps type: application/x-tiddler tags: Output Table Percentages Test_Data sas: 9.3 ! Purpose A simple way to output figures */ Thanks, Rich On 13 June 2014 09:12, Jeremy Ruston jeremy.rus...@gmail.com wrote: Hi Richard If I understand correctly, the problem here is that you've got a pile of text files with the extension .sas that you'd like to be able to easily import into TW5. Would you like them to be treated as if they were .txt files or .tid files? If so, we can create a very simple module that plugs .sas in as an alternative extension. If you need to massage the files in some non-standard way as they are imported, then we'd need a more complex module. TW5 has the concept of deserializer modules that extract tiddlers from different file formats. The mechanism starts by looking up the file extension within the JavaScript hashmap $tw.config.fileExtensionInfo. For example, open tiddlywiki.com and try this in the browser JS console: $tw.config.fileExtensionInfo[.tid] You should see Object {type: application/x-tiddler}, which tells us that .tid files should be interpreted as being of the type application/x-tiddler. That type is then looked up in another hashmap: $tw.config.contentTypeInfo[application/x-tiddler] For this example you should see: {encoding: utf8, extension: .tid, flags: Array[0], deserializerType: application/x-tiddler} The field deserializerType is then looked up amongst the module definitions for modules of type tiddlerdeserializer. You can see the available deserializers listed: $tw.modules.types.tiddlerdeserializer Finally, the actual deserializer for application/x-tiddler is created by boot.js: https://github.com/Jermolene/TiddlyWiki5/blob/master/boot%2Fboot.js#L1170 Most other deserialisers live in this file: https://github.com/Jermolene/TiddlyWiki5/blob/master/core%2Fmodules%2Fdeserializers.js So, we can plug in .sas so that it is treated as .txt with this single line of JavaScript: $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[.txt]; Try running that line in your browsers JS console and then drag in a .sas file and see if it behaves as you expect. If so, we can look at baking that tweak into a module tiddler so that it runs each time you restart your wiki. Best wishes Jeremy On Thu, Jun 12, 2014 at 8:35 PM, Danielo Rodríguez rdani...@gmail.com wrote: What you want works wonderfully with javascript. Go to tiddlywiky5 github page. Enter in plugins and then check any of them. You will se there is no tid file, just regular javascript code. Inside each JS file there is a commented header. Field defined on that header are converted to tid files with that fields. You can ask your colleagues to include that header. Then use a custom view template based on, for example a particular tag. Let my know if I explained myself. -- 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.
Re: [tw] Re: Treating other file extensions as .tid
Hi Richard No problem, keep the feedback coming, Best wishes Jeremy On Fri, Jun 13, 2014 at 10:45 AM, Rich baxter@gmail.com wrote: Hi I've just tried it without the /*...*/ comments but still no joy. I'm using tiddlywiki.com if that's any help. I appreciate the comments part isn't needed for TW5 - but it's needed by SAS so the file remains a SAS program (if you know what I mean). Honestly though, don't worry about it. Given how good TW5 is and how it will be helpful to us, it's no bother to get folk to change the file extension. Thanks, Richard On 13 June 2014 10:39, Jeremy Ruston jeremy.rus...@gmail.com wrote: Hi Rich I think part of the problem is that you don't need the /* and */ lines; can you prepare content to look like this: title: Table for non-mutually exclusive groups caption: Non-mut excl grps type: application/x-tiddler tags: Output Table Percentages Test_Data sas: 9.3 ! Purpose A simple way to output figures Best wishes Jeremy On Fri, Jun 13, 2014 at 10:32 AM, Rich baxter@gmail.com wrote: Hi Jeremy Thanks for the explanation. I thought there'd be some way of determining behaviour based on file extension or type: field. As I would like SAS files to be interpreted as .tid, I added the following in Chrome JS console:- $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[ .tid]; I checked it with:- $tw.config.fileExtensionInfo[.sas] and got 'Object {type: application/x-tiddler}' This is what I'm after, I believe. However, importing the SAS file made no difference with TW5 according a type of 'application/x-sas'. If it's any help, the text I'm inserting is as follows (saved in a file called 'tmp.sas'):- /*: Win/Unix title: Table for non-mutually exclusive groups caption: Non-mut excl grps type: application/x-tiddler tags: Output Table Percentages Test_Data sas: 9.3 ! Purpose A simple way to output figures */ Thanks, Rich On 13 June 2014 09:12, Jeremy Ruston jeremy.rus...@gmail.com wrote: Hi Richard If I understand correctly, the problem here is that you've got a pile of text files with the extension .sas that you'd like to be able to easily import into TW5. Would you like them to be treated as if they were .txt files or .tid files? If so, we can create a very simple module that plugs .sas in as an alternative extension. If you need to massage the files in some non-standard way as they are imported, then we'd need a more complex module. TW5 has the concept of deserializer modules that extract tiddlers from different file formats. The mechanism starts by looking up the file extension within the JavaScript hashmap $tw.config.fileExtensionInfo. For example, open tiddlywiki.com and try this in the browser JS console: $tw.config.fileExtensionInfo[.tid] You should see Object {type: application/x-tiddler}, which tells us that .tid files should be interpreted as being of the type application/x-tiddler. That type is then looked up in another hashmap: $tw.config.contentTypeInfo[application/x-tiddler] For this example you should see: {encoding: utf8, extension: .tid, flags: Array[0], deserializerType: application/x-tiddler} The field deserializerType is then looked up amongst the module definitions for modules of type tiddlerdeserializer. You can see the available deserializers listed: $tw.modules.types.tiddlerdeserializer Finally, the actual deserializer for application/x-tiddler is created by boot.js: https://github.com/Jermolene/TiddlyWiki5/blob/master/boot%2Fboot.js#L1170 Most other deserialisers live in this file: https://github.com/Jermolene/TiddlyWiki5/blob/master/core%2Fmodules%2Fdeserializers.js So, we can plug in .sas so that it is treated as .txt with this single line of JavaScript: $tw.config.fileExtensionInfo[.sas] = $tw.config.fileExtensionInfo[.txt]; Try running that line in your browsers JS console and then drag in a .sas file and see if it behaves as you expect. If so, we can look at baking that tweak into a module tiddler so that it runs each time you restart your wiki. Best wishes Jeremy On Thu, Jun 12, 2014 at 8:35 PM, Danielo Rodríguez rdani...@gmail.com wrote: What you want works wonderfully with javascript. Go to tiddlywiky5 github page. Enter in plugins and then check any of them. You will se there is no tid file, just regular javascript code. Inside each JS file there is a commented header. Field defined on that header are converted to tid files with that fields. You can ask your colleagues to include that header. Then use a custom view template based on, for example a particular tag. Let my know if I explained myself. -- 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
[tw] Re: Treating other file extensions as .tid
Hi Richard, Basically any file can be treated as a tiddler. ... see: https://github.com/Jermolene/TiddlyWiki5/tree/master/editions/tw5.com/tiddlers/images you'll need a filename.txt.meta file, that defined the tiddler fields. I think, the only field, that must exist is the title eg: title: Motovun Jack.jpg The title inside the mata file can be different to the file name. ... Which can be confusing from time to time :) hope this helps. -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: Treating other file extensions as .tid
This may help too: http://tiddlywiki.com/#TiddlerFiles:TiddlerFiles -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.
Re: [tw] Re: Treating other file extensions as .tid
Thanks for that. I had already gone through the link you've posted - and I appreciate the variety of ways to express metadata - but I suppose I just want one more ... But just to be clear, there's no way in TW5 to 'extend' the list of file extensions so they'd be interpreted as a .tid file? Thanks, Rich On 12 June 2014 11:20, PMario pmari...@gmail.com wrote: This may help too: http://tiddlywiki.com/#TiddlerFiles:TiddlerFiles -m -- You received this message because you are subscribed to a topic in the Google Groups TiddlyWiki group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/HEqq8JZFCEI/unsubscribe. To unsubscribe from this group and all its topics, 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. -- 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: Treating other file extensions as .tid
Hello rich, I think the node version tries to interpret the files that it finds. At least it works with javascript files. Additionally you can specify how should each file be interpreted. I'm which scenario are you doing test? How do you put those files inside tiddlywiky? -- 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: Treating other file extensions as .tid
Hi Thanks - I'll try the node version. I'm trying to create a code snippet library with colleagues at work. For our sins, we are SAS programmers (and therefore, not terribly computer literate ...). Ideally, TW5 would live on a shared drive and people would copy their SAS programs there from which TW5 would pick them up automatically -or- people would import into TW5. The SAS program header becomes the main text of the tiddler (using wikitext markup) and I can show/hide the SAS code itself using RevealWidget. All in all, it works very well: well presented documentation per program (with full program code), each one tagged (brilliant!) and full text searching of the code itself. I'm hugely impressed and this, of all attempts, might gain traction at work. The file extension question is from copying the SAS programs to the shared drive. The programmer has to take the not-so-difficult step of changing the extension from .sas to .tid before importing. Hardly awful, but I liked the idea of the folders being full of ready-to-go SAS programs - and TW5 sitting on top of them, providing all-in-one documentation. My, now I've written this out, I seem awfully ungrateful... Forget I asked. Cheers, Rich On 12 June 2014 15:29, Danielo Rodríguez rdani...@gmail.com wrote: Hello rich, I think the node version tries to interpret the files that it finds. At least it works with javascript files. Additionally you can specify how should each file be interpreted. I'm which scenario are you doing test? How do you put those files inside tiddlywiky? -- You received this message because you are subscribed to a topic in the Google Groups TiddlyWiki group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/HEqq8JZFCEI/unsubscribe. To unsubscribe from this group and all its topics, 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. -- 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: Treating other file extensions as .tid
What you want works wonderfully with javascript. Go to tiddlywiky5 github page. Enter in plugins and then check any of them. You will se there is no tid file, just regular javascript code. Inside each JS file there is a commented header. Field defined on that header are converted to tid files with that fields. You can ask your colleagues to include that header. Then use a custom view template based on, for example a particular tag. Let my know if I explained myself. -- 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.