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.
HISTORYlist of executed commands in the format[[<time1>, "<command1>"], ..., [<timeN>, "<commandN>"]](UNIX time in seconds)COOKIEScookies for the scraper, stored in JSON formatFILESFOLDERlocation of downloaded submission filesVERSIONdatabase 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:
USERNAMEThe URL username of the user (no underscores or spaces)FOLDERSthe folders downloaded for that specific user
Submissions
The submissions table contains the metadata of the submissions downloaded by the program and information on their files
IDthe id of the submissionAUTHORthe username of the author (uploader) in full formatTITLEDATEupload date in the format YYYY-MM-DDDESCRIPTIONdescription in html formatTAGSkeywords sorted alphanumerically and comma-separatedCATEGORYSPECIESGENDERRATINGFILELINKthe remote URL of the submission fileFILEEXTthe extensions of the downloaded file. Can be empty if the file contained errors and could not be recognised upon downloadFILESAVED1 if the file was successfully downloaded and saved, 0 if there was an error during downloadFAVORITEa comma-separate list of users that have "faved" the submissionMENTIONSa comma-separate list of users that are mentioned in the submission description as linksFOLDERthe folder of the submission (galleryorscraps)USERUPDATEwhether the submission was added as a user update or favorite/single entry
Journals
The journals table contains the metadata of the journals downloaded by the program.
IDthe id of the journalAUTHORthe username of the author (uploader) in full formatTITLEDATEupload date in the format YYYY-MM-DDCONTENTcontent in html formatUSERUPDATEwhether the journal was added as a user update or favorite/single entry
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file falocalrepo-database-4.6.0.tar.gz.
File metadata
- Download URL: falocalrepo-database-4.6.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Darwin/20.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b4149615c018b56f7b9ff52d5d31f8a2066d1a6df24cbf102ee436e83b0c527
|
|
| MD5 |
7ec385674accda6f70e41e532167be42
|
|
| BLAKE2b-256 |
ec4e1372f785234d65777f80a37ec06238525dcdc42903c8376343e901b0cace
|
File details
Details for the file falocalrepo_database-4.6.0-py3-none-any.whl.
File metadata
- Download URL: falocalrepo_database-4.6.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.2 Darwin/20.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19e93162d5adf7d680f5943a5eaf0c6235668a1bc921a8501de30a315a085f17
|
|
| MD5 |
9b73f0fc699f1a321e055fdd1cb35f87
|
|
| BLAKE2b-256 |
e3b82bf254d2f0d668c67394561457b63a2ee6f850190eb7c229be915be21151
|