[WIP] initial recent activity page
refs: https://github.com/Engil/Canopy/issues/72
- [x] get diff of new content and old content in modified articles
- [ ] style recent activity page (only display modified lines and their line number for modified articles)
- [ ] get author information from commit (or should I get that from article?)
this looks good to me for a start... can we have the commit timestamp and the author information (and a diff of the content) -- and not only the uri which was modified/added...
deletion: well, using this strategy it is hard to detect, I thought that we might be able to fold over the commits and extract the information of removed/added/modified files from the commit...
atom output should be pretty straightforward (but let's first make the html page and see what metadata we can get there)!
Latest push gets all changes to files (updates, deletes, creations) for every commit. I'll have to filter files that aren't articles (files with no article metadata) and limit the recent changes that would be displayed in the page. Then I'll move on to fixing how the context is displayed.
I'm sorry, I'm currently lacking time to look into this very nice PR. Hopefully soon.
No problem at all! I'm looking at longest common subsequence for diffing the updated content. https://www.ics.uci.edu/~eppstein/161/960229.html http://algorithms.tutorialhorizon.com/dynamic-programming-longest-common-subsequence/
Seems simple enough. Will try implementing it later on my day so will let you know how that goes.
On Tue, Nov 22, 2016 at 9:36 PM, Hannes Mehnert [email protected] wrote:
I'm sorry, I'm currently lacking time to look into this very nice PR. Hopefully soon.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Engil/Canopy/pull/76#issuecomment-262242007, or mute the thread https://github.com/notifications/unsubscribe-auth/ABY-Qv-mjQPb-HwapxZhHPz_LQUcMoBhks5rAu_jgaJpZM4Ks1Da .
-- Gabe Jaldon
@hannesm I'm still keen on finishing up this PR. Latest push includes a diff algo that I ported from https://github.com/paulgb/simplediff/. It uses arrays and a lot of side-effects.
Edited articles now show lines that are deleted (prefixed with '-') and lines that are added (prefixed with '+'). Will need to work on styling next and refactoring that really long get_diff function. I'm thinking of moving it to its own module.
nice! :) yes, a custom module (maybe even a custom library, since this might be useful in other contexts, and as you mentioned there is no standalone small library providing such functionality (apart from patdiff which depends on core)).
Could you rebase this on master (there are merge cinflicts)