Author Topic: Python script to get/see verse for Today ...  (Read 1284 times)

Offline David

  • Hero Member
  • *****
  • Posts: 647
    • View Profile
Python script to get/see verse for Today ...
« on: February 23, 2024, 12:16:21 AM »
Here is Python script that needs the .dat file verses found on the next page ...

Code: [Select]
# verseForToday.py
# this version: 20240222

from sys import exit
from datetime import datetime

# get the 1st 10 chars after datetime object converted to type str
todayStr = str( datetime.now() )[:10]

monthStr = todayStr[5:7] # get new substr taking chars from index 5 to 6 inclusive
dayStr = todayStr[8:] # get new substr taking chars from index 8 to end

dayNumStr = monthStr + dayStr
print(f"Today is: {dayNumStr} or {todayStr}")
print()

verses = [] # construct an empty Python list container to hold lines of text
try:
    with open("verses.dat") as f:
        line = f.readline()
        while line:
            if line[:4] == dayNumStr:
                print( line.rstrip() )
                line = line[4:]
                verses.append( line.strip() )
            line = f.readline()
except:
    print("There was some problem getting verses from file: verses.dat ...")
    input("Press Enter key to exit ... ")
    exit()


print()   
for line in verses:
    print(' '*9 + line)

input("\nPress ENTER key to exit ... ")
« Last Edit: February 23, 2024, 04:14:44 AM by David »

Offline David

  • Hero Member
  • *****
  • Posts: 647
    • View Profile
Re: Python script to get/see verse for Today ...
« Reply #1 on: February 23, 2024, 12:21:12 AM »
Copy and past this text into a file you name as

verses.dat

and then place that file into the same folder as the Python script above ...

OOPs ... file is too BIG to fit it all in this page ... please see this link to get/copy file ...

https://docs.google.com/document/d/e/2PACX-1vRvslGtw518GLWNyAV7LX-ovS1DGiyI9xDyN9Jo1HAB1hwwi1MjXERNQcl14UVZkFX3EGzltnvpC8II/pub

verses.dat (to end of Feb here so can see file structure ...)

