hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
312 stars 60 forks source link

There is no way to specify the output filename? #2

Closed ralsina closed 9 years ago

ralsina commented 10 years ago

I am trying to add support for doconce in http://getnikola.com and ran into something:

I can't find a way to call doconce with a specific filename as input and a filename as output.

So, if you can describe the command line I should use to turn posts/foo.do into cache/posts/foo.html it would be much appreciated :-)

hplgit commented 10 years ago

Hi,

On 26 February 2014 17:40, Roberto Alsina notifications@github.com wrote:

I am trying to add support for doconce in http://getnikola.com and ran into something:

Interesting! Especially if we can have html with MathJax.

I can't find a way to call doconce with a specific filename as input and a filename as output.

So, if you can describe the command line I should use to turn posts/foo.do into cache/posts/foo.html it would be much appreciated :-)

You can do

doconce format html posts/foo.do.txt mv foo.html cache/posts

I think you can also do

doconce format html posts/foo.do.txt --html_output=cache/posts/foo

Best regards, Hans Petter

Reply to this email directly or view it on GitHubhttps://github.com/hplgit/doconce/issues/2 .

ralsina commented 10 years ago

On 26/02/14 18:13, Hans Petter Langtangen wrote:

Hi,

On 26 February 2014 17:40, Roberto Alsina notifications@github.com wrote:

I am trying to add support for doconce in http://getnikola.com and ran into something:

Interesting! Especially if we can have html with MathJax.

I can't find a way to call doconce with a specific filename as input and a filename as output.

So, if you can describe the command line I should use to turn posts/foo.do into cache/posts/foo.html it would be much appreciated :-)

You can do

doconce format html posts/foo.do.txt mv foo.html cache/posts

Because of different things, double extensions kinda don't work in Nikola. So, I used posts/foo.doconce and it ends producing posts/foo..html but if I use posts/foo.do it produces posts.html Since the output name generation seems fragile and rather buggy, I am hesitant to depend on guessing it right.

$ doconce format html posts/foo.do
translate doconce text in posts/foo.do
output in posts.html
$ doconce format html posts/foo.doconce
translate doconce text in posts/foo.doconce
output in posts/foo..html

I think you can also do

doconce format html posts/foo.do.txt --html_output=cache/posts/foo

Doesn't seem to do anything:

$ doconce format html posts/foo.do --html_output=cache/posts/foo
translate doconce text in posts/foo.do
output in posts.html
hplgit commented 10 years ago

OK, I demand that the extension is .do.txt, and since you don't use this extension, I think the filename generation becomes buggy.

I can try to fix this such that also .do works. I'll write you back.

Best, Hans Petter

On 26 February 2014 23:39, Roberto Alsina notifications@github.com wrote:

On 26/02/14 18:13, Hans Petter Langtangen wrote:

Hi,

On 26 February 2014 17:40, Roberto Alsina notifications@github.com wrote:

I am trying to add support for doconce in http://getnikola.com and ran into something:

Interesting! Especially if we can have html with MathJax.

I can't find a way to call doconce with a specific filename as input and a filename as output.

So, if you can describe the command line I should use to turn posts/foo.do into cache/posts/foo.html it would be much appreciated :-)

You can do

doconce format html posts/foo.do.txt mv foo.html cache/posts

Because of different things, double extensions kinda don't work in Nikola. So, I used posts/foo.doconce and it ends producing posts/foo..html but if I use posts/foo.do it produces posts.html Since the output name generation seems fragile and rather buggy, I am hesitant to depend on guessing it right.

$ doconce format html posts/foo.do
translate doconce text in posts/foo.do
output in posts.html
$ doconce format html posts/foo.doconce
translate doconce text in posts/foo.doconce
output in posts/foo..html

I think you can also do

doconce format html posts/foo.do.txt --html_output=cache/posts/foo

Doesn't seem to do anything:

$ doconce format html posts/foo.do --html_output=cache/posts/foo
translate doconce text in posts/foo.do
output in posts.html

Reply to this email directly or view it on GitHubhttps://github.com/hplgit/doconce/issues/2#issuecomment-36186880 .

