Database functionality for falocalrepo.
Project description
FALocalRepo-Database
Database functionality for falocalrepo.
Usage
Detailed usage and components documentation will be added in a future patch
Tables
To store its information, the database uses four tables: SETTINGS
, USERS
, SUBMISSIONS
and JOURNALS
.
Settings
The settings table contains settings for the program and statistics of the database.
HISTORY
list of executed commands in the format[[<time1>, "<command1>"], ..., [<timeN>, "<commandN>"]]
(UNIX time in seconds)COOKIES
cookies for the scraper, stored in JSON formatFILESFOLDER
location of downloaded submission filesVERSION
database version, this can differ from the program version
Users
The users table contains a list of all the users that have been download with the program, the folders that have been downloaded and the submissions found in each of those.
Each entry contains the following fields:
USERNAME
The URL username of the user (no underscores or spaces)FOLDERS
the folders downloaded for that specific user.GALLERY
SCRAPS
FAVORITES
MENTIONS
this is a legacy entry used by the program up to version 2.11.2 (was namedEXTRAS
)JOURNALS
Submissions
The submissions table contains the metadata of the submissions downloaded by the program and information on their files
ID
the id of the submissionAUTHOR
the username of the author (uploader) in full formatTITLE
DATE
upload date in the format YYYY-MM-DDDESCRIPTION
description in html formatTAGS
keywords sorted alphanumerically and comma-separatedCATEGORY
SPECIES
GENDER
RATING
FILELINK
the remote URL of the submission fileFILEEXT
the extensions of the downloaded file. Can be empty if the file contained errors and could not be recognised upon downloadFILESAVED
1 if the file was successfully downloaded and saved, 0 if there was an error during download
Journals
The journals table contains the metadata of the journals downloaded by the program.
ID
the id of the journalAUTHOR
the username of the author (uploader) in full formatTITLE
DATE
upload date in the format YYYY-MM-DDCONTENT
content in html format
Submission Files
The save_submission
functions saves the submission metadata in the database and stores the files.
Submission files are saved in a tiered tree structure based on their submission ID. ID's are zero-padded to 10 digits and then broken up in 5 segments of 2 digits; each of this segments represents a folder tha will be created in the tree.
For example, a submission 1457893
will be padded to 0001457893
and divided into 00
, 01
, 45
, 78
, 93
. The submission file will then be saved as 00/01/45/78/93/submission.file
with the correct extension extracted from the file itself - FurAffinity links do not always contain the right extension and often confuse jpg and png.
Upgrading Database
The FADatabase.upgrade
function allows to upgrade the database to the current version.
Note: Versions before 2.7.0 are not supported by falocalrepo-database version 3.0.0 and above. To update from those to the new version use falocalrepo version 2.11.2 to update the database to version 2.7.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for falocalrepo-database-4.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b360f82cecb6a68c7aa366a28726ea8c983e8f3b5aa24895aaa388f3eeae714 |
|
MD5 | 99f0b69906aac09dee01808afc7d7eb0 |
|
BLAKE2b-256 | d2ba21aa959410e83289ff268ac709fc7e42fc91fab6cb802def8e6cf2ca4b6c |
Hashes for falocalrepo_database-4.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f260cf0b782ae7d35e4e02088ed2c345ee607926eeea9ba4b593013aa8d2d56 |
|
MD5 | e58976ec389c4296ed81a9b5f97f60aa |
|
BLAKE2b-256 | c2dcf3c8298472f3960068761348bbe2c27005eb472b066322ee71b088a87a38 |