The problem is not something new. Namely, while generating a static html filename from TW5 having cyrillic titles in a result one can sort of this:A single cyrillic letter is encoded to 6 (!) ASCII signs. Bearing in mind a typical path name length of 30-40 signs and limitation of many OS on filename length of say 255, one obtains the title length limit approximately around 35, which can be annoying.The point is when during static html generation the full path-and-filename length exceeds 255 the process accidently stops with error message sort of "Too long filename”.
I would be great to have a possibility of altering (sort of a checkbox in Settings) a static html filename encoding method in order to shorten filename length. It might be transliteration method, which, by the way, is used in generating ".tid" filenames under Node.js. Or at least altering a static html filename encoding method in JS source code.
--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2bd639e4-56a7-4ffd-b273-840f8befb638%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
However, fixing the permalinks isn’t as simple as integrating the transliteration. The problem is that the conversion process for mapping tiddler titles needs to be bidirectional: we need to be able to recover the original, Cyrillic tiddler title from the encoded form used in the permalink.So, transliteration isn’t an option. It may be worth exploring whether there is a more efficient encoding mechanisms that we could use. And I guess it would be helpful to understand how other sites/apps deal with this problem, if at all.
Hi,
Just an idea.
If we implement a simple version of fuzzy search, which imo will be highly useful in general, it could use the transliteration extension, if the exact title isn't found.
-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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/de5044a7-c212-465b-af23-3b9244a0e602%40googlegroups.com.
Hi MarioHi,
Just an idea.
If we implement a simple version of fuzzy search, which imo will be highly useful in general, it could use the transliteration extension, if the exact title isn't found.
-mInteresting idea. I’d need some persuading that there wouldn’t be unintended consequences. The alternative I’ve wondered about is to support an explicit “slug” field, like Wordpress:The slug could be optional, defaulting to the URI encoded title as at present. There would need to be a requirement that the slug only contain the limited set of characters permitted in an URL fragment identifier.
Hi MarioHi,
Just an idea.
If we implement a simple version of fuzzy search, which imo will be highly useful in general, it could use the transliteration extension, if the exact title isn't found.
-mInteresting idea. I’d need some persuading that there wouldn’t be unintended consequences. The alternative I’ve wondered about is to support an explicit “slug” field, like Wordpress:
1) the slug-field is optional2) the slug character set is limited to eg: latin characters, digits, and hyphen "-" ... nothing else
3) if no slug field is present, use the permalink mechanism as it is today.
4) The whole slug creation process is manual ... so the OT thoughts about some helper functions doesn't apply.
My concern here is point 4). Since an automatic slug creation process is language specific, it is plugin territory. eg: Cyrillic needs different handling than German.
If we don't provide best practice documentation, we will end up with an unpredictable mess.
As soon as the slug field is implemented, we will get feature requests about auto-creation. So imo it's worth to think about it now already. see OT
------------- OT ----------------
Some plugin implementation thoughts
add 1)
1.1 If the slug-filed is empty for eg: "Hello World", what happens if the user opens a permalink +#hello-world?
1.2 how is duplication like: "Hello World" vs "hello world" resolved? it creates the same slug: #hello-world
1.3 How do we resolve transliteration in a human predictable way. .. This is language dependent. see OP or for German: Hände vs hande vs haende
add 2)
2.1 The URI-fragment definition allows URLencoded chars. ... We don't want this.
2.2 So we will limit it to: ALPHA / DIGIT / "-"
2.3 how do we resolve duplications? see 1.2
links:
- URI fragment is defined at: RFC3986 see: appendix A for the chars allowed.
------------- OT end ----------------
have fun!
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 tiddl...@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/d4aa9d88-3e9a-47ea-b78b-762fd1cc9fad%40googlegroups.com.
I think fuzzy search could avoid all the problems that we will have to deal with, in the future.
-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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/65a51277-e6a2-429f-95d9-ffbe66f7cde7%40googlegroups.com.
Hi Oleg
I'd like to stress another point - there is a rationale in splitting the generation of permalinks for tiddler by two cases:
- for the TW environment (/#) and
- for multiple static files creation (https://goo.gl/JKjpnr).
In the 2nd case conversion reprocicality is not necessary.
That is the very case where I've suggested transliteration as an option.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/cbf0f7f9-e6b1-4193-a6e5-39547494353b%40googlegroups.com.
/*
wikiLinkText = wikiLinkText.replace("$uri_doubleencoded$",encodeURIComponent(encodeURIComponent(this.to))); // ORIGINAL
*/
wikiLinkText = wikiLinkText.replace("$uri_doubleencoded$",this.to); // CHANGED/*
var finalPath = exportPath || path.resolve(pathname,encodeURIComponent(title) + extension); // ORIGINAL
*/
var finalPath = exportPath || path.resolve(pathname,title + extension); // CHANGED