Project variables
Most of z3n7 reads and writes ZennoPoster project variables by name. A project that uses the library needs the variables below that its calls touch. A missing variable is reported to the log by project.Var and read as an empty string.
Account and run#
| Variable |
Meaning |
acc0 |
Current account number. Most database helpers read and write "the current account's row" by it. |
acc0Forced |
When set, AccountRunner uses it as the account instead of choosing one. |
cfgAccRange |
Account range: 5, 1-10, 1,4,7. Groups separated by : are priorities for account selection. |
rangeStart, rangeEnd, range |
Filled from cfgAccRange by project.Range(). |
projectName, projectTable |
Project file name and its table __{name}; set by ProjectName() and ProjectTable(). |
varSessionId |
Session start, Unix milliseconds; set by StartSession(). |
err |
Last error text; set by warn with thrw, MaxErr, CatchErrorFromTraffic. |
lastQuery |
Last update written with DbUpd; a value containing dropped marks the session as failed. |
maxErr |
Error counter of MaxErr. |
timeOut |
Session limit in minutes for TimeOut(). |
cfgToDo |
Comma-separated task columns added to the project table by TblForProject. |
Logging#
| Variable |
Meaning |
cfgLog |
Substrings switch log header fields on: acc, time, port, caller, wrap; force ignores the level filter. See Logger. |
logLevel |
Minimum level: Debug, Info, Warning, Error, Off. |
debug |
True lowers the default level to Debug. |
Database#
| Variable |
Meaning |
dbSource |
Database of the project.Db* helpers (project variable, else global variable). A value starting with Host= is a PostgreSQL connection string. See 05. Database. |
DBmode, DBsqltPath |
Mode and SQLite file used by new Db(project) and some migration helpers. |
DBpstgrPass |
PostgreSQL password for the migration helpers. |
sqlPgHost, sqlPgPort, sqlPgName, sqlPgUser, sqlPgPass |
Global variables: PostgreSQL settings for new Db(project). |
Browser and profile#
| Variable |
Meaning |
cfgBrowser |
Chromium or WithoutBrowser; default of RunBrowser. |
profiles_folder |
Root of profile storage (also kept as a global variable). |
pathProfileFolder, pathCookies |
Set when the browser starts: the account's profile folder and cookie file. |
port, pid, instancePort |
Browser port and process id after start. |
proxy |
Proxy used by Rqst for proxy: "+". |
headers, cookies |
Default headers (one per line) and cookies (JSON) of Rqst. |
Secrets#
| Variable |
Meaning |
jVars |
Encrypted settings blob; Init expects a file path here and loads the file. |
cfgPin |
Read from jVars by SecureVar; the PIN of account-bound encryption (SAFU). |
Mail clients keep their own state (email, mailId, anyMailId, tempMailId, mailOtp); see Mail.