Code: [Select]
0101     "The LORD shall preserve thy going out and thy coming
0101      in from this time forth, and even for evermore."
0101                                    Psalms 121:8
0102     "Verily, verily, I say unto you, He that heareth my
0102      word, and believeth on him that sent me, hath
0102      everlasting life, and shall not come into
0102      condemnation; but is passed from death unto life."
0102                   John 5:24
0103     "I love them that love me; and those that seek me early
0103      shall find me."                Proverbs 8:17
0104     "But because of his great love for us, God, who is rich
0104      in mercy, made us alive with Christ even when we were
0104      dead in transgressions-it is by grace you have been
0104      saved."        Ephesians 2:4,5
0105     "And thou shalt love the LORD thy God with all thine
0105      heart, and with all thy soul, and with all thy might."
0105                 Deuteronomy 6:5
0106     "Thou shalt not avenge, nor bear any grudge against the
0106      children of thy people, but thou shalt love thy
0106      neighbor as thyself. I am the LORD."
0106                                 Leviticus 19:18
0107     "Blessed are the pure in heart, for they shall see
0107      God."                    Matthew 5:8
0108     "Refrain from anger, and turn from wrath; do not fret-
0108      it leads only to evil."            Psalms 37:8
0109     "And not only so, but we glory in tribulations also;
0109      knowing that tribulation worketh patience; And
0109      patience, experience; and experience, hope; And hope
0109      maketh not ashamed; because the love of God is shed
0109      abroad in our hearts by the Holy Ghost which is given
0109      unto us."              Romans 5:3-5
0110     "Be patient therefore, brethren, unto the coming of the
0110      Lord...Be patient; strengthen your hearts, for
0110      the coming of the Lord draweth nigh."
0110                                   James 5:7,8
0111     "Enter into his gates with thanksgiving, and into his
0111      courts with praise. Be thankful unto him, and bless
0111      his name."           Psalms 100:4
0112     "For the LORD is good; his mercy is everlasting; and
0112      his truth endureth to all generations."
0112                                     Psalms 100:5
0113     "Wherefore let him that thinketh he standeth take heed
0113      lest he fall."            I Corinthians 10:12
0114     "If we confess our sins, he is faithful and just to
0114      forgive us our sins, and to cleanse us from all
0114      unrighteousness."          I John 1:9
0115     "For I know that my redeemer liveth, and that he shall
0115      stand at the latter day upon the earth"
0115                                       Job 19:25
0116     "Jesus said unto her, I am the resurrection, and the
0116      life; he that believeth in me, though he were dead,
0116      yet shall he live"                John 11:25
0117     "And, behold, I come quickly; and my reward is with me,
0117      to give every man according as his work shall be."
0117                               Revelation 22:12
0118     "For the eyes of the LORD run to and fro throughout the
0118      whole earth, to show himself strong in the behalf of
0118      them whose heart is perfect toward him..."
0118                                   II Chronicles 16:9
0119     "The LORD is my strength and song, and he is become my
0119      salvation; he is my God, and I will prepare him an
0119      habitation; my father's God, and I will exalt him."
0119                       Exodus 15:2
0120     "Neither is there salvation in any other; for there is
0120      none other name under heaven given among men, whereby
0120      we must be saved."               Acts 4:12
0121     "For we wrestle not against flesh and blood, but
0121      against principalities, against powers, against the
0121      rulers of the darkness of this world, against
0121      spiritual wickedness in high places. Wherefore take
0121      unto you the whole armor of God, that ye may be able
0121      to withstand in the evil day, and having done all, to
0121      stand."              Ephesians 6:12,13
0122     "He that giveth unto the poor shall not lack..."
0122                         Proverbs 28:27
0123     "Look not every man on his own interests, but every man
0123      also on the things of others. Let this mind be in you,
0123      which was also in Christ Jesus"
0123                                Philippians 2:4,5
0124     "If anyone has material possessions and sees his
0124      brother in need but has no pity on him, how can the
0124      love of God be in him?"
0124                                    I John 3:17
0125     "My little children, let us not love in word, neither
0125      in tongue; but in deed and in truth."
0125                                            I John 3:18
0126     "Wash me thoroughly from mine iniquity, and cleanse me
0126      from my sin. For I acknowledge my transgressions; and
0126      my sin is ever before me. Against thee, thee only,
0126      have I sinned, and done this evil in thy sight..."
0126                                   Psalms 51:2-4
0127     "Come now, and let us reason together, saith the LORD;
0127      though your sins be as scarlet, they shall be as white
0127      as snow; though they be red like crimson, they shall
0127      be as wool."                     Isaiah 1:18
0128     "Many are the afflictions of the righteous; but the
0128      LORD delivereth him out of them all."
0128                                        Psalm 34:19
0129     "My son, if sinners entice thee, consent thou not."
0129                            Proverbs 1:10
0130     "The Lord knoweth how to deliver the godly out of
0130      temptations, and to reserve the unjust unto the day of
0130      judgment to be punished;"            II Peter 2:9
0131     "Jesus saith unto him, I am the way, the truth, and the
0131      life; no man cometh unto the Father, but by me."
0131                                John 14:6
0201     "And be not conformed to this world; but be ye
0201      transformed by the renewing of your mind, that ye may
0201      prove what is that good, and acceptable, and perfect,
0201      will of God."             Romans 12:2
0202     "Love not the world, neither the things that are in the
0202      world. If any man love the world, the love of the
0202      Father is not in him...And the world passeth away, and
0202      the lust thereof; but he that doeth the will of God
0202      abideth for ever."             I John 2:15,17
0203     "O come, let us worship and bow down; let us kneel
0203      before the LORD our maker."            Psalms 95:6
0204     "That at the name of Jesus every knee should bow, of
0204      things in heaven, and things in earth, and things
0204      under the earth; And that every tongue should confess
0204      that Jesus Christ is Lord, to the glory of God the
0204      Father."              Philippians 2:10,11
0205     "Lift up your heads, O ye gates; and be ye lift up, ye
0205      everlasting doors; and the King of glory shall come
0205      in. Who is this King of glory? The LORD strong and
0205      mighty, the LORD mighty in battle."
0205                                   Psalms 24:7,8
0206     "He hath not dealt with us after our sins; nor rewarded
0206      us according to our iniquities. For as the heaven is
0206      high above the earth, so great is his mercy toward
0206      them that fear him. As far as the east is from the
0206      west, so far hath he removed our transgressions from
0206      us."                  Psalms 103:10-12
0207     "But the LORD is in his holy temple; let all the earth
0207      keep silence before him."           Habakkuk 2:20
0208     "The heavens declare the glory of God; and the
0208      firmament showeth his handiwork."          Psalms 19:1
0209     "Let the words of my mouth, and the meditation of my
0209      heart, be acceptable in thy sight, O LORD, my
0209      strength, and my redeemer."          Psalms 19:14
0210     "I was glad when they said unto me, Let us go into the
0210      house of the LORD."          Psalms 122:1
0211     "Make a joyful noise unto the LORD, all ye lands.
0211      Serve the LORD with gladness; come before his presence
0211      with singing. Know ye that the LORD he is God; it is
0211      he that hath made us, and not we ourselves; we are his
0211      people, and the sheep of his pasture."
0211                                        Psalms 100:1-3
0212     "When I consider thy heavens, the work of thy fingers,
0212      the moon and the stars, which thou hast ordained; What
0212      is man, that thou art mindful of him? and the son of
0212      man, that thou visitest him? For thou hast made him a
0212      little lower than the angels, and hast crowned him
0212      with glory and honor."            Psalms 8:3-5
0213     "The earth is the LORD'S, and the fullness thereof; the
0213      world, and they that dwell therein."
0213                                   Psalms 24:1
0214     "God be merciful unto us, and bless us; and cause his
0214      face to shine upon us."          Psalms 67:1
0215     "For by him were all things created, that are in
0215      heaven, and that are in earth, visible and invisible,
0215      whether they be thrones, or dominions, or
0215      principalities, or powers; all things were created by
0215      him, and for him."         Colossians 1:16
0216     "But as many as received him, to them gave he power to
0216      become the sons of God, even to them that believe on
0216      his name"        John 1:12
0217     "Surely he took up our infirmities and carried our
0217      sorrows; yet we considered him stricken by God,
0217      smitten by him, and afflicted. But he was pierced for
0217      our transgressions, he was crushed for our iniquities;
0217      the punishment that brought us peace was upon him, and
0217      by his wounds we are healed."        Isaiah 53:4,5
0218     "All we like sheep have gone astray; we have turned
0218      every one to his own way; and the LORD hath laid on
0218      him the iniquity of us all."         Isaiah 53:6
0219     "And the angel answered and said unto the women, Fear
0219      ye not; for I know that ye seek Jesus, who was
0219      crucified. He is not here; for he is risen, as he
0219      said...Therefore be ye also ready; for in such an hour
0219      as ye think not the Son of man cometh."
0219                              Matthew 28:5,6; 24:44
0220     "For the Lord himself shall descend from heaven with a
0220      shout, with the voice of the archangel, and with the
0220      trump of God; and the dead in Christ shall rise first;
0220      Then we which are alive and remain shall be caught up
0220      together with them in the clouds, to meet the Lord in
0220      the air; and so shall we ever be with the Lord."
0220                          I Thessalonians 4:16,17
0221     "My sheep hear my voice, and I know them, and they
0221      follow me; And I give unto them eternal life; and they
0221      shall never perish, neither shall any man pluck them
0221      out of my hand."          John 10:27,28
0222     " The LORD bless thee, and keep thee; The LORD make his
0222      face shine upon thee, and be gracious unto thee; The
0222      LORD lift up his countenance upon thee, and give thee
0222      peace."              Numbers 6:24-26
0223     "All scripture is given by inspiration of God, and is
0223      profitable for doctrine, for reproof, for correction,
0223      for instruction in righteousness; That the man of God
0223      may be perfect, thoroughly furnished unto all good
0223      works."         II Timothy 3:16,17
0224     "Thy word is a lamp unto my feet, and a light unto my
0224      path."           Psalms 119:105
0225     "Peace I leave with you, my peace I give unto you; not
0225      as the world giveth, give I unto you. Let not your
0225      heart be troubled, neither let it be afraid."
0225                                John 14:27
0226     "But God commendeth his love toward us, in that, while
0226      we were yet sinners, Christ died for us."
0226                                   Romans 5:8
0227     "If we confess our sins, he is faithful and just to
0227      forgive us our sins, and to cleanse us from all
0227      unrighteousness."       I John 1:9
0228     "These things have I written unto you that believe on
0228      the name of the Son of God; that ye may know that ye
0228      have eternal life, and that ye may believe on the name
0228      of the Son of God."        I John 5:13
0229     "Seek ye the LORD while he may be found, call ye upon
0229      him while he is near; Let the wicked forsake his way,
0229      and the unrighteous man his thoughts; and let him
0229      return unto the LORD, and he will have mercy upon him;
0229      and to our God, for he will abundantly pardon."
0229                                Isaiah 55:6,7
« Last Edit: February 27, 2024, 10:42:26 PM by David »