tools-life / taskwiki

Proper project management with Taskwarrior in vim.
Other
836 stars 95 forks source link

HTML export contains taskwiki metadata #118

Open bodograumann opened 7 years ago

bodograumann commented 7 years ago

When exporting a wiki page to html with :Vimwiki2HTML, the resulting file contains metadata in the headers and task lists, e.g. viewport filters and task ids. In vim this is concealed and it should be stripped when exporting.

tbabej commented 7 years ago

Not sure how we could do about this. I persume :Vimwiki2HTML takes the content of the buffer, so we would either need to:

bodograumann commented 7 years ago

None of these options seems desirable. What would also work is to modify some parsing functions of vimwiki (e.g. s:process_tag_h in autoload/vimwiki/html.vim:990) to strip the metadata either by

Although this does not sound much more sensible.

tbabej commented 7 years ago

I would like to avoid copying, so if this is going to get implemented, we would need support for hooks or monkey patching (but I'm not aware if this is possible with vimscript).

Hooks would need to be implemented in the upstream vimwiki though. Maybe a custom preprocessing function respected by vimwiki would suffice.

rolandog commented 6 years ago

I've referenced this issue so as to restart a discussion on the best way to implement it.

chenle02 commented 3 years ago

Hi, I am also looking for this feather of hiding properly the mata data in the HTML. It will be great that there is some progress for this.

JarnoB commented 2 years ago

I'm looking for a solution for the same problem here.

One other solution that i can think of is using JavaScript post-processing to filter out the metadata. I don't think this would be a pretty workaround tho, but it might do the trick.

Pre-processing hooks might be a better solution, but I wanted to share this idea just in case. I'm not experienced with javascript at all, but these threads give me an idea how this might be able to work:

https://cmsdk.com/jquery/remove-a-certain-text-from-a-div.html

https://stackoverflow.com/questions/9323182/how-to-remove-the-last-word-in-the-string-using-javascript