Skip to main content

Database functionality for falocalrepo.

Project description

FALocalRepo-Database

version_pypi version_gitlab version_python

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.

Note: bar-separated lists are formatted as |item1||item2| to properly isolate all elements

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 format
  • FILESFOLDER location of downloaded submission files
  • VERSION database 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, sorted and bar-separated

Submissions

The submissions table contains the metadata of the submissions downloaded by the program and information on their files

  • ID the id of the submission
  • AUTHOR the username of the author (uploader) in full format
  • TITLE
  • DATE upload date in ISO format YYYY-MM-DDTHH:MM
  • DESCRIPTION description in html format
  • TAGS keywords sorted alphanumerically and bar-separated
  • CATEGORY
  • SPECIES
  • GENDER
  • RATING
  • TYPE image, text, music, or flash
  • FILEURL the remote URL of the submission file
  • FILEEXT the extensions of the downloaded file. Can be empty if the file contained errors and could not be recognised upon download
  • FILESAVED file and thumbnail download status: 00, 01, 10, 11. 1x if the file was downloaded 0x if not, x1 if thumbnail was downloaded, x0 if not
  • FAVORITE a bar-separated list of users that have "faved" the submission
  • MENTIONS a bar-separated list of users that are mentioned in the submission description as links
  • FOLDER the folder of the submission (gallery or scraps)
  • USERUPDATE whether 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.

  • ID the id of the journal
  • AUTHOR the username of the author (uploader) in full format
  • TITLE
  • DATE upload date in ISO format YYYY-MM-DDTHH:MM
  • CONTENT content in html format
  • MENTIONS a bar-separated list of users that are mentioned in the journal content as links
  • USERUPDATE whether the journal was added as a user update or 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

falocalrepo-database-4.19.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

falocalrepo_database-4.19.0-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file falocalrepo-database-4.19.0.tar.gz.

File metadata

  • Download URL: falocalrepo-database-4.19.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Darwin/20.4.0

File hashes

Hashes for falocalrepo-database-4.19.0.tar.gz
Algorithm Hash digest
SHA256 9a8d8f298a29a6ab49b19fb010f3024c0c29a251ca46d1eeb2a58fb60347f500
MD5 e2df0d3098a8a6c934c3847ddfd57ccc
BLAKE2b-256 68fed4e1ea9f7f7c0b4282b7af994bb158717952ca304648be6d73d3a9838816

See more details on using hashes here.

File details

Details for the file falocalrepo_database-4.19.0-py3-none-any.whl.

File metadata

File hashes

Hashes for falocalrepo_database-4.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d10e91bfc21207bb0799281ad64bd7acfd3391dc4a67e0d3a97b87acaed57fc8
MD5 a1d699720a9791e76908b53828e24bd7
BLAKE2b-256 e6c91cf0cd8df2d69fbbb9a2f83c16a3f035c1b424e1b409da7700582ba984cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page