Comments (5)
Re -- I realized the first one was easy enough to work on:
◊(apply ol (map (lambda (node) `(li (a ((href ,(symbol->string node)))
,(car (select-from-doc 'h1 node)))))
(pagetree->list (get-pagetree "index.ptree")))
)
e.g. this just uses the curated .ptree
and a search over X-expressions to get the right thing.
The second one (forward and back links) I'm still stumped on.
from pollen-users.
As far as I can tell, there's no way to attach metadata to page nodes
Why not define-meta
?
The second question is about rendering the forward / backward links in a graphical form. I know that pollen must do this already (right?)
The forward & backward links can be computed from a pagetree. (They could be computed other ways too.) But no, Pollen does not automatically render them “in a graphical form” — you would do that yourself.
I want to render a "knowledge graph" like representation of the link traversal
What does this mean — a graph of all the hyperlinks between pages? If so, I don’t see any alternative to reading the link
tags out of the source files (assuming the links of interest are already tagged there; if not you would have to read & parse the output files) and imperatively building a graph. Racket’s graph
library will output to graphviz
format, so once you have a graph object, it’s easy to get a rendered diagram. (Not necessarily a pretty diagram, though.)
from pollen-users.
The second one (forward and back links) I'm still stumped on.
This is covered in the second tutorial in the Pollen docs.
from pollen-users.
@mbutterick -- I'm looking into pollen/core
more, I realized I misunderstood that you could access metadata about the document directly (e.g. by using the pagenode reference).
Right, so basically: iterate over nodes in the page tree, and grab all "special" links (e.g. cross links to other nodes), then offload to graphviz
.
I'm pretty close now, thanks for the help!
from pollen-users.
The forward & backward links can be computed from a pagetree. (They could be computed other ways too.) But no, Pollen does not automatically render them “in a graphical form” — you would do that yourself.
Here, I did a poor job -- I meant the traversal across the nodes (not the rendering).
from pollen-users.
Related Issues (20)
- render index.ptree with subdirectories changes directory (though not project root) HOT 8
- Is parallel mode known to crash a lot? HOT 1
- decode-elements with decode-paragraphs inserts spurious <p> when nesting lists? HOT 2
- multiple text arguments? HOT 5
- serialising txexprs? HOT 2
- Beautiful Racket Racket docs HOT 1
- Classic tangle/weave support a la org/babel-mode HOT 2
- Add source tag to default block-tags HOT 3
- Importing text from other sources HOT 2
- One source file → multiple outputs of same type? HOT 6
- Having a hard time with maps HOT 4
- Filling templates multiple times, à la mail-merge -- maybe a non-use case? HOT 3
- Inserting html comment with pollen command HOT 4
- splitf-txexpr: how to use the resulting txexpr HOT 2
- Windows: Set Pollen environment variable HOT 2
- execute shell command via preprocessor?
- Mildy Dynamic Websites
- opinions sought: costs & benefits of switching to self-hosted Git server? HOT 17
- Could not find MANIFEST for package source HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pollen-users.