From: Günter M. <mi...@us...> - 2023-06-25 19:01:34
|
The updated patch now provides a configurable root directory for file paths in the "include", "raw", and "csv-table" directives + documentation and tests. Before it can be applied to master, we need a decision on the behaviour of image URLs when interpreted as file path (i.e. whenever Docutils needs to access locally saved images: embedded images, LaTeX writer, reading meta-data from the image with PIL). IMV, it would make sense to apply the "include-root" setting also in this context. Attachments: - [0001-Config-setting-include-root-configurable-root-direct.patch](https://sourceforge.net/p/docutils/feature-requests/_discuss/thread/a885b6f1ca/7d1d/attachment/0001-Config-setting-include-root-configurable-root-direct.patch) (9.7 kB; text/x-patch) --- **[feature-requests:#91] Include directive path argument should support a configurable root.** **Status:** open **Group:** Default **Created:** Tue May 03, 2022 04:03 PM UTC by Michal Urbanski **Last Updated:** Thu Dec 01, 2022 11:07 PM UTC **Owner:** nobody I'm building a static website using restructuredtext and I'm really annoyed by the lack of support for root-relative paths. I have already implemented multiple directive plugins for my website build process, some of which use external files in a different format. They use the convention that if a path begins with /, they are relative to the root directory of the project. IMO the requirement for relative paths is very limiting - I could have a directory with files intended for inclusion but: - I would need to use `../../` which is very ugly - relative paths are different depending on the current file path - this is very fragile and limits An additional argument is that C and C++ have been using #include for like 40 years and relative paths (while sometimes useful) are only for specific cases. The leading convention is to use root-relative paths. I could implement another plugin for it but ... copy-pasting docutils own code only to change few lines is definitely smelly. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |