Male C. Pig a.k.a. Svinopolist (piggymouse) wrote,
Male C. Pig a.k.a. Svinopolist

Semagic feature request: Friend list history


History of changes in friends & friend-of lists automatically updated on a daily basis.

Feature specification

Terminology used in this specification:

  • Friend state: F, contents of friends and friend-of lists for a specific LJ user.
  • Friend state delta: ΔF, information about differences between two friend states (added and removed users from both friends and friend-of lists).

Friend state history tracking

If the friend history tracking is enabled for currently logged on LJ user and one of the following events occurs:

  • The application has just logged on to LJ.
  • The system date has just changed.
  • "Edit Friends" dialog box is being opened.

Execute the following procedure:

  • Load the actual friend state Fcurr. Save it as the friend state for the current date Dcurr. If a friend state was already saved for Dcurr, overwrite it.
  • Find the latest date Dprev before Dcurr for which a friend state Fprev was stored.
  • If Fprev was found, calculate the friend state delta ΔFcurr = Fcurr – Fprev.
  • If Fprev was not found (i.e. this is the first day of the friend history tracking), set ΔFcurr = Fcurr – Ø, where Ø represents a friend state with empty friends and friend-of lists.
  • Save ΔFcurr as the friend state delta for Dcurr. If a friend state delta was already saved for Dcurr, overwrite it.

Friend state history reporting

If friend history data are stored for currently logged on LJ user, the application shall provide the possibility to view and save the friend history report.

It shall be possible to specify the beginning and end date for the report.

It shall be possible to save the report in HTML and XML-based formats. The XML-based format should be specified elsewhere (in a form of a DTD or an XML Schema).

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded