Discussion:
[tw] How to disable automatic renaming file
Add Reply
Cyril SANTUNE
2017-10-06 09:20:08 UTC
Reply
Permalink
Raw Message
Hi, I have some plain text file with ".dot" extension.
When I save one file with the ".dot" it is rename to ".dot.txt".

How can I disable that ?
--
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 ***@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/6ebe1036-8c21-48bc-a335-fb9857535fdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2017-10-06 09:46:50 UTC
Reply
Permalink
Raw Message
What operating system are you using? That sounds like a windows thing.
--
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 ***@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/ac7a38a7-843e-4e64-aaee-f9251bdf5205%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cyril SANTUNE
2017-10-06 10:18:45 UTC
Reply
Permalink
Raw Message
Yes i'm on Windows with the node.js "mode"
--
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 ***@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/fe42f4b0-de76-43c6-9c94-2e3a9e956386%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PMario
2017-10-06 13:52:44 UTC
Reply
Permalink
Raw Message
Post by Cyril SANTUNE
Hi, I have some plain text file with ".dot" extension.
When I save one file with the ".dot" it is rename to ".dot.txt".
TW is designed to deal with tiddlers. It isn't designed to be an all
purpose text editor.

The extension is defined by the tiddler type. If you use type: "text/plain"
it is set to .txt ... because it's defined by the tiddler mime type.

Tiddlers with no type default to .tid because type is set to
"text/vnd.tiddlywiki" by the core.

In TW tiddler titles are not necessarily related to OS file system names.
eg: asdf.tid could be imported as myName title.
Post by Cyril SANTUNE
How can I disable that ?
I don't know a way to disable this behvior. ...

IMO you'll need a plugin, that registers your extension with an new eg:
"text/x-myType" mime type, that probably handels your files as text files
and doesn't add an extension. Instead it should use the tiddler name. ....
AND it needs to create a ??.dot.meta file, which contains the TW metat
data.

.meta is needed since the server startup procedure will ignore unknown file
extensions without a .meta file.

-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 ***@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/6af47dde-ca6d-4ecc-92ab-139277a73e4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2017-10-06 14:09:00 UTC
Reply
Permalink
Raw Message
I am confused about what is going on now. Are you exporting a tiddler as a
text file (using the export function in tiddlywiki) and giving it a name
that ends it .dot?
Because the exporter adds the extension when exporting so that is expected
behaviour. If that is what is going on than you can make your own custom
exporter (it is simple) and have it use a .dot extension instead.
Documentation is
here: http://tiddlywiki.com/#Creating%20a%20custom%20export%20format

Otherwise I think we need a clearer explanation of what you are trying to
do.
--
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 ***@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/ce6e40aa-2126-43ae-8c9d-ac6f2961d53b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cyril SANTUNE
2017-10-06 15:08:53 UTC
Reply
Permalink
Raw Message
I don't remember how I import the file. I manually create ".meta" for lot
of my file. I probably do the same for the ".dot" file.

I don't understand why you say "TW is designed to deal with tiddlers. It
isn't designed to be an all purpose text editor." TW handles my markdown
file properly and I also put ".pdf", images, etc in it.

My purpose is to use tags for all my file in my documentation directory.
There is several types of file. However I want to tag everything (not only
text file).
--
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 ***@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/f67931e5-cace-4be1-97bc-adc2f126449f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cyril SANTUNE
2017-10-06 15:11:27 UTC
Reply
Permalink
Raw Message
@Jed Carty : I try the exporter but I fail.

I'm not use about the configuration. Can I simply copy the content in the
documentation or the exportFilter must be change? I am not sure to
understand the documentation.

\define renderContent()
{{{ $(exportFilter)$ ||$:/core/templates/plain-text-tiddler}}}
\end
<<renderContent>>
--
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 ***@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/1cb2fb1d-01ab-49f6-960f-64bc1ca7cc75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PMario
2017-10-06 21:59:42 UTC
Reply
Permalink
Raw Message
Post by Cyril SANTUNE
I don't remember how I import the file. I manually create ".meta" for lot
of my file. I probably do the same for the ".dot" file.
That's ok. The problem is, that TW doesn't have an idea of your .dot
extension, what it means and how to handle it. At the startup it regesters about
30 file extensions
<https://github.com/Jermolene/TiddlyWiki5/blob/master/boot/boot.js#L1940>,
where it knows how to deal with them.