hplgit commented 10 years ago

If you do a git pull and new install, doconce format allows files with extension .do only. The --html_output will not function if the output has a directory. That is, you must generate the output in the same directory as the source and then use the operating system or os.rename or similar to move the generated file(s).

doconce format html posts/foo.do mv posts/foo.do cache/posts

See if this helps.

Best, Hans Petter

On 26 February 2014 23:39, Roberto Alsina notifications@github.com wrote:

On 26/02/14 18:13, Hans Petter Langtangen wrote:

Hi,

On 26 February 2014 17:40, Roberto Alsina notifications@github.com wrote:

I am trying to add support for doconce in http://getnikola.com and ran into something:

Interesting! Especially if we can have html with MathJax.

I can't find a way to call doconce with a specific filename as input and a filename as output.

So, if you can describe the command line I should use to turn posts/foo.do into cache/posts/foo.html it would be much appreciated :-)

You can do

doconce format html posts/foo.do.txt mv foo.html cache/posts

Because of different things, double extensions kinda don't work in Nikola. So, I used posts/foo.doconce and it ends producing posts/foo..html but if I use posts/foo.do it produces posts.html Since the output name generation seems fragile and rather buggy, I am hesitant to depend on guessing it right.

$ doconce format html posts/foo.do
translate doconce text in posts/foo.do
output in posts.html
$ doconce format html posts/foo.doconce
translate doconce text in posts/foo.doconce
output in posts/foo..html

I think you can also do

doconce format html posts/foo.do.txt --html_output=cache/posts/foo

Doesn't seem to do anything:

$ doconce format html posts/foo.do --html_output=cache/posts/foo
translate doconce text in posts/foo.do
output in posts.html

Reply to this email directly or view it on GitHubhttps://github.com/hplgit/doconce/issues/2#issuecomment-36186880 .

hplgit commented 10 years ago

Hi,

I have looked more at Nikola and it looks very useful. Have you succeeded in integrating doconce documents as alternative to markdown and rst?

Best, Hans Petter

On 27 February 2014 11:40, Hans Petter Langtangen hpl@simula.no wrote:

If you do a git pull and new install, doconce format allows files with extension .do only. The --html_output will not function if the output has a directory. That is, you must generate the output in the same directory as the source and then use the operating system or os.rename or similar to move the generated file(s).

doconce format html posts/foo.do mv posts/foo.do cache/posts

See if this helps.

Best, Hans Petter

On 26 February 2014 23:39, Roberto Alsina notifications@github.comwrote:

On 26/02/14 18:13, Hans Petter Langtangen wrote:

Hi,

On 26 February 2014 17:40, Roberto Alsina notifications@github.com wrote:

I am trying to add support for doconce in http://getnikola.com and ran into something:

Interesting! Especially if we can have html with MathJax.

I can't find a way to call doconce with a specific filename as input and a filename as output.

So, if you can describe the command line I should use to turn posts/foo.do into cache/posts/foo.html it would be much appreciated :-)

You can do

doconce format html posts/foo.do.txt mv foo.html cache/posts

Because of different things, double extensions kinda don't work in Nikola. So, I used posts/foo.doconce and it ends producing posts/foo..html but if I use posts/foo.do it produces posts.html Since the output name generation seems fragile and rather buggy, I am hesitant to depend on guessing it right.

$ doconce format html posts/foo.do
translate doconce text in posts/foo.do
output in posts.html
$ doconce format html posts/foo.doconce
translate doconce text in posts/foo.doconce
output in posts/foo..html

I think you can also do

doconce format html posts/foo.do.txt --html_output=cache/posts/foo

Doesn't seem to do anything:

$ doconce format html posts/foo.do --html_output=cache/posts/foo
translate doconce text in posts/foo.do
output in posts.html

Reply to this email directly or view it on GitHubhttps://github.com/hplgit/doconce/issues/2#issuecomment-36186880 .

ralsina commented 10 years ago

I got sidetracked by other tasks, but I may take another shot at it this sunday night.