Paths - support for ~ / home directory relative paths

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Paths - support for ~ / home directory relative paths

neontapir
This post was updated on .
Hello, I have a question. I'd like to do something like this at the top of my AsciiDoc file to apply a stylesheet from a consistent directory.

:styledir:  ~/lib/asciidoctor/stylesheets
:stylesheet: {styledir}/riak.css

However, looking at test/paths_test.rb, it doesn't look like Asciidoctor's path resolver supports tilde home directory-style paths.

Is there a way to achieve this effect without manually resolving my home directory? The stylesheet is included correctly if I do.
Reply | Threaded
Open this post in threaded view
|

Re: Paths - support for ~ / home directory relative paths

LightGuardjp
Administrator
I would think ruby will drop down and let the OS complete the path. Give it a try and find out :) In the worst case you found a bug we can fix!


On Thu, Sep 12, 2013 at 5:15 PM, neontapir [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello, I have a question. I'd like to do something like this at the top of my AsciiDoc file.

:styledir:  ~/lib/asciidoctor/stylesheets
:stylesheet: {styledir}/riak.css

However, looking at test/paths_test.rb, it doesn't look like Asciidoctor's path resolver supports tilde home directory-style paths.

Is there a way to achieve this effect without manually resolving my home directory?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Paths-support-for-home-directory-relative-paths-tp584.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Paths - support for ~ / home directory relative paths

neontapir
I apologize, my post was poorly worded. I did indeed confirm that it does not resolve the path.

The output is:

asciidoctor: WARNING: file does not exist or cannot be read: /Users/neontapir/Documents/and/so/on/~/Documents/reference/asciidoc/stylesheets/golo.css

I add an issue on github. Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Paths - support for ~ / home directory relative paths

LightGuardjp
Administrator
Ah. Yep, then we have a bug :) Baring anything Dan may have to say about this, could you please submit a bug at https://github.com/asciidoctor/asciidoctor/issues?


On Thu, Sep 12, 2013 at 5:33 PM, neontapir [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I apologize, my post was poorly worded. I did indeed confirm that it does not resolve the path.

The output is:

asciidoctor: WARNING: file does not exist or cannot be read: /Users/neontapir/Documents/and/so/on/~/Documents/reference/asciidoc/stylesheets/golo.css


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Paths-support-for-home-directory-relative-paths-tp584p586.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Paths - support for ~ / home directory relative paths

mojavelinux
Administrator


On Thu, Sep 12, 2013 at 5:47 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ah. Yep, then we have a bug :) Baring anything Dan may have to say about this, could you please submit a bug at https://github.com/asciidoctor/asciidoctor/issues?


On Thu, Sep 12, 2013 at 5:33 PM, neontapir [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I apologize, my post was poorly worded. I did indeed confirm that it does not resolve the path.

The output is:

asciidoctor: WARNING: file does not exist or cannot be read: /Users/neontapir/Documents/and/so/on/~/Documents/reference/asciidoc/stylesheets/golo.css


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Paths-support-for-home-directory-relative-paths-tp584p586.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML





If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Paths-support-for-home-directory-relative-paths-tp584p587.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--