Ceasar / Encyclopedia

Tool for keeping a hypermedia encyclopedia
MIT License
55 stars 7 forks source link

Compile `src/index` automatically #6

Open Ceasar opened 10 years ago

Ceasar commented 10 years ago

This is possible by specifying in the Makefile a rule to build it. It would need some function that scans file for hyperlink targets, and then use that to compile them into an index.

If done intelligently, it's possible that many files could be combined, if for instance the scanner could find links to subsections of documents. This would be useful for topics which I am not particularly interested in expanding and which strictly go together (similar perhaps to private classes). For instance, "watch strap" only makes sense in the context of a "watch", so it may make sense to keep them together.

Note, this could cause some trouble for stipulative definitions.

Ceasar commented 10 years ago

This is infeasible, since there is no programmatically way to deduce which targets anchors should point to, except in the case where they are identical (e.g. _apple: Apple.html).

Ceasar commented 10 years ago

I'm reopening this per @LewisJEllis's suggestion in #5. Though we cannot reasonably infer all of the edge cases, it would make sense to automatically generate links where we can, (e.g. _apple: Apple.html). This should be reasonably simple to implement and would be well worth the time-saved.

Ceasar commented 10 years ago

There are basically two ways we can do this:

  1. Write a shell script which generates the file we need, and then use it as part of the Makefile
  2. Figure out how to compile RST programmatically, and then just write this in Python

(2) is preferable, and would be solved by solving #34.

Ceasar commented 10 years ago

This was accidentally closed by https://github.com/Ceasar/Encyclopedia/commit/406dbdb1192b20a0f79106f870567738003e3b99, which should have closed #34.