Thread: Re: [Rest2web-develop] txt instead of rst?
Brought to you by:
mjfoord
From: Michael F. <fuz...@vo...> - 2006-08-11 23:33:33
|
martin f krafft wrote: > Why did you choose the .txt extension over .rst, btw? Could this be > configured? I'd like to know before I try to write a vim content > parser to get syntax highlighting to work. :) > From : http://docutils.sourceforge.net/FAQ.html#what-s-the-standard-filename-extension-for-a-restructuredtext-file 2.4 What's the standard filename extension for a reStructuredText file? It's ".txt". Some people would like to use ".rest" or ".rst" or ".restx", but why bother? ReStructuredText source files are meant to be readable as plaintext, and most operating systems already associate ".txt" with text files. Using a specialized filename extension would require that users alter their OS settings, which is something that many users will not be willing or able to do. How would you like it configurable. Would you like it to just read '.rst' files as well, preferring (but not requiring) index.txt over index.rst ? What should it do with the filenames if it finds 'xyz.txt' and 'xyz.rst' in the same directory ? Fuzzyman http://www.voidspace.org.uk/python/index.shtml |
From: martin f k. <ma...@ma...> - 2006-08-11 23:56:50
|
also sprach Michael Foord <fuz...@vo...> [2006.08.12.0034 +010= 0]: > http://docutils.sourceforge.net/FAQ.html#what-s-the-standard-filename-ext= ension-for-a-restructuredtext-file /me hides > 2.4 What's the standard filename extension for a reStructuredText=20 > file? >=20 > It's ".txt". Some people would like to use ".rest" or ".rst" or=20 > ".restx", but why bother? I did not know this. > How would you like it configurable. Would you like it to just read > '.rst' files as well, preferring (but not requiring) index.txt > over index.rst ? >=20 > What should it do with the filenames if it finds 'xyz.txt' and > 'xyz.rst' in the same directory ? I don't have good answers to this. Generally I'd say .rst over .txt, but now that I've seen the FAQ. I've committed a patch to vim upstream to active rst-style syntax highlighting if /^restindex$/ is found in the first five lines of a file. This should make it extension-agnostic. Cheers, --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "ist gott eine erfindung des teufels?" - friedrich nietzsche |
From: Michael F. <fuz...@vo...> - 2006-08-12 20:21:09
|
martin f krafft wrote: > also sprach Michael Foord <fuz...@vo...> [2006.08.12.0034 +0100]: > >> http://docutils.sourceforge.net/FAQ.html#what-s-the-standard-filename-extension-for-a-restructuredtext-file >> > > /me hides > :-) > >> [snip..] >> How would you like it configurable. Would you like it to just read >> '.rst' files as well, preferring (but not requiring) index.txt >> over index.rst ? >> >> What should it do with the filenames if it finds 'xyz.txt' and >> 'xyz.rst' in the same directory ? >> > > I don't have good answers to this. Generally I'd say .rst over .txt, > but now that I've seen the FAQ. > > I've committed a patch to vim upstream to active rst-style syntax > highlighting if /^restindex$/ is found in the first five lines of > a file. This should make it extension-agnostic. > In this case I will leave rest2web as it is, at least in this respect. On the other hand, if you wanted to make this change yourself it should be quite easy. Almost all the code that would need to be changed is in the "rest2web.restprocessor.walk" function. Fuzzyman http://www.voidspace.org.uk/python/index.shtml |
From: martin f k. <ma...@ma...> - 2006-08-12 20:23:23
|
also sprach Michael Foord <fuz...@vo...> [2006.08.12.2122 +010= 0]: > On the other hand, if you wanted to make this change yourself it should= =20 > be quite easy. >=20 > Almost all the code that would need to be changed is in the=20 > "rest2web.restprocessor.walk" function. Of course, but I try never to deviate from upstream. --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "nullum magnum ingenium sine mixtura dementiae fuit." -- seneca |
From: Michael F. <fuz...@vo...> - 2006-08-12 20:25:58
|
martin f krafft wrote: > also sprach Michael Foord <fuz...@vo...> [2006.08.12.2122 +0100]: > >> On the other hand, if you wanted to make this change yourself it should >> be quite easy. >> >> Almost all the code that would need to be changed is in the >> "rest2web.restprocessor.walk" function. >> > > Of course, but I try never to deviate from upstream. > > Don't you SVN checking rights. ;-) My only request would be that you attempt to make corresponding doc changes. I can advise where. Fuzzyman http://www.voidspace.org.uk/python/index.shtml |
From: martin f k. <ma...@ma...> - 2006-08-12 20:33:31
|
also sprach Michael Foord <fuz...@vo...> [2006.08.12.2126 +010= 0]: > Don't you SVN checking rights. ;-) Muahahahahaha. Yes, I do. But I am not convinced at all that .rst is a good idea, and I have submitted the vim syntax file patches already. :) --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "you raise the blade, you make the change you rearrange me till i'm sane. you lock the door, and throw away the key, there's someone in my head but it's not me." -- pink floyd, 1972 |