Thanks a lot Saq + Joshua!

I am actually exploring a way (using a well done XML pathing plugin) to 
> "chunk" out PDFs into individual paragraph tiddlers (just an idea at this 
> point).
>

Wow this would be awesome. I use PDFs all the time but they are incredibly 
inflexible. Slicing them into tiddlers would totally obliterate the barrier 
between reading and note taking. Please share if you get it working!

On Tuesday, 10 November 2020 03:46:37 UTC, Joshua Fontany wrote:
>
> Saq caught it! You are overwriting the text field of each tiddler as it is 
> imported with a blank string. Delete the "text" and "_cannonical_uri" 
> fields from the config json, and you should be good. The reason we do not 
> use "_canononical_uri" in this instance is that we are not asking the 
> browser to fetch anything from a URL. Once the text from each file is 
> loaded into TW as a tiddler, it is part of the native info ecosystem of TW.
>
> I am actually exploring a way (using a well done XML pathing plugin) to 
> "chunk" out PDFs into individual paragraph tiddlers (just an idea at this 
> point).
>
> Hope this helps,
> Joshua F
>
> On Monday, November 9, 2020 at 10:13:51 AM UTC-8 saq.i...@gmail.com wrote:
>
>> Skip the text and canonical Uri fields.
>>
>>
>> On Monday, November 9, 2020 at 3:21:16 PM UTC+1 si wrote:
>>
>>> Hi Joshua, thanks for your reply.
>>>
>>> I tried out your suggestion for node.js and although the tiddlers for 
>>> the text-files do get created, the text still won't display.
>>>
>>> I created the file "tiddlers/text-files/tiddlywiki.files" as you 
>>> described, and put the file "Text file.txt" into the same directory.
>>>
>>> Here is the contents of "tiddlywiki.files":
>>>
>>> {
>>>     "directories": [
>>>         {
>>>             "path": "",
>>>             "filesRegExp": "^.*\\.txt$",
>>>             "isTiddlerFile": false,
>>>             "fields": {
>>>                 "title": {"source": "basename-uri-decoded"},
>>>                 "created": {"source": "created"},
>>>                 "modified": {"source": "modified"},
>>>                 "type": "text/plain",
>>>                 "tags": ["$:/tags/AttachedFile"],
>>>                 "text": "",
>>>                 "_canonical_uri": {"source": "filename", "prefix": ""}
>>>             }
>>>         }
>>>     ]
>>> }
>>>
>>>
>>> The result is that a tiddler for "Text file" does appear in my wiki, but 
>>> still no text is displayed. See here <https://imgur.com/a/U3yKfVK>.
>>>
>>> I also tried the same thing but with PDFs and still the content would 
>>> not display.
>>>
>>> Any idea what I'm doing wrong?
>>>
>>>
>>> On Monday, 9 November 2020 04:44:49 UTC, Joshua Fontany wrote:
>>>>
>>>> This is possible if you are running your wiki on Node.js. If it is a 
>>>> single-file standalone HTML wiki your best bet is to import the text files 
>>>> by drag'n'drop.
>>>>
>>>> If you are running on Node.js, you can use a "tiddlywiki.files" file 
>>>> (documentation 
>>>> here <https://tiddlywiki.com/#tiddlywiki.files%20Files>), to include a 
>>>> whole folder full of files at once into tiddlywiki. The config file 
>>>> defines 
>>>> the other "meta-data fields" like "type", etc. The folder in question has 
>>>> to be inside said wiki's "tiddlers" folder (where "tiddlers is parallel to 
>>>> a "tiddlywiki.info" config file). Your structure would be similar to:
>>>>
>>>> WikiDir
>>>> |- "tiddlywiki.info" (json file for wiki config)
>>>> |- "tiddlers" dir
>>>>         |- "text-files" dir
>>>>                 |- "tiddlywiki.files" (json file for text-file import 
>>>> config)
>>>>                 |-  all the files to import 
>>>>         |- "other" dirs (in the "tiddlers" dir)
>>>>         |- tiddlers.tid(s) (text tiddlers in the "tiddlers" dir)  
>>>> |- "files" dir (outside "tidders" to serve images and such)
>>>>
>>>>
>>>>
>>>> On Sunday, November 8, 2020 at 5:34:46 PM UTC-8 TW Tones wrote:
>>>>
>>>>> Si,
>>>>>
>>>>> Understood. I have tried to encourage others with more knowledge on 
>>>>> this to help us make such included content interact more within 
>>>>> tiddlywiki. 
>>>>> I understand the problem may relate to the object being included in the 
>>>>> standard DOM, but tiddlywiki manages its own DOM tree to preform all it's 
>>>>> magic.
>>>>>
>>>>> keep in mind I am not expert here.
>>>>>
>>>>> A higher level of interaction with html and the standard DOM including 
>>>>> between the DOM and Tiddlywikis own one would be nice, For example an 
>>>>> action that will populate a local tiddler with the content displayed by 
>>>>> the 
>>>>> object.
>>>>>
>>>>> I have actually installed full featured html pages within tiddlywiki, 
>>>>> and by providing the additional files, css and scripts in the same 
>>>>> directory as the single file tiddlywiki, have got them working. So I am 
>>>>> confident we can create ways to interact with external resources.
>>>>>
>>>>> Simply being able to save the output of something like;
>>>>> <object width="100%" height="930" data=
>>>>> "file:///C:\Data\batches\networkcheck.txt"></object> 
>>>>> into a tiddler, variable or on wikification would be great.
>>>>>
>>>>> However you would be applying dynannotate to a copy.
>>>>>
>>>>> Regards
>>>>> Tones
>>>>>
>>>>>
>>>>> On Sunday, 8 November 2020 23:58:58 UTC+11, si wrote:
>>>>>>
>>>>>> Hi Tones,
>>>>>>
>>>>>> The HTML object method does display the file, but I can't add 
>>>>>> annotations to with dynannotate.I realize I was not clear about what I 
>>>>>> wanted to use the file for in my original post.
>>>>>>
>>>>>> I'm trying to get the text file to display just as though it were a 
>>>>>> plain text tiddler stored in the wiki. I know I won't be able to edit it 
>>>>>> from the wiki, but I was hoping that I would be able to add annotations 
>>>>>> with dynannotate.
>>>>>>
>>>>>> On Friday, 6 November 2020 22:11:40 UTC, TW Tones wrote:
>>>>>>>
>>>>>>> Si,
>>>>>>>
>>>>>>> Have you tried the html object tag?
>>>>>>>
>>>>>>> I have a newtworkcheck batch that I launch from a TiddlyDesktop 
>>>>>>> wiki, that returns the result in a text file.
>>>>>>>
>>>>>>>
>>>>>>> <a title={{!!tooltip}} href=
>>>>>>> "file:///C:\Data\batches\runnetworkcheck.cmd" > Go</a>
>>>>>>>
>>>>>>> <$button set="Networkcheck!!last-refresh" setTo=<<now "0hh:0mm">> >
>>>>>>> Refresh {{Networkcheck!!last-refresh}}
>>>>>>> </$button>
>>>>>>>
>>>>>>> <object width="100%" height="930" data=
>>>>>>> "file:///C:\Data\batches\networkcheck.txt"></object> 
>>>>>>>
>>>>>>> It also has a button that sets a field to cause a refresh and time 
>>>>>>> stamps it.
>>>>>>>
>>>>>>> Tones
>>>>>>>
>>>>>>>
>>>>>>> On Saturday, 7 November 2020 05:21:09 UTC+11, si wrote:
>>>>>>>>
>>>>>>>> I have some external source-code files that I would like to add to 
>>>>>>>> my wiki as plain text so that I can make notes on them.
>>>>>>>>
>>>>>>>> Rather than making another copy of the text, I thought I would be 
>>>>>>>> able to embed the file as I would a PDF or HTML file.
>>>>>>>>
>>>>>>>> I set _canonical_uri to ./folder/code.py and changed the type to 
>>>>>>>> text/plain. This didn't work.
>>>>>>>>
>>>>>>>> I noticed that if I change the type to text/html, the text does 
>>>>>>>> get embedded as though it were an html file.
>>>>>>>>
>>>>>>>> Is there any way to embed text and have it appear as regular plain 
>>>>>>>> text?
>>>>>>>>
>>>>>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4a8ebc7a-e468-4de7-9597-cdacfa727b41o%40googlegroups.com.

Reply via email to