Beispiel #1
0
        public static Dictionary <string, string> get_Email_Messages_for_Mailing_List_Month(this API_Mailman apiMailman, string listName, string month)
        {
            var emailMessages = new Dictionary <string, string>();
            var tempDir       = apiMailman.TempDir.pathCombine("emails");
            var emailUrls     = apiMailman.get_Email_Messages_Urls_for_Mailing_List_Month(listName, month);

            foreach (var emailUrl in emailUrls)
            {
                emailMessages.Add(emailUrl, apiMailman.getHtml_UsingCache(emailUrl, tempDir));
            }
            return(emailMessages);
        }
Beispiel #2
0
        public static Dictionary <string, string> get_HTML_for_Pages(this API_Mailman apiMailman, string virtualPathTemplate, List <string> pages)
        {
            var adminPagesHtml = new Dictionary <string, string>();
            var pagesDone      = 0;

            foreach (var page in pages)
            {
                var virtualPath = virtualPathTemplate.format(page);
                adminPagesHtml.Add(page, apiMailman.getHtml_UsingCache(virtualPath));
                if (++pagesDone % 25 == 0)
                {
                    "done {0} out of  {1}".debug(pagesDone, pages.size());
                }
            }
            return(adminPagesHtml);
        }
Beispiel #3
0
        public static List <HtmlNode> getNodesFromHtmlPage(this API_Mailman apiMailman, string urlToGet, string filter)
        {
            var htmlDocument = apiMailman.getHtml_UsingCache(urlToGet).htmlDocument();

            return(htmlDocument.select(filter));
        }
Beispiel #4
0
 public static string getHtml_UsingCache(this API_Mailman apiMailman, string virtualPath)
 {
     return(apiMailman.getHtml_UsingCache(virtualPath, apiMailman.TempDir));
 }
Beispiel #5
0
 public static string get_Archive_HTML_for_MailingList_Month(this API_Mailman apiMailman, string listName, string month)
 {
     return(apiMailman.getHtml_UsingCache("pipermail/{0}/{1}/thread.html".format(listName, month)));
 }
Beispiel #6
0
        //emails

        public static string get_Archive_HTML_for_MailingList(this API_Mailman apiMailman, string listName)
        {
            return(apiMailman.getHtml_UsingCache("pipermail/{0}".format(listName)));
        }
Beispiel #7
0
        //admin page

        public static string get_AdminPage_HTML_for_MailingList(this API_Mailman apiMailman, string listName)
        {
            return(apiMailman.getHtml_UsingCache("admin/{0}".format(listName)));
        }