Ignore:
Timestamp:
2024-02-26T00:44:26+13:00 (4 months ago)
Author:
jc550
Message:

add comments adding context to functions that require it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/metadata-encoding/py/using-mongodb/mongoAnalysis.py

    r38773 r38791  
    11# function to display cool(?) statistics about the subtitle
     2
    23import datetime
    34from dateutil.relativedelta import relativedelta
     
    1011
    1112def main():
     13    # Connect to database
    1214    mClient = MongoClient("mongodb://localhost:27017/")
    1315    mDatabase = mClient["test"]
    1416    mCollection = mDatabase["crossref"]
    1517
    16     getMinDateQuery = "asdas"
    17 
     18    # Get minimum date
    1819    minimumDateQuery = mCollection.find().sort("dateCreated").limit(1)
     20    # Get documents sorted by date
    1921    sortedCollectionQuery = mCollection.find().sort("dateCreated")
     22    # And the count
    2023    countQuery = mCollection.estimated_document_count()
    2124
     
    5356                #increase currentdate by a month
    5457
     58        # currently unfinished. Need to finish the statistics insertion part of the method, and actually do something with that data.
     59
    5560main()
Note: See TracChangeset for help on using the changeset viewer.