This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
count_index.py
executable file
·34 lines (30 loc) · 1.92 KB
/
count_index.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
# -*- coding: utf8 -*-
# Copyright (c) 2020 Roberto Treviño Cervantes
#########################################################################
# #
# This file is part of FUTURE (Powered by Monad). #
# #
# FUTURE is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# FUTURE is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with FUTURE. If not, see <https://www.gnu.org/licenses/>. #
# #
#########################################################################
import lmdb
URLDBIndex = lmdb.open("./future_urls", readonly=True)
imageDBIndex = lmdb.open("./future_images", readonly=True)
# analyticsDBIndex = lmdb.open("./future_analytics", readonly=True)
with URLDBIndex.begin() as urlDBTransaction, imageDBIndex.begin(
) as imageDBTransaction: #, analyticsDBIndex.begin() as analyticsDBTransaction:
print("Number of URL's: ", urlDBTransaction.stat()["entries"])
print("Number of images: ", imageDBTransaction.stat()["entries"])
# print(analyticsDBTransaction.stat()["entries"])