If you set the type field in the .meta file to "text/plain", tiddlywiki
knows the mime type and imports it as a text file.

The title field eg: test.dot is just a string. the extension doesn't have
any meaning! That's the reason, why TW renames your file if you edit the
tiddler.
It uses the type field to set the extension. ... text/plain -> .txt

In your case this results to: test.dot.txt ... where the first .dot is
just a part of the name.

I don't understand why you say "TW is designed to deal with tiddlers.
As written above. There is a limited ammount of extensions, that TW knows.
".dot" isn't one of them, so it's ignored. .... If a new tiddler is created
it never uses the tiddler title to create the file extension. It uses the
tiddler mime-type <https://en.wikipedia.org/wiki/Media_type>field!
Post by Cyril SANTUNE
It isn't designed to be an all purpose text editor." TW handles my
markdown file properly and I also put ".pdf", images, etc in it.
Because they are known.
Post by Cyril SANTUNE
My purpose is to use tags for all my file in my documentation directory.
ok
Post by Cyril SANTUNE
There is several types of file. However I want to tag everything (not only
text file).
That's fine. ... But as I wrote, you'll probably need a plugin, that
registers your extension(s) with some rules, how to view and save them.

-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+***@googlegroups.com.
To post to this group, send email to ***@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/56c6a486-b634-4d36-9fca-6babbcac3882%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cyril SANTUNE
2017-10-09 07:42:14 UTC
Reply
Permalink
Raw Message
Thanks, I modify the "boot.js" file. It is probably not the best way to do
it but it seems to work.
--
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 ***@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/04a875a0-2271-424c-bfed-deb7691b85f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TonyM
2017-10-09 12:29:53 UTC
Reply
Permalink
Raw Message
Mario
I would to love to register some additional extensions or export import additional extensions as text tiddlers. so if you know a plugin please pass it on. otherwise I will create a custom export.

regards
tony
--
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 ***@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/369ce577-9cf2-4471-8488-73ccebd04afc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PMario
2017-10-09 14:33:35 UTC
Reply
Permalink
Raw Message
Post by TonyM
I would to love to register some additional extensions or export import
additional extensions as text tiddlers.
I first thought, we could add mime-type parameters, __but__ according to
the spec. They are not dynamic. .. So you need to register them prior to
using them.

So we would need an additional tiddler field, that would specify and
overwrite the default ".txt" configuration for text/plain. Since the
"text/plain" check is hardcoded several times in the TW source, we would
need to be careful! ...
Post by TonyM
so if you know a plugin please pass it on.
There is no plugin 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+***@googlegroups.com.
To post to this group, send email to ***@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/7f7d2f7b-d2d4-4d11-8bd8-71d128a27151%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PMario
2017-10-06 15:10:28 UTC
Reply
Permalink
Raw Message
Post by Jed Carty
I am confused about what is going on now.
node.js version has changed behaviour for "writing new files" quite a bit.
see: http://tiddlywiki.com/#Release%205.1.14 ... Node.js Improvements
especially: Fixed
<https://github.com/Jermolene/TiddlyWiki5/commits/master/plugins/tiddlywiki/filesystem/filesystemadaptor.js>
multiple issues the creation of new tiddler files by the filesystem adaptor
..
in detail:
https://github.com/Jermolene/TiddlyWiki5/commit/3708f6c8e4f4bf2ea1cb10b0fa685888485f788a
... Major refactoring of filesystemadaptor
Post by Jed Carty
Are you exporting a tiddler as a text file (using the export function in
tiddlywiki) and giving it a name that ends it .dot?
If you crate a new tiddler __and__ immmediately change the type to eg:
"text/plain" it will be saved as xx.txt and xx.txt.meta
Same for .md and .md.meta or .css and .css.meta and some others.

Important: New tiddlers only!

-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 ***@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/b76e8599-2d42-46f4-8c58-6589213b6949%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...