TABLE OF CONTENTS


Yass/AtomFeed [ Packages ]

[ Top ] [ Packages ]

FUNCTION

 Provide code to create Atom feed

SOURCE

package AtomFeed is

AtomFeed/FeedEntry [ Types ]

[ Top ] [ AtomFeed ] [ Types ]

FUNCTION

 Data structure for Atom entries

SOURCE

   type FeedEntry is record
      Id: Unbounded_String;
      EntryTitle: Unbounded_String;
      Updated: Time;
      AuthorName: Unbounded_String;
      AuthorEmail: Unbounded_String;
      Summary: Unbounded_String;
      Content: Unbounded_String;
   end record;

PARAMETERS

 Id          - Url of entry
 EntryTitle  - Title of entry
 Updated     - Update time of entry
 AuthorName  - Name of author of entry
 AuthorEmail - Email of author of entry
 Summary     - Short summary of entry
 Content     - Content of entry

AtomFeed/FeedEntry_Container [ Types ]

[ Top ] [ AtomFeed ] [ Types ]

FUNCTION

 Used to store Atom feed entries

SOURCE

   package FeedEntry_Container is new Vectors(Positive, FeedEntry);

AtomFeed/AddPageToFeed [ Subprograms ]

[ Top ] [ AtomFeed ] [ Subprograms ]

FUNCTION

 Add page with full path FileName and it extracted Atom entries Entries to the site Atom feed

SOURCE

   procedure AddPageToFeed
     (FileName: String; Entries: in out FeedEntry_Container.Vector);

PARAMETERS

 FileName - File name of the page to add
 Entries  - List of Atom feed entries

AtomFeed/SaveAtomFeed [ Subprograms ]

[ Top ] [ AtomFeed ] [ Subprograms ]

FUNCTION

 Save Atom feed to file

SOURCE

   procedure SaveAtomFeed;

AtomFeed/StartAtomFeed [ Subprograms ]

[ Top ] [ AtomFeed ] [ Subprograms ]

FUNCTION

 Load existing Atom feed for the site

SOURCE

   procedure StartAtomFeed;

AtomFeed/To_HTTP_Date [ Subprograms ]

[ Top ] [ AtomFeed ] [ Subprograms ]

FUNCTION

 Convert Ada Time to HTTP date format

SOURCE

   function To_HTTP_Date(Date: Time) return String;

PARAMETERS

 Date - Ada Time to convert

RESULT

 Converted Ada Time to HTTP date format

AtomFeed/To_Time [ Subprograms ]

[ Top ] [ AtomFeed ] [ Subprograms ]

FUNCTION

 Convert HTTP date to Ada format

SOURCE

   function To_Time(Date: String) return Time;

PARAMETERS

 Date - HTTP date to convert

RESULT

 Converted HTTP date to Ada Time