Package: falocalrepo
FALocalRepoPure Python program to download submissions, journals, and user folders from the FurAffinity forum in an easily handled
database.IntroductionThis program was born with the desire to provide a relatively easy-to-use method for FA users to download submissions
that they care about from the forum.The data is stored into a SQLite database, and the submissions files are saved in a tiered tree structure based on their
ID's. Using SQLite instead of a client-server database makes the program extremely portable, only needing a working
Python 3.10+ installation to work, and allows the downloaded data to be moved and backed up by simply moving/copying the
database file and submissions files folder.All download operations are performed through the custom FurAffinity scraping
libraryfaapi. To ensure proper crawling behavior the library strictly follows
FurAffinity'srobots.txtin regard to allowed paths and crawl delay.The database and file-storage functions are handled independently by
thefalocalrepo-databasepackage which performs all transactions,
queries, and file operations.Thefalocalrepo-serverpackage is used to provide the server
functionalities of the program.For an in-depth guide on the features of the program and guides on how to perform the most common operations, visit the
project'sGitHub wiki.ContentsRequirementsInstallation and UpdateCookiesUsageEnvironmental VariablesInitConfigDownloadDatabaseDatabase Query LanguageServerCompletionsUpdatesHelpPawDatabaseUsersSubmissionsJournalsCommentsSettingsHistorySubmission FilesUpgrading DatabaseContributingIssuesAppendixRequirementsPython 3.10 or above is needed to run this program, all other dependencies are handled by pip during installation. For
information on how to install Python on your computer, refer to the official
websitePython.org.The program needs cookies from a logged-in FurAffinity session to download protected pages. Without the cookies the
program can still download publicly available pages, but others will return empty. SeeCookiesfor more
details on which cookies to use.Warning: FurAffinity theme template must be set to "modern". Can be changed
atfuraffinity.net/controls/settings/.Installation and UpdateTo install the program it is sufficient to use Python pip and get the packagefalocalrepo.pipinstallfalocalrepoTo upgrade the program and its dependencies, use pip to upgrade all three components.pipinstall--upgradefalocalrepofaapifalocalrepo-databasefalocalrepo-serverTo check for updates use theupdatescommand. A message will appear if there is an update available for
any component.Note: make sure that pip points to a Python 3.10 installation; you can check if it is correct usingpip --version.Installation From SourceTo install from source, clone the repository, then usingpoetryrunpoetry installandpoetry build. After the wheel has been built, you can install it using
pippip install dist/*.whl.CookiesThe scraping library used by this program needs two specific cookies from a logged-in FurAffinity session. These are
cookieaand cookieb. The cookies' values usually take the form of hexadecimal strings
like356f5962-5a60-0922-1c11-65003b703038.The easiest way to obtain these cookies is by using a browser extension to extract them and then search foraandb.Alternatively, the storage inspection tool of a desktop browser can also be used. For example on Mozilla's Firefox this
can be opened with ⇧F9, on Safari with ⌥⌘I, etc.To set the cookies use theconfig cookiescommand. SeeConfigfor more details.UsageHow to Read Usage Instructionscommanda static command keyword{arg1|arg2}mutually exclusive arguments, only use one<arg><param><value>an argument, parameter, value, etc. that must be provided to a command--option <value>an option argument with a static key and a value[<arg>]an optional argument that can be omittedTo run the program, simply callfalocalrepoin your shell after installation.Running without arguments will prompt a help message with all the available options and commands.The usage pattern for the program is as follows:falocalrepo [OPTIONS] COMMAND [ARGS]...Available options are:--versionShow version and exit.--versionsShow components' versions and exit.The following global options are available for all commands:--databaseSpecify a database different from the default (FA.db in the current working directory). Overrides
theFALOCALREPO_DATABASEenvironment variable (seeEnvironmental Variables).--color / --no-colorToggle ANSI colors.-h, --helpShow help message and exit.Available commands are:initInitialise the database.configChange settings.downloadDownload resources.databaseOperate on the database.serverStart local server to browse database.completionsGenerate tab-completion scripts.updatesCheck for updates to components.helpShow the help for a command.pawPrint the paw.Note:only one connection to a database is allowed at any given time, if the database is opened in other processes,
the program will close with an error.Note: the program will not operate if the version of the database does not match the version of
thefalocalrepo-databasemodule. Onlydatabase infoanddatabase upgradecommands can be run if the database is
not up-to-date.When the database is first initialised, it sets the submissions files folder toFA.files(relative to the database
location). This value can be changed using theconfigcommand.Cookies need to be set manually with the config command before the program will be able to access protected pages.Environmental Variablesfalocalreposupports the following environmental variables:FALOCALREPO_CRAWL_DELAYsets a different crawl delay for thedownloadoperations.Note: the crawl delay can only be higher or equal to the one in FurFALOCALREPO_FA_ROOTsets a different root for Fur Affinity pages (default ishttps://furaffinity.net).
Affinity'srobots.txt, lower values will cause an error.FALOCALREPO_DATABASEsets a path for the database rather than using the current folder.FALOCALREPO_MULTI_CONNECTIONallow operating on the database even if it is already opened in other processes.Warning: using this option may cause the database to become corrupt and irreparable.FALOCALREPO_NO_COLORturn off colors for all commands.BBCodeStarting from version 4.4.0, falocalrepo supports saving data in BBCode format instead of HTML. This is achieved thanks
to the HTML to BBCode converter introduced withfaapi 3.8.0. This converter is
not perfect however, and it is possible that data may be lost during the conversion process.It is suggested to keep your main database in HTML mode, and only use BBCode in a copy to be used with
theservercommand.InitinitTheinitcommand initialises the database. If a database is already present, no operation is performed except for a
version check.Configconfig <OPERATION>The config command allows reading and changing the settings used by the program.listlistShow a list of all stored settings.cookiescookies [--cookie <NAME> <VALUE>...]Read or modify stored cookies. If no--cookieoption is given, the current values are read instead.falocalrepo config cookies --cookie a 38565475-3421-3f21-7f63-3d341339737 --cookie b 356f5962-5a60-0922-1c11-65003b703038files-folderfiles-folder [--move] [<NEW_FOLDER>]Read or modify the folder used to store submission files, whereNEW_FOLDERis the path to the new folder. IfNEW_FOLDERis omitted, the current value is read instead.If the--moveoption is used, all files will be moved to the new location.falocalrepo config files-folder --move FA.files2backupbackup [--date-format FMT] [--folder DIRECTORY] [--remove] [{download|database|config|predownload|predatabase|preconfig}]Read or modify automatic backup settings. Backup will be performed automatically based on stored triggers and date
formats. The date formatFMTsupports the standardCstrftimecodes, and it
defaults to%Y %W(year and week).To set the backup folder, use the--folderoption.To remove a trigger from the settings, use the--removeoption.The trigger can be one of:downloadbackup after performing download operationsdatabasebackup after editing the databaseconfigbackup after changing settingspredownloadbackup after performing download operationspredatabasebackup after editing the databasepreconfigbackup after changing settingsDownloaddownload <OPERATION>The download command performs all download operations to save and update users, submissions, and journals. Submissions
are downloaded together with their files and thumbnails, if there are any. For details on submission files,
seeSubmission Files.All download operations (except login) support the--dry-runoption. When this is active, the database is not
modified, nor are submission files downloaded. Entries are simply listed and the program checks whether they are in the
database or not.All download operations pertaining submissions (users,updateandsubmissions) support the--retryoption to
enable download retries for submission files and thumbnails up to 5 times. The default behaviour is to retry one time.All download operations support the--no-commentsoption to disable saving comments of submissions and journals.
Comments can be updated on a per-entry basis using thedownload submissionanddownload journalcommands,
ordownload usersto update entire user folders with the--replaceoption enabled.All download operations support the--content-onlyoption to disable saving headers and footers of submissions and
journals. Headers and footers can be updated on a per-entry basis using thedownload submissionanddownload journalcommands, ordownload usersto update entire user folders with the--replaceoption enabled.When downloading, submission and journal titles will be displayed in the terminal. Characters in the titles outside the
ASCII range will be replaced with □ to avoid formatting errors.loginloginCheck whether the cookies stored in the database belong to a login Fur Affinity session.usersusers -u <USER>... -f <FOLDER>... [--retry] [--no-comments] [--content-only] [--replace] [--dry-run] [--verbose-report] [--report-file REPORT_FILE]Download specific user folders, whereFOLDERis one of gallery, scraps, favorites, journals, userpage, watchlist-by,
watchlist-to. Multiple--userand--folderarguments can be passed.USERcan be set to@meto fetch own
username.watchlist-by:FOLDERandwatchlist-to:FOLDERarguments add the specifiedFOLDER(s) to the new user
entries.If the--replaceoption is used, existing entries in the database will be updated (favorites are maintained).The--verbose-reportoptions enables printing all the IDs and usernames of the entries fetched/added/modified by the
program. The--report-fileoptions allows saving a detailed download report in JSON format toREPORT_FILE.falocalrepo download users -u tom -u jerry -f gallery -f scraps -f journals -f userpagefalocalrepo download users -u cat -f watchlist-by:gallery -f watchlist-by:scraps -f watchlist-by:journalsfalocalrepo download users -u tom -u jerry -f favorites --dry-runupdateupdate [-u <USER>...] [-f <FOLDER>...] [--stop N] [--deactivated] [--like] [--retry] [--no-comments] [--content-only] [--dry-run] [--verbose-report] [--report-file REPORT_FILE]Download new entries using the users and folders already in the database.--userand--folderoptions can be used to
restrict the update to specific users and or folders, whereFOLDERis one of gallery, scraps, favorites, journals,
userpage. Multiple--userand--folderarguments can be passed.USERcan be set to@meto fetch own username.If the--deactivatedoption is used, deactivated users are fetched instead of ignore. If the user is no longer
inactive, the database entry will be modified as well.The--stopoption allows setting how many entries of each folder should be found in the database before stopping the
update.The--likeoption enables using SQLite LIKE statements forUSERvalues, allowing to select multiple users at once.The--verbose-reportoptions enables printing all the IDs and usernames of the entries fetched/added/modified by the
program. The--report-fileoptions allows saving a detailed download report in JSON format toREPORT_FILE.Note: userpages may be updated even if the text is the same if they contain user icons, as the URLs used in the HTML
tags are temporaryNote: watchlists updates check all watches, regardless of the--stopvalue because watchlist pages are sorted by
name, not by watch datefalocalrepo download update --stop 5falocalrepo download update --deactivated -f gallery -f scrapsfalocalrepo download update -u tom -u jerry -f favorites --report-file FA.update.jsonfalocalrepo download update -u a% -u b%submissionssubmissions [--replace] [--retry] [--no-comments] [--content-only] [--verbose-report] [--report-file REPORT_FILE] <SUBMISSION_ID>...Download single submissions, whereSUBMISSION_IDis the ID of the submission. If the--replaceoption is used,
database entries will be overwritten with new data (favorites will be maintained).The--verbose-reportoptions enables printing all the IDs and usernames of the entries fetched/added/modified by the
program. The--report-fileoptions allows saving a detailed download report in JSON format toREPORT_FILE.falocalrepo download submissions 12345678 13572468 87651234journalsjournals [--replace] [--no-comments] [--content-only] [--verbose-report] [--report-file REPORT_FILE] <JOURNAL_ID>...Download single journals, whereJOURNAL_IDis the ID of the journal. If the--replaceoption is used, database
entries will be overwritten with new data (favorites will be maintained).The--verbose-reportoptions enables printing all the IDs and usernames of the entries fetched/added/modified by the
program. The--report-fileoptions allows saving a detailed download report in JSON format toREPORT_FILE.falocalrepo download journals 123456 135724 876512Databasedatabase <OPERATION>Operate on the database to add, remove, or search entries. For details on columns seeDatabase.Available operations are:infoinfoShow database information, statistics and version.bbcodebbcode [{true|false}]Read or modify the BBCode setting of the database and convert existing entries when changing it. SeeBBCodefor more details.Usetrueto enable BBCode and convert entries andfalseto disable BBCode and convert entries back to HTML.WARNING: HTML to BBCode conversion (and vice versa) is still a work in progress, and it may cause some content to be
lost. A backup of the database should be made before changing the setting.Conversion can be interrupted at any moment withCTRL+Cand all changes will be rolled back.historyhistory [--filter FILTER] [--filter-date DATE] [--clear]Show database history. History events can be filtered using the--filteroption to match events that containFILTER(the match is performed case-insensitively). The--filter-dateoption allows filtering by date. TheDATEvalue must be in the formatYYYY-MM-DD HH:MM:SS, any component can be omitted for generalised results.Using the--clearoption will delete all history entries, or the ones containingFILTERif the--filteroption is
used.falocalrepo database history --filter upgradefalocalrepo database history --filter-date 2022-01 --filter downloadsearchsearch [--column <COLUMN[,WIDTH]>...] [--limit LIMIT] [--offset OFFSET] [--sort COLUMN] [--order {asc|desc}] [--output {table|csv|tsv|json|none}] [--ignore-width] [--sql] [--show-sql] [--total] {SUBMISSIONS|JOURNALS|USERS} <QUERY>...Search the database using queries, and output in different formats. For details on the query language,
seeDatabase Query Language.The default output format is a table with only the most relevant columns displayed for each entry. To override the
displayed column, or change their width, use the --column option to select which columns will be displayed (SQLite
statements are supported). The optionalWIDTHvalue can be added to format that specific column when the output is set
to table.To output all columns and entries of a table,COLUMNandQUERYvalues can be set to@and%respectively.
However, thedatabase exportcommand is better suited for this task.Search is performed case-insensitively.The output can be set to five different types:tableTable formatcsvCSV format (comma separated)tsvTSV format (tab separated)jsonJSON formatnoneDo not print results to screenNote: characters outside the ASCII range will be replaced with □ when using table outputfalocalrepo search USERS --output json '@folders ^gallery'falocalrepo search SUBMISSIONS '@tags |cat| |mouse| @date 2020- @category artwork' --sort AUTHOR asc --sort DATE descfalocalrepo search JOURNALS --output csv '@date (2020- | 2019-) @content commission'viewview [--raw-content] [--view-comments] {SUBMISSIONS|JOURNALS|USERS} IDView a single entry in the terminal. Submission descriptions, journal contents, and user profile pages are rendered and
formatted.Comments are not shown by default; to view them, use the--view-commentsoption.Formatting is limited to alignment, horizontal lines, quotes, links, color, and emphasis. To view the properly formatted
HTML/BBCode content, use theservercommand. Formatting can be disabled with the--raw-contentoption to print the
raw content.Note: full color support is only enabled for truecolor terminals. If the terminal does not support truecolor, the
closest ANSI color match will be used instead.falocalrepo database view USERS tomfalocalrepo database view SUBMISSIONS 12345678addadd [--submission-file FILENAME] [--submission-thumbnail FILENAME] {SUBMISSIONS|JOURNALS|USERS} <FILE>Add entries and submission files manually using a JSON file. Submission files/thumbnails can be added using the
respective options; all existing files are removed. Multiple submission files can be passed.The JSON file must contain fields for all columns of the table. For a list of columns for each table,
seeDatabase.The program will throw an error when trying to add an entry that already exists. To edit entries use
thedatabase editcommand, or remove the entry withdatabase remove.falocalrepo database add USERS user.jsonfalocalrepo database add SUBMISSIONS submission.json --submission-file file1.png --submission-file file2.gif --submission-thumbnail thumbnail.jpgeditedit [--submission-file FILENAME] [--add-submission-files] [--submission-thumbnail FILENAME] {SUBMISSIONS|JOURNALS|USERS} <ID> [<FILE>]Edit entries and submission files manually using a JSON file. Submission files/thumbnails can be added using the
respective options; existing files are overwritten unless the--add-submission-filesoption is used. Multiple
submission files can be passed.The JSON fields must match the column names of the selected table. For a list of columns for each table,
seeDatabase.If the--submission-fileand/or--submission-thumbnailoptions are used, theFILEargument can be omitted.falocalrepo database edit JOURNALS 123456 journal.jsonfalocalrepo database edit SUBMISSIONS 12345678 --submission-file alt.png --add-submission-filesremoveremove [--yes] {SUBMISSIONS|JOURNALS|USERS} ID...Remove entries from the database using their IDs. The program will prompt for a confirmation before commencing deletion.
To confirm deletion ahead, use the--yesoption.falocalrepo database remove SUBMISSIONS 1 5 14789324mergemerge [--query <TABLE QUERY>...] [--replace] DATABASE_ORIGINMerge database fromDATABASE_ORIGIN. Specific tables can be selected with the--queryoption. For details on the
syntax for theQUERYvalue, seeDatabase Query Language. To select all entries in a table,
use%as query. TheTABLEvalue can be one of SUBMISSIONS, JOURNALS, USERS.If no--queryoption is given, all major tables from the origin database are copied (SUBMISSIONS, JOURNALS, USERS).Existing submissions are not replaced by default; to replace existing entries with those fromDATABASE_ORIGIN, use
the--replaceoption.falocalrepo database merge ~/FA.db --query USERS tom --SUBMISSIONS '@author tom'copycopy [--query <TABLE QUERY>...] [--replace] DATABASE_DESTCopy database toDATABASE_DEST. Specific tables can be selected with the--queryoption. For details on the syntax
for theQUERYvalue, seeDatabase Query Language. To select all entries in a table,
use%as query. TheTABLEvalue can be one of SUBMISSIONS, JOURNALS, USERS.If no--queryoption is given, all major tables from the origin database are copied (SUBMISSIONS, JOURNALS, USERS).Existing submissions are not replaced by default; to replace existing entries inDATABASE_DEST, use the--replaceoption.falocalrepo database copy ~/FA.db --query USERS tom --SUBMISSIONS '@author tom'doctordoctor [--users] [--submissions] [--comments] [--fix] [--allow-deletion]Check the database for errors and attempt to repair them.Users are checked for inconsistencies in their name to make sure that they can be properly matched with their
submissions, journals, and comments.Submissions are checked with their thumbnails and files to ensure they are consistent, and the program will attempt to
add files that are in the submission folder but are not saved in the databaseComments are checked against their parents, if the parent object does not exist then the comment is deleted if
the--allow-deletionoption is used.To check only specific tables, use the--users,--submissions, and--commentsoptions.By default, errors are only logged and no attempt will be made to fix them. To allow the program to try to repair
the database, use the--fixoption.Use the--allow-deletionoption to allow deleting entries that are redundant or erroneous (e.g. a comment without
parent object).cleancleanClean the database using the SQLiteVACUUMfunction.upgradeupgradeUpgrade the database to the latest version.Database Query LanguageThe query language used for search queries is based and improves upon the search syntax currently used by the Fur
Affinity website. Its basic elements are:@<field>field specifier (e.g.@title), all database columns are available as search fields.()parentheses, they can be used for better logic operations&ANDlogic operator, used between search terms|ORlogic operator, used between search terms!NOTlogic operator, used as prefix of search terms""quotes, allow searching for literal strings without needing to escape%match 0 or more characters_match exactly 1 character^start of field, when used at the start of a search term it matches the beginning of the field$end of field, when used at the end of a search term it matches the end of the fieldAll other strings are considered search terms.The search uses the@anyfield by default for submissions and journals, allowing to do general searches without
specifying a field. The@anyfield does not include theFAVORITE,FILESAVED,USERUPDATE, andACTIVEfields and
must be searched manually using the respective query fields. When searching users,@usernameis the default field.Search terms that are not separated by a logic operator are consideredANDterms (i.e.a b c->a & b & c).Except for theID,FILESAVED,USERUPDATE, andACTIVEfields, all search terms are searched through the
whole content of the various fields: i.e.@description catwill match any item whose description field contains "cat".
To match items that contain only "cat" (or start with, end with, etc.), the%,_,^, and$operators need to be
used (e.g.@description ^cat).Search terms forID,FILESAVED,USERUPDATE, andACTIVEare matched exactly as they are: i.e.@id 1will match
only items whose ID field is exactly equal to "1", to match items that contain "1" the%,_,^, or$operators
need to be used (e.g.@id %1%).Serverserver [--host HOST] [--port PORT] [--ssl-cert FILE] [--ssl-key FILE] [--redirect-http PORT2] [--auth USERNAME:PASSWORD] [--precache] [--no-browser]Start a server atHOST:PORTto navigate the database. The--ssl-certand--ssl-certallow serving with HTTPS.
Using--redirect-httpstarts the server in HTTP to HTTPS redirection mode.--authenables HTTP Basic
authentication.Using the--precachecaches database entries at startup.When the app has finished loading, it automatically opens a browser window. To avoid this, use the--no-browseroption.For more details on usage seefalocalrepo-server.Completionscompletions [--alias NAME] {bash|fish|zsh}Generate tab-completion scripts for your shell. The generated completion must be saved in the correct location for it to
be recognized and used by the shell.The optional--aliasoption allows generating completion script with a name other thanfalocalrepo.Supported shells are:bashThe Bourne Again SHellfishThe friendly interactive shellzshThe Z shellUpdatesupdates [--shell]Check for updates to falocalrepo and its main dependencies on PyPi. The--shelloption can be used to output
the shell command to upgrade any component that has available updates.Note: The command needs an internet connection.Helphelp [<COMMAND>...]Thehelpcommand gives information on the usage of the program and its commands.falocalrepo help database searchPawpaw [--truecolor | --8bit-color] [FLAG]Print a PRIDE paw!Built-in colors are available for the following flags: pride (default), trans, bisexual, pansexual, non-binary, lesbian,
agender, asexual, genderqueer, genderfluid, aromantic, polyamory.The program will try to determine if the terminal supports truecolor mode (24bit, 16 million colors), if not it will
fall back to the standard 8bit ANSI colors. Both truecolor and 8bit colors can be turned on manually using
the--truecolorand--8bit-coloroptions respectively.Note: the paw works best with a dark background.If you have suggestions on new flags to add (or color improvements for the existing ones), don't hesitate to open
afeature request!DatabaseTo store the metadata of the downloaded submissions, journals, users, cookies and statistics, the program uses a SQLite3
database. This database is built to be as light as possible while also containing all the metadata that can be extracted
from a submission page.To store all this information, the database uses four tables:SETTINGS,USERS,SUBMISSIONSandJOURNALS.How Lists Are StoredSome fields in the database table contain lists of items. These are stored as strings, with each item surrounded by
bars (|). This allows to properly separate and search individual items regardless of their position in the list.|item1||item2|UsersThe users' table contains a list of all the users that have been downloaded 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, sorted and bar-separatedACTIVE1if the user is active,0if notUSERPAGEthe user's profile textSubmissionsThe submissions' table contains the metadata of the submissions downloaded by the program and information on their filesIDthe id of the submissionAUTHORthe username of the author (uploader) in full formatTITLEDATEupload date in ISO formatYYYY-MM-DDTHH:MMDESCRIPTIONdescription in HTML/BBCode formatFOOTERfooter in HTML/BBCode formatTAGSbar-separated tagsCATEGORYSPECIESGENDERRATINGTYPEimage, text, music, or flashFILEURLa bar-separated list of the remote URLs for the submission filesFILEEXTa bar-separated list of extensions of the downloaded files. Can be empty if the file contained errors and
could not be recognised upon downloadFILESAVEDfile and thumbnail download status as a 3bit flag:xx1if thumbnail was downloaded,xx0if not;x1xif at least one file was validx0xif not;1xxif all given files where valid,0xxif not. Possible values
are0through7(3 bit).FAVORITEa bar-separated list of users that have "faved" the submissionMENTIONSa bar-separated 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 entryJournalsThe 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 ISO formatYYYY-MM-DDTHH:MMCONTENTcontent in HTML/BBCode formatHEADERheader in HTML/BBCode formatFOOTERfooter in HTML/BBCode formatMENTIONSa bar-separated list of users that are mentioned in the journal content as linksUSERUPDATEwhether the journal was added as a user update or single entryCommentsThe comments' table contains the metadata of the journals and submissions stored in the database.IDthe id of the commentPARENT_TABLESUBMISSIONSif the comment relates to a submission,JOURNALif the comment relates to a journalPARENT_IDthe id of the parent object (submission or journal)REPLY_TOthe id of the parent comment, if the comment is a replyAUTHORthe username of the author in full formatDATEpost date in ISO formatYYYY-MM-DDTHH:MM:SSTEXTthe text of the comment in HTML/BBCode formatSettingsThe settings table contains settings for the program and variable used by the database handler and main program.COOKIEScookies for the scraper, stored in JSON formatFILESFOLDERlocation of downloaded submission filesVERSIONdatabase version, this can differ from the program versionSERVER.SEARCHsearch settings if saved using the web server (seeserver)BACKUPFOLDERfolder for automatic backupsBACKUPSETTINGSsettings for automatic backupsBBCODEsettings for BBCode modeHistoryThe history table holds events related to the database.TIMEevent time in ISO formatYYYY-MM-DDTHH:MM:SS.ssssssEVENTthe event descriptionSubmission FilesSubmission files are saved in a tiered tree structure based on their submission ID. IDs are zero-padded to 10 digits and
then broken up in 5 segments of 2 digits; each of these segments represents a folder tha will be created in the tree.For example, a submission1457893will be padded to0001457893and divided into00,01,45,78,93. The
submission file will then be saved as00/01/45/78/93/submission.filewith the correct extension extracted from the
file itself - FurAffinity links do not always contain the right extension.Extra submission files are saved in the same folder with a 0-based index appended to the filename. The first file is
namedsubmission.file, and subsequent files are calledsubmission1.file,submission2.file, etc.Upgrading DatabaseWhen the program starts, it checks the version of the database against the one used by the program and if the latter is
more advanced it stops execution and prompts the user to upgrade using thedatabase upgradecommand.Note:versions prior to 4.19.0 are not supported by falocalrepo version 4.0.0 and above. To update from
those, usefalocalrepo version 3.25.0to upgrade the database to version
4.19.0 first.Note:Versions before 2.7.0 are not supported by falocalrepo version 3.0.0 and above. To update from those to the new
version use version 2.11.2 to update the database to version 2.7.0For details on upgrades and changes between database versions,
seefalocalrepo-database.ContributingAll contributions and suggestions are welcome!If you have suggestions for fixes or improvements, you can open an issue with your idea, seeIssuesfor
details.IssuesIf you encounter any problem while using the program, an issue can be opened on the project's page
onGitHub.Issues can also be used to suggest improvements and features.When opening an issue for a problem, please copy the error message and describe the operation in progress when the error
occurred.AppendixEarlier ReleasesRelease 3.0.0 was deleted from PyPi because of an error in the package information. However, it can still be found on
GitHubv3.0.0.Release binaries for versions 2.11.2 can be found on GitHub
atv2.11.2