Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Handling #5

Open
dhouck opened this issue Jan 24, 2015 · 1 comment
Open

Link Handling #5

dhouck opened this issue Jan 24, 2015 · 1 comment

Comments

@dhouck
Copy link
Contributor

dhouck commented Jan 24, 2015

There are a few issues with link handling. I am unfamilliar with the relevant section of the code so am unlikely to get to them myself. I’m consolidating them all here.

  • Intra-glowfic links remain external except in the special case they’re in the TOC; see, for example, the link in the first comment of Effulgence 4.2 Milliways Lurks.
  • Intra-glowfic links that do get redirected to a comment should be redirected to that comment’s thread when the comment is the first in its thread. At the moment, this doesn’t make much difference, but it will once we get better thread handling (I’ll have a pull request for part of that up relatively soon unless something goes wrong with testing). I don’t know how difficult it would be to check if a comment is the start of a thread every time we handle a link to one, though. What this looks like is sometimes replacing #cmt12345 with #thread12345, where the “sometimes” is the hard part.
  • Some external links should really be included in the epub. For example, Effulgence has one external image embedded in the first page of these are my villagers, and it would be nice to include the Bellbook entries if those could be easily sorted algorithmically. The image could be handled using mostly the existing code (wget to retrieve it, etc.); the Bellbook would probably be harder.
@dhouck
Copy link
Contributor Author

dhouck commented Jan 27, 2015

I’ve handled the first bullet point, and am working on the third. One I did not mention, and don’t know how to handle, is the Bellbook. I think I can add them, and partially handle the third bullet point, by adding another field (repeated string additional_urls) to Comments in the protocol, and downloading everything else during the images_get phase (which would become partially misnamed, since it would also get the Bellbook).

Edit: Forgot to finish explaining the problem with this approach. It would download the Bellbook entries, and it would then be possible to parse them, but they’d need to be run through another firstflat_parse, all_flat_download, and all_flat_parse loop, at which point there’d be no guarantee there wouldn’t be further recursion. Even if we assume, as is so far the case, that there would be no further recursion, this is annoying. I think adding an “appendix” list, to be treated as just another TOC, would be good. This is blocked by the need for a manual config file, though.

dhouck added a commit to dhouck/effulgence2epub that referenced this issue Jan 28, 2015
dhouck added a commit to dhouck/effulgence2epub that referenced this issue Jan 29, 2015
@dhouck dhouck mentioned this issue Jan 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant