Commit Graph

18 Commits

Author SHA1 Message Date
84c886693f Update database row factory to produce a dict of columns
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-07-25 16:42:24 -07:00
e51dd85d54 Add hashbang, script description, and useful error message to convert_db script
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-07-25 16:10:09 -07:00
532393c2c7 Add db.commit() call to convert_bans.py script
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-07-25 16:01:35 -07:00
47bb480b74 Add status message to convert_db.py
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-07-25 15:56:37 -07:00
7b6be3f2a0 Fix convert_db script
Database conversion was not taking the "trip" field into account. Also,
remove debug message that I accidentally had left in there.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-07-25 15:50:00 -07:00
e85e3a03a0 Update database format
The old database format would keep the post data in a JSON string.
Now, post data is broken out into individual columns for searching more
easily.

Additionally, a convert script has been provided.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-07-25 15:45:50 -07:00
9353bc3ac9 Move httpx to aiohttp, add logging instead of printing
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-06-21 00:52:59 -07:00
8d79599a1f Add arg parsing and subcommands
* pull - will download thumbnails and update the database
* serve - (in the future) will run an HTTP frontend server to display
  the pulled data

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-06-21 00:07:38 -07:00
54a0488e3c Split up logic into common files
All functions were previously in __main__.py but now they've been split
out to separate modules for better reuse.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-06-20 23:22:56 -07:00
99624c17a5 Add pylint and bs4-types
* pylint for helping to clean up simple issues
* bs4-types for beautifulsoup4 mypy types

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-06-20 23:21:58 -07:00
ac8812fc30 Update required python version 3.10 -> 3.9
This is how it was in the Pipenv file, and I messed that up

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-06-20 21:37:06 -07:00
f7aed83fe6 Add AGPL v3.0 license text
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-06-20 21:25:53 -07:00
70416f0751 Move from pipenv -> poetry
I like poetry's tooling better than pipenv. Simple as

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-06-20 21:22:13 -07:00
8027c67bf2 Remove file that accidentally got created and added to the repo
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-02-20 11:22:15 -08:00
02324c78ab Fix minor errors in the new thumbnail stuff was stopping stuff from being inserted
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-02-19 01:09:46 -08:00
26a17f7bbc Add thumbnail downloading
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-02-19 01:03:16 -08:00
478fc187dc Set Python version to 3.9 instead of 3.10
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-02-19 00:24:07 -08:00
803fd6a75b Initial commit
* Bans are logged into the bans.db file
* Cache is created in the bans/ directory

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2023-02-19 00:21:11 -08:00