Re: [pollen] Source files in multiple directories and generating an index

2019-01-20 Thread Evžen Wybitul
The steps I made:

1. Put index.ptree in root directory, with it` template.html.p` and 
`styles.css`. Also `master.html.pm`.
2. Directory `analysis`, in there files `file1.html.pm` `file2.html.pm`.

Index.ptree:
◊master.html{
  analysis/file1.html
  analysis/file2.html
}

And it works, partially. However, when I call `(next here)` on order to do 
page navigation, the value for file1 is `analysis/file2.html`, but I'd need 
it to be only `file2.html`. Of course, I could just strip the `[...]/` part 
programatically, but that feels really hack-ish. Especially if there's a 
better way.

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pollen] Source files in multiple directories and generating an index

2019-01-20 Thread Matthew Butterick

> On Jan 20, 2019, at 12:03 PM, Evžen Wybitul  wrote:
> 
> 1. I can't find out how to keep the "notes" from different subjects in 
> different folders. The problem is I'm unable to dynamically build the 
> "master-index" of such files. 

What have you tried that didn't work? It seems straightforward to put code 
inside "master-index.html.pm" that reads the contents of adjacent directories 
and makes links.



> 2. I'd like to have the output files in one folder, and not side by side with 
> the source files (solvable by `raco pollen publish`, but that's an extra 
> command I have to manually run).


Which, in turn, can be solved by putting your build commands into a makefile. 
This feature has been requested before. But it's a lot more annoying to 
implement than it seems. Once the two directories are separate, there's a whole 
new set of error conditions that can arise.


> Forgot this: I'd also like to use only one template and css file for all of 
> the files. 


If you put your template & css in the root directory of the project, the source 
files in the subdirectories should find it.

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[pollen] Re: Source files in multiple directories and generating an index

2019-01-20 Thread Evžen Wybitul
Forgot this: I'd also like to use only one template and css file for all of 
the files. 

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[pollen] Source files in multiple directories and generating an index

2019-01-20 Thread Evžen Wybitul
Hey,

I'd like to use pollen for my college notetaking, but I have two problem 
with it

1. I can't find out how to keep the "notes" from different subjects in 
different folders. The problem is I'm unable to dynamically build the 
"master-index" of such files. 
2. I'd like to have the output files in one folder, and not side by side 
with the source files (solvable by `raco pollen publish`, but that's an 
extra command I have to manually run).

The directory structure I'd like to have:
|- src
|- index.ptree
|- master-index.html.pm
|- analysis
 |- analysis1.html.pm
 |- analysis2.html.pm
 |- analysis3.html.pm
|- linear algebra
 |- algebra.html.pm
 |- algebra.html.pm
 |- algebra.html.pm
|- [etc.]
|- output
|- master-index.html
|- analysis
 |- analysis1.html
 |- analysis2.html
 |- analysis3.html
|- linear algebra
 |- algebra.html
 |- algebra.html
 |- algebra.html
|- [etc.]

Is there any way to make it like so? And how would you (dynamically, base 
only on the index.ptree file) generate the index in master-index?

Thanks. Please ask for clarification if something isn't clear.

-- 
You received this message because you are subscribed to the Google Groups 
"Pollen" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pollenpub+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.