TABLE OF CONTENTS
- 1. Yass/AtomFeed
- 1.1. AtomFeed/AtomFeed.Feed_Entry
- 1.2. AtomFeed/AtomFeed.FeedEntry_Container
- 1.3. AtomFeed/AtomFeed.Empty_Feed_Entry
- 1.4. AtomFeed/AtomFeed.Entries_List
- 1.5. AtomFeed/AtomFeed.Feed_File_Name
- 1.6. AtomFeed/AtomFeed.Add_Page_To_Feed
- 1.7. AtomFeed/AtomFeed.Get_Entries_List
- 1.8. AtomFeed/AtomFeed.Get_Feed_File_Name
- 1.9. AtomFeed/AtomFeed.Save_Atom_Feed
- 1.10. AtomFeed/AtomFeed.Set_Entries_List
- 1.11. AtomFeed/AtomFeed.Start_Atom_Feed
- 1.12. AtomFeed/AtomFeed.To_HTTP_Date
- 1.13. AtomFeed/AtomFeed.To_Time
Yass/AtomFeed [ Packages ]
FUNCTION
Provide code to create Atom feed
SOURCE
package AtomFeed is
AtomFeed/AtomFeed.Feed_Entry [ Types ]
[ Top ] [ AtomFeed ] [ Types ]
FUNCTION
Data structure for Atom entries
SOURCE
type Feed_Entry is record Id: Unbounded_String; Entry_Title: Unbounded_String; Updated: Time := Clock; Author_Name: Unbounded_String; Author_Email: Unbounded_String; Summary: Unbounded_String; Content: Unbounded_String; end record;
PARAMETERS
Id - Url of entry Entry_Title - Title of entry Updated - Update time of entry Author_Name - Name of author of entry Author_Email - Email of author of entry Summary - Short summary of entry Content - Content of entry
AtomFeed/AtomFeed.FeedEntry_Container [ Types ]
[ Top ] [ AtomFeed ] [ Types ]
FUNCTION
Used to store Atom feed entries
SOURCE
package FeedEntry_Container is new Vectors (Index_Type => Positive, Element_Type => Feed_Entry);
AtomFeed/AtomFeed.Empty_Feed_Entry [ Constants ]
[ Top ] [ AtomFeed ] [ Constants ]
FUNCTION
Empty Atom feed entry
SOURCE
Empty_Feed_Entry: constant Feed_Entry := (others => <>);
AtomFeed/AtomFeed.Add_Page_To_Feed [ Subprograms ]
[ Top ] [ AtomFeed ] [ Subprograms ]
FUNCTION
Add page with full path File_Name and it extracted Atom entries Entries to the site Atom feed
SOURCE
procedure Add_Page_To_Feed (File_Name: String; Entries: in out FeedEntry_Container.Vector) with Pre => File_Name'Length > 0, Test_Case => (Name => "Test_Add_Page_To_Feed", Mode => Nominal);
PARAMETERS
File_Name - File name of the page to add Entries - List of Atom feed entries
AtomFeed/AtomFeed.Save_Atom_Feed [ Subprograms ]
[ Top ] [ AtomFeed ] [ Subprograms ]
FUNCTION
Save Atom feed to file
SOURCE
procedure Save_Atom_Feed with Test_Case => (Name => "Test_Save_Atom_Feed", Mode => Robustness);
AtomFeed/AtomFeed.Start_Atom_Feed [ Subprograms ]
[ Top ] [ AtomFeed ] [ Subprograms ]
FUNCTION
Load existing Atom feed for the site
SOURCE
procedure Start_Atom_Feed with Test_Case => (Name => "Test_Start_Atom_Feed", Mode => Robustness);
AtomFeed/AtomFeed.To_HTTP_Date [ Subprograms ]
[ Top ] [ AtomFeed ] [ Subprograms ]
FUNCTION
Convert Ada Time to HTTP date format
SOURCE
function To_HTTP_Date span class="sign">## rule line off NAMING_CONVENTION (Date: Time) return String with Post => To_HTTP_Date'Result'Length > 0, Test_Case => (Name => "Test_To_HTTP_Date", Mode => Nominal);
PARAMETERS
Date - Ada Time to convert
RESULT
Converted Ada Time to HTTP date format
AtomFeed/AtomFeed.To_Time [ Subprograms ]
[ Top ] [ AtomFeed ] [ Subprograms ]
FUNCTION
Convert HTTP date to Ada format
SOURCE
function To_Time(Date: String) return Time with Pre => Date'Length > 0, Test_Case => (Name => "Test_To_Date", Mode => Nominal);
PARAMETERS
Date - HTTP date to convert
RESULT
Converted HTTP date to Ada Time