chnm / anthologize

Anthologize is a free, open-source, WordPress-based platform for publishing. Grab posts from your WordPress blog, pull in feeds from external sites, or create new content directly in Anthologize. Then outline, order, and edit your work, crafting it into a coherent volume for export in several formats, including PDF, EPUB, and TEI.
http://anthologize.org
GNU General Public License v3.0
174 stars 29 forks source link

Add link localization to outputs #40

Open patrickmj opened 12 years ago

patrickmj commented 12 years ago

Imported from Trac ticket #106 reported by patrickmj on 2010-11-13:

Under some circumstances (see http://groups.google.com/group/anthologize-users/browse_thread/thread/6ff496e41bc7d6d2 ) links that should be internal to the output end up being external. Need a way to assert both in A-TEI and output the internal vs. external links.

patrickmj commented 12 years ago

Comment by boonebgorges on 2010-11-13:

I was wondering whether that would happen. Recognizing local links at encoding time shouldn't be tough (look for relative links, or for strpos on the current domain). The tricky part will be making those links work, once the original page structure no longer exists. Maybe when an item is pulled into a project, an anchor can be dropped into the top of the anth_library_item (just in case some appends take place). And then when those links are processed when going into the TEI, use those anchors as a type of cross-reference between where the relative links point and the anchors that mark content coming from the linked page.

Does that make any sense ? :)