Showing posts with label religion. Show all posts
Showing posts with label religion. Show all posts

Wednesday, June 20, 2012

Calibre Recipes for 每日日課 & 每日聖言

I have written two Calibre recipes for downloading daily Mass readings and breviary from the HK Catholic Diocesan Liturgy Commission webpage.  They can be useful for reading offline on a e-reader like Kindle.  To use them, copy each recipe to a text file, and then "load recipe from file" in Calibre.

They download content for 60 days starting from today.  So one may ask Calibre to download these sources every 30 or 60 days.

Writing recipes are relatively easy tasks.  The difficult task is to read them daily!

每日聖言

------------------------------------- recipe starts below ------------------------------------
from datetime import date, timedelta


class MeiRiShengYan(AutomaticNewsRecipe):
    title          = u'\u6bcf\u65e5\u8056\u8a00'
    oldest_article = 35
    max_articles_per_feed = 100
    auto_cleanup = True


    no_stylesheets = True
    encoding = 'big5-hkscs'


    cover_url = 'http://liturgy.catholic.org.hk/dlcgif.gif'


    def parse_index(self):
        today = date.today()
        current = today
        feeds = []
        articles = []
        while (current - today < timedelta(60)):
            url = 'http://catholic-dlc.org.hk/mk' + current.strftime('%y%m%d') + '.htm'
            title = current.isoformat()
            articles.append({'title':title, 'url':url,
                             'description':None, 'date':current})
            current += timedelta(1)


        feeds.append((u'\u6bcf\u65e5\u8056\u8a00', articles))
        return feeds


    def populate_article_metadata(self, article, soup, first):
        title = soup.find('p', attrs={'class':['MsoNormal','MsoPlainText'], 'align':'center'})
        if title:
            article.summary = self.tag_to_string(title)
            article.text_summary = article.summary
------------------------------------- recipe ends above ------------------------------------



每日日課

------------------------------------- recipe starts below ------------------------------------
from datetime import date, timedelta


class MeiRiRiKe(AutomaticNewsRecipe):
    title          = '每日日課'
    oldest_article = 35
    max_articles_per_feed = 300
    auto_cleanup = True


    feeds          = []


    no_stylesheets = True
    encoding = 'big5-hkscs'


    cover_url = 'http://liturgy.catholic.org.hk/dlcgif.gif'
    map = {'LH1': '晨', 'LH2': '日', 'LH3': '晚', 'LH4': '誦', 'LH5': '夜'}
    pages = list(map.keys())
    pages.sort()
        
    def parse_index(self):


        today = date.today()
        current = today
        feeds = []
        articles = []
        while (current - today < timedelta(60)):
        for page in self.pages:
        url = "http://catholic-dlc.org.hk/%s_%s.htm" % (page,  current.strftime('%Y%m%d')) 
        title = current.isoformat() + self.map[page]
        articles.append({'title':title, 'url':url, 'description':None, 'date':current})
        current += timedelta(1)
        feeds.append(('每日日課', articles))
        return feeds


    def populate_article_metadata(self, article, soup, first):
        title = soup.find('p', attrs={'class':['MsoNormal','MsoPlainText'], 'align':'center'})
        if title:
            article.summary = self.tag_to_string(title)
            article.text_summary = article.summary
------------------------------------- recipe ends above ------------------------------------

Sunday, February 15, 2009

Proof by contradiction

今朝寫完上一篇文章後才想起,要証明一件事的不存在還有一個方法,就是反証法,即是一件事的存在必引起矛盾,所以這件事不可能存在。而通常用來「証明」天主不存在的論據便是:

全能的天主能否製造自己不能舉起的石頭呢?

對於這樣的証明,我覺得不太合理。為什麼不合理,我不懂得怎樣去明確地指出。但用同一理據,我也可以問,全能的天主能否不是天主呢。我想問題在於,我們說天主是全能的,但這個「全能」的概念是什麼呢?這能力是不是包括一些矛盾(即邏輯上不可能)的事呢?要是天主真的不能做一些邏輯上不可能的事,那麼我們是否就真的否定祂的存在,和祂對我們的愛呢?

另一方面,全能的「X」能否同時不是全能呢?(即一樣未知的X)似乎,只是人未能好好地定義「全能」這概念。

Saturday, February 14, 2009

2.15「維護公民社會價值,反對宗教右翼霸權」大遊行

在網上看到這個遊行的邀請。感覺到一股反宗教的情緒。

近來想到一點,未必太相關的事:

有些人會覺得宗教是迷信。甚麼是迷信?可能說是信一些不能証實的事。但要是這樣無神論者也是迷信。

很多時要證實有比証實冇更難。例如早陣子警方在將軍澳垃圾堆填區要找一個嬰孩的屍體。要証實這個屍體的存在,只需找到這個屍體(或者也需要証實這屍體就是那嬰孩)。但要証實不存在,則要找遍整個堆填區,甚至要証明已經是用盡任何有效方法,找尋每一個角落。所以無神論者譏笑有宗教的人迷信,只是顯示出這些人的無知,即不知道自己也是迷信於無神論而去笑別人。

當然迷信,也可以說為何信神是在某一種形態,有某一種特徵。這確實比較難說。因為每個人的經驗也不同,對宗教經典書籍的理解也不同。但我想指出的是,無神論者並不一定比有神論者理智,因為兩者也是在一個難以証實的基礎上比較。

笛卡兒懷疑所有的一切也可以是假,未必藉得後人把他記載於歷史中,但他的「我思,故我在」卻未必有很多人能想得出。

否定一切宗教的絕對可信性很易,但卻不值得任何人驕傲。

倒不如想想某一宗教是否值得去信。

Monday, April 14, 2008

信主的回報

今天和朋友分享信仰,說到我投資的回報是天主賜與的。

然而很多人不信主的人,他們的投資回報比我多很多倍。那麼,是否我的主很不濟,讓我的回報很少呢?

我想,不是因為我信主,主才給我這些回報。同樣,不是因為他們不信主,他們的回報一定不是來自天主。我信一切美善也源於天主。一些同樣美善的事(不一定指投資回報),在我看來是來自天主,在不信的人來看不是來自天主,差別只是我們是否認識這美善的來源。就如我們留學外國時收到遠方老爸寄來的禮物,如果我們不認識這父親,我們只會以為是郵差送來一份禮物。但如果我們認知這父親,我們便會知道這禮物是由父親賜予,郵差只是代送的人,我們也會感謝父親的愛。

天上的老爸,我們認識你嗎?我自己不十分認識,但我仍願相信祢,尋找祢。

伯多祿開口對他說:「看,我們捨棄了一切,而跟隨了你。」耶穌回答說:「我實在告訴你們:人為了我,為了福音,而捨棄了房屋、或兄弟、或姊妹、或母親、或父親、或兒女、或田地,沒有不在今時就得百倍的房屋、兄弟、姊妹、母親、兒女、田地──連迫害也在內,並在來世獲得永生的。但有許多在先的,要成為在後的;在後的,要成為在先的。」(瑪10:28-31)