From 9833f8100763c4a8bebaaa1ff45edb2f09076992 Mon Sep 17 00:00:00 2001 From: MrTyton Date: Fri, 25 Mar 2022 17:21:17 -0400 Subject: [PATCH] Update to properly utilize docker Trying this, time to see if it works. --- .gitignore | 8 - Dockerfile | 77 + README.md | 17 - balloonNotify.py | 85 - config_template.ini | 27 - ff.png | Bin 14699 -> 0 bytes giNotify.py | 21 - release-versions/calibre.txt | 1 + release-versions/fff.txt | 1 + release-versions/latest.txt | 1 + .../app/fanficdownload.py | 22 +- root/app/notifications.py | 8 + root/app/run.sh | 16 + runner_notify.py => root/app/runner_notify.py | 15 +- root/config.default/config.ini | 16 + root/config.default/defaults.ini | 2372 +++++++++++++++++ root/config.default/fanfiction_file | 0 root/config.default/personal.ini | 140 + root/etc/cont-init.d/05-default-confs | 25 + root/etc/cont-init.d/90-user-permissions | 10 + root/etc/cont-init.d/99-init.d-finish | 11 + root/etc/services.d/ffdl/run | 4 + 22 files changed, 2696 insertions(+), 181 deletions(-) create mode 100644 Dockerfile delete mode 100644 README.md delete mode 100755 balloonNotify.py delete mode 100644 config_template.ini delete mode 100644 ff.png delete mode 100644 giNotify.py create mode 100644 release-versions/calibre.txt create mode 100644 release-versions/fff.txt create mode 100644 release-versions/latest.txt rename fanficdownload.py => root/app/fanficdownload.py (93%) create mode 100644 root/app/notifications.py create mode 100644 root/app/run.sh rename runner_notify.py => root/app/runner_notify.py (93%) create mode 100644 root/config.default/config.ini create mode 100644 root/config.default/defaults.ini create mode 100644 root/config.default/fanfiction_file create mode 100644 root/config.default/personal.ini create mode 100644 root/etc/cont-init.d/05-default-confs create mode 100644 root/etc/cont-init.d/90-user-permissions create mode 100644 root/etc/cont-init.d/99-init.d-finish create mode 100644 root/etc/services.d/ffdl/run diff --git a/.gitignore b/.gitignore index 0ecf766..db1f598 100644 --- a/.gitignore +++ b/.gitignore @@ -98,11 +98,3 @@ ENV/ # mypy .mypy_cache/ -# Personal Files -config.ini -defaults.ini -fanfiction_file -notifications.py -personal.ini -run.sh - diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..380fb3f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,77 @@ +FROM python:3.9-alpine + +# set version label +ARG BUILD_DATE +ARG VERSION +ARG CALIBRE_RELEASE +ARG FFF_RELEASE +LABEL build_version="FFDL-Auto version:- ${VERSION} Calibre: ${CALIBRE_RELEASE} FFF: ${FFF_RELEASE} Build-date:- ${BUILD_DATE}" + +RUN set -x && \ + addgroup --gid "$PGID" abc && \ + adduser \ + --gecos "" \ + --disabled-password \ + --no-create-home \ + --uid "$PUID" \ + --ingroup abc \ + --shell /bin/bash \ + abc + +RUN mkdir -p /opt/calibre && \ + apk update && \ + apk add --no-cache --upgrade \ + bash \ + ca-certificates \ + gcc \ + mesa-gl \ + qt5-qtbase-x11 \ + wget \ + xdg-utils \ + xz \ + curl \ + dbus \ + jq \ + python3 + +RUN echo "**** install calibre ****" && \ + mkdir -p \ + /opt/calibre && \ + if [ -z ${CALIBRE_RELEASE+x} ]; then \ + CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" \ + | jq -r .tag_name); \ + fi && \ + CALIBRE_VERSION="$(echo ${CALIBRE_RELEASE} | cut -c2-)" && \ + CALIBRE_URL="https://download.calibre-ebook.com/${CALIBRE_VERSION}/calibre-${CALIBRE_VERSION}-x86_64.txz" && \ + curl -o \ + /tmp/calibre-tarball.txz -L \ + "$CALIBRE_URL" && \ + tar xvf /tmp/calibre-tarball.txz -C \ + /opt/calibre && \ + /opt/calibre/calibre_postinstall && \ + dbus-uuidgen > /etc/machine-id + +RUN echo "**** cleanup ****" && \ + apt-get clean && \ + rm -rf \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* + +RUN echo *** Install Packages *** && \ + apk add --no-cache --upgrade py-pillow && \ + if [ -z ${FFF_RELEASE+x} ]; then \ + python3 -m pip --no-cache-dir install FanFicFare \ + else \ + python3 -m pip --no-cache-dir install --extra-index-url https://testpypi.python.org/pypi FanFicFare==${FFF_RELEASE} \ + fi && \ + python3 -m pip --no-cache-dir install pushbullet.py && \ + ln -s /opt/calibre/calibredb /bin/calibredb + +COPY root/ / + +VOLUME /config + +WORKDIR /config + +ENTRYPOINT ["/init"] diff --git a/README.md b/README.md deleted file mode 100644 index 73848b8..0000000 --- a/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# AutomatedFanfic - -Python script to automate the use of FanFicFare CLI (https://github.com/JimmXinu/FanFicFare) with calibre. - -Primary script is fanficdownload.py. Use -h or --help to see the options. - -All of the options can be loaded into the config file, of which the template is provided in `config_template.ini`, and utilized with `python3 fanficdownload.py -c path_to_config.ini`. - -There is additional support for notifications, including pushbullet integration, through runner_notify. Use -h to see options. - -Works with Fanficfare 2.3.6+. Rewrite underway to take advantage of new features in Fanficfare 2.4.0 - -Requires Python 3.6.9. Unsure if it will work on higher versions of Python. - -For basic cron usage, this is not needed, `fanficfare -dowload-imap -u` should work if you're not integrating into calibre. This script is best used if you want to update the calibre library, for the usage of calibre-server for instance. - -If anything does not work, please open a ticket. \ No newline at end of file diff --git a/balloonNotify.py b/balloonNotify.py deleted file mode 100755 index a857d61..0000000 --- a/balloonNotify.py +++ /dev/null @@ -1,85 +0,0 @@ -# -- coding: utf-8 -- - -from win32api import * -from win32gui import * -import win32con -import sys, os -import struct -import time -import threading -import cmd -from os.path import join, dirname, abspath - -# Class -class WindowsBalloonTip: - def __init__(self, title, msg): - message_map = { win32con.WM_DESTROY: self.OnDestroy,} - - # Register the window class. - wc = WNDCLASS() - hinst = wc.hInstance = GetModuleHandle(None) - wc.lpszClassName = 'PythonTaskbar' - wc.lpfnWndProc = message_map # could also specify a wndproc. - while True: - try: - classAtom = RegisterClass(wc) - break - except: - continue - # Create the window. - style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU - self.hwnd = CreateWindow(classAtom, "Taskbar", style, 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, 0, 0, hinst, None) - UpdateWindow(self.hwnd) - - # Icons managment - iconPathName = join(dirname(abspath(__file__)), 'ff.png') - #print iconPathName - icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE - try: - hicon = LoadImage(hinst, iconPathName, win32con.IMAGE_ICON, 0, 0, icon_flags) - except: - hicon = LoadIcon(0, win32con.IDI_APPLICATION) - flags = NIF_ICON | NIF_MESSAGE | NIF_TIP - nid = (self.hwnd, 0, flags, win32con.WM_USER+20, hicon, 'Tooltip') - - # Notify - Shell_NotifyIcon(NIM_ADD, nid) - Shell_NotifyIcon(NIM_MODIFY, (self.hwnd, 0, NIF_INFO, win32con.WM_USER+20, hicon, 'Balloon Tooltip', msg, 200, title)) - - # self.show_balloon(title, msg) - time.sleep(5) - - # Destroy - DestroyWindow(self.hwnd) - classAtom = UnregisterClass(classAtom, hinst) - def OnDestroy(self, hwnd, msg, wparam, lparam): - nid = (self.hwnd, 0) - Shell_NotifyIcon(NIM_DELETE, nid) - #PostQuitMessage(0) # Terminate the app. - -# Function - -class myThread(threading.Thread): - def __init__(self, title, msg): - - threading.Thread.__init__(self) - self.title = title - self.msg = msg - def run(self): - w = WindowsBalloonTip(self.title, self.msg) - - -def balloon_tip(title, msg): - - thread1 = myThread(title, msg) - thread1.start() - return - #w=WindowsBalloonTip(title, msg) - -class Notification(): - def __init__(self): - pass - - def send_notification(self, title, text): - balloon_tip(title, msg) - diff --git a/config_template.ini b/config_template.ini deleted file mode 100644 index 3d7ad91..0000000 --- a/config_template.ini +++ /dev/null @@ -1,27 +0,0 @@ -# Email Login Information, so that the script can download from email subscription notifications. -[login] -# Username for email -user= -# Password for email -password= -# IMAP address for email -server= -# The mailbox to look in the emails for, such as INBOX -mailbox= - -[locations] -# Web Address for the calibre library to update -library= -# Path to file to read links from, or to output links that didn't work. -input= - -# If you want to user runner_notify.py to send alerts to your phone, fill out the fields here. -[runner] -notification= -pushbullet= -pbdevice= -tag= - -# How to display output. True will display as the program runs, false will wait until the end. -[output] -live= diff --git a/ff.png b/ff.png deleted file mode 100644 index 413cb46b6c6409ec7efe05c3fbd706e8e71698b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14699 zcmb8WbyU<*_dYt53^{LK~CwBrVO$ z`7pHbAlqws`oQn5+C!-#i-&O7IuB?jr1;LmGPZGYX~4FCN~ zG2OH=>hZfcbWzhi4EX{?#ukyJg@dXxhzsi zm1*R7wiue8f2rtd{`fZKSKG=}MAfxv`+NHhA(ZVuL6S@vtm7Ugsn9WXlb{Y`ZN2f8 z;yXI+W4j>rYt$dUcJ2YD`K+kZdFO>krh>}e{8ey|9K^o|?a(IE5H0|A<=@co63#xc zW)6#tNxtUR^lGSX=j?*-50n68zX$0D)f=)>1X9J*FyDX%CGdzVgR_PJ2iG%?d(k+r z-I&=evQg4C>B>h(hYp^8EUuzU5BrhhM|r$MdNQpNhWs3nd@TgMZExbc`IM7igzQb} zAsI>2;2o+36(Z&(J_z7rmIE$|{U(so>V+HJ>HQ|@C+yGR%`l|ZpFWFXiyE?VhkRCF z8)n-=6=ImoZApbH^^Gl=V>+eA+>E#x8ru9@vF#ES&ruu2%6cqeND%jn=ZJic>-u=q zGJk%*%8>h82*k>Ij?=T32#7(ekCH$pH~7A0*O`^;tKN13zvFmhTGTT!lY%6-_^F4H z{9);E_P+#VZl%*;)NYh#7*Z&dAZRL&2v?#X7fYKSR-WS*5KxjuHK&1>pfn)MO9mm$ zJ5!6J&l1CPNonm~zC|*3X+D0dTvq_4JZ=H!tPPKm03nV4Jg&N^(4_*ZA9a`u2T4+1 zfB(75A-!ZJYu`Cuv8!D|+u^f9uc68Q-~gN*2!)2utuz?;E%k3AkRma##EQc4x1JYV z0i4Rl18;T{NyCs@nEVZD2MEF9l@pU;->?amw2Jrv2!SWt%85po+qEGv0I-p(Mb`q~0uIVXw-;7gmr@TDxxbK$vfkIg& z>cd8mh7~Q$&_timv~Zrte`sH;e+2bkRh7Jh^Or55NYf|jpqW2(>lY+Nn z&StM&_ug67tFvFD?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+E4{MF@Y9`&To6Gaba@4kkElBp)NJ#=e zMm4Ddx(gg_5OBtK*o-_e!xk<;8VB*OwuQJl-f8-!KmdD0+-*N2Q#mV5@6@<69)wc= z_kG#u#Jcxge8b+pWnzA&sEwrMQoF=ge47Miu?g@{t7(G(Z)Gh7QE=WNS-HRAr8@*^ zgss5e$-_D<^#Dixrmfp`K3t`xc^jN7uARB_Slqedv&Ya9X$0;!6c41=dVJVs+u4_# z;OxmcV?JlDj#h;Uk;-w>ZxHrR-jyrVO9byCC8<7O6vf_I-rQU8@ zLYh67s^%w?X;*$9`mWOjh%qSdBuTi;s&&CRnZw9}LEJRNU*ib-L^X~rz04y;lfNU* z+9jVE^mo!7S`g}9`xFCHQm$xa4(m-|qF*wq=qDrF /dev/null ; then + DOCKER_INTERNAL_IP=`/sbin/ip route | awk '/default/ { print $3 }' | awk '!seen[$0]++'` + echo -e "$DOCKER_INTERNAL_IP\t$DOCKER_INTERNAL_HOST" | tee -a /etc/hosts > /dev/null + fi +} + +fix_linux_internal_host + +python3 runner_notify.py -c config.ini +sleep 60 + diff --git a/runner_notify.py b/root/app/runner_notify.py similarity index 93% rename from runner_notify.py rename to root/app/runner_notify.py index e98de11..cd8980a 100644 --- a/runner_notify.py +++ b/root/app/runner_notify.py @@ -7,13 +7,11 @@ import ntpath from os import utime from os.path import join -from notifications import Notification from pushbullet import Pushbullet from optparse import OptionParser from configparser import ConfigParser - def enable_notifications(options): if options.pushbullet: fail = False @@ -34,10 +32,6 @@ def enable_notifications(options): temp_note.send_notification = pb.push_note yield temp_note - if options.notify: - notary = Notification() - yield notary - def touch(fname, times=None): with open(fname, 'a'): @@ -47,7 +41,7 @@ def touch(fname, times=None): def main(options): try: res = check_output( - "python3 fanficdownload.py -c config.ini", + "python3.9 fanficdownload.py -c config.ini", shell=True, stderr=STDOUT) except Exception as e: @@ -134,13 +128,6 @@ if __name__ == "__main__": def updater(option, newval): return newval if newval != "" else option - try: - options.notify = updater( - options.notify, config.getboolean( - 'runner', 'notification')) - except BaseException: - pass - try: options.pushbullet = updater( options.pushbullet, config.get( diff --git a/root/config.default/config.ini b/root/config.default/config.ini new file mode 100644 index 0000000..faacc91 --- /dev/null +++ b/root/config.default/config.ini @@ -0,0 +1,16 @@ +[login] +user= +password= +server= +mailbox= + +[locations] +library= +input=/config/fanfiction_file + +[runner] +pushbullet=False +pbdevice= + +[output] +live=False diff --git a/root/config.default/defaults.ini b/root/config.default/defaults.ini new file mode 100644 index 0000000..b45ac5e --- /dev/null +++ b/root/config.default/defaults.ini @@ -0,0 +1,2372 @@ +# Copyright 2015 Fanficdownloader team, 2016 FanFicFare team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +[defaults] + +## [defaults] section applies to all formats and sites but may be +## overridden at several levels. Example: + +## [defaults] +## titlepage_entries: category,genre, status +## [www.whofic.com] +## # overrides defaults. +## titlepage_entries: category,genre, status,dateUpdated,rating +## [epub] +## # overrides defaults & site section +## titlepage_entries: category,genre, status,datePublished,dateUpdated,dateCreated +## [www.whofic.com:epub] +## # overrides defaults, site section & format section +## titlepage_entries: category,genre, status,datePublished +## [overrides] +## # overrides all other sections +## titlepage_entries: category + +## Some sites also require the user to confirm they are adult for +## adult content. Uncomment by removing '#' in front of is_adult. +is_adult:true + +## All available titlepage_entries and the label used for them: +## _label:Foreign language +## DEPRECATED - use keep_html_attrs (or add_to_keep_html_attrs) instead. +#keep_title_attr: false + +## Some attributes cause problems for EBook readers. By default, +## FanFicFare will remove all attributes except the ones specified +## from all tags. (The only exception is that tags will also +## keep src, alt and longdesc attributes.) +## Example: To add 'style', 'title' and 'align' to the list to keep, +## in your personal.ini [defaults] put: +## add_to_keep_html_attrs:,style,title,align +keep_html_attrs:href,name,class,id + +## Tags listed here will be replaced with . +## For example: underlined text becomes +## underlined text +## Note that the output_css should contain the class .u, .big, etc for +## the spans to be useful. +## This feature is for replacing old tags deprecated/removed in newer +## HTML and EPUB standards. +replace_tags_with_spans:u,big,small + +## If a chapter range was given, use this pattern for the book title. +## replace_metadata and include/exclude will be applied *after* this. +## Set to empty value to disable. +title_chapter_range_pattern:${title} (Ch ${first}-${last}) + +## Don't like the numbers at the start of chapter titles on some +## sites? You can use strip_chapter_numbers to strip them off. Just +## want to make them all look the same? Strip them off, then add them +## back on with add_chapter_numbers:true. Only want them added back +## on for Table of Contents(toc)? Use add_chapter_numbers:toconly. +## (toconly doesn't work on mobi output.) Don't like the way it +## strips numbers or adds them back? See chapter_title_strip_pattern +## and chapter_title_add_pattern. +strip_chapter_numbers:false + +## add_chapter_numbers can be true, false or toconly +## (Note number is not added when there's only one chapter.) +add_chapter_numbers:false + +## (Two versions of chapter_title_strip_pattern are shown below. You +## should only have one uncommented.) +## This version will remove the leading number from: +## "1." => "" +## "1. The Beginning" => "The Beginning" +## "1: Start" => "Start" +## "2, Chapter the second" => "Chapter the second" +## etc +## Leaves unchanged "1.1" or "1" +## Note that your ToC entry(ies) may be empty if the +## chapter_title_strip_pattern removes everything and you don't have +## add_chapter_numbers:true. +chapter_title_strip_pattern:^[0-9]+[\.: -]+(?=[^0-9]|$) + +## This version remove leading numbers and 'Chapter 1': +## "Chapter 1" => "" +## "1. Chapter 1" => "" +## "1. Chapter 1, Bob's First Clue" => "Bob's First Clue" +## "Chapter 2 - Pirates Place" => "Pirates Place" +## etc +## Note that your ToC entry(ies) may be empty if the +## chapter_title_strip_pattern removes everything and you don't have +## add_chapter_numbers:true. +#chapter_title_strip_pattern:^([0-9]+[\.: -]+)?(Chapter *[0-9]+[\.:, -]*)? + +## If true, when updating an epub that already has old chapters, new +## chapters will be marked in the TOC and chapter header by using +## chapter_title_new_pattern and chapter_title_addnew_pattern to set the chapter. +mark_new_chapters:false + +## chapter title patterns use python template substitution. The +## ${index} is the 'chapter' number and ${title} is the chapter title, +## after applying chapter_title_strip_pattern. Those are the only +## variables available. + +## The basic pattern used when not using add_chapter_numbers or +## mark_new_chapters +chapter_title_def_pattern:${title} + +## Pattern used with add_chapter_numbers, but not mark_new_chapters +chapter_title_add_pattern:${index}. ${title} + +## Pattern used with mark_new_chapters, but not add_chapter_numbers +## (new) is just text and can be changed. +chapter_title_new_pattern:(new) ${title} + +## Pattern used with add_chapter_numbers and mark_new_chapters +## (new) is just text and can be changed. +chapter_title_addnew_pattern:${index}. (new) ${title} + +## Uses a python template substitution. The ${title} is the default +## title of a new anthology, in the case of a series, or +## the first book title otherwise. This is only applied to new +## anthologies. +anthology_title_pattern:${title} Anthology + +## Add tag(s) for anthology (series) books. Set to empty to not add +## any anthology tags. +anthology_tags:Anthology + +## Reorder ships so b/a and c/b/a become a/b and a/b/c. '/' is no +## longer hard coded and can be changed and added to with +## sort_ships_splits. +sort_ships:false + +## Each line indicates first a regex that should be used to split each +## ships entry and then, after => the string to use to merge the parts +## back together. \s == blank space. +## Each part will have replace_metadata with key ships_CHARS applied. +sort_ships_splits: + [ ]*/[ ]*=>/ + [ ]*&[ ]*=>\s&\s + +## join_string_ options -- FanFicFare list entries are comma +## separated by default. You can use this to change that. For example, +## if you want authors separated with ' & ' instead, use +## join_string_calibre_author:\s&\s. (\s == space) +#join_string_author:,\s + +## keep_in_order_ options: FanFicFare sorts list entries by default +## (except for author/authorUrl/authorId). But if you want to use an +## extra entry derived from author, it ends up sorted. For example, if +## you added calibre_author: keep_in_order_calibre_author:true +#keep_in_order_author:true + +## User-agent +user_agent:FFF/2.X + +## Added for [base_xenforoforum], but can be used with other sites, +## too. Limit the 'description' to the first X *characters* +## collected. Character count includes HTML tags, so it can be +## non-intuitive. +#description_limit:1000 + +[base_efiction] +## At the time of writing, eFiction Base adapters allow downloading +## the whole story in bulk using the 'Print' feature. If 'bulk_load' +## is set to 'true', both metadata and chapters can be loaded in one +## step +bulk_load:true + +[base_xenforoforum] + +cover_exclusion_regexp:/styles/ + +## I saw lots of chapters name simply '1.1' etc during testing. +strip_chapter_numbers:false + +## Copy title to tagsfromtitle for parsing tags. +add_to_extra_valid_entries:,tagsfromtitle,forumtags + +## '.NOREPL' tells the system to *not* apply title's +## in/exclude/replace_metadata -- Only works on include_in_ lines. +include_in_tagsfromtitle:title.NOREPL + +tagsfromtitle_label:Tags from Title +forumtags_label:Tags from Forum + +## might want to do this, maybe not. Will often include category, but +## also often include non-category stuff. +# include_in_category:tagsfromtitle + +add_to_include_metadata_pre: +# only keep tagsfromtitle with ( or [ in. + tagsfromtitle=~[\[\(] + +## disable chapter range in title because of tagsfromtitle processing. +title_chapter_range_pattern: + +add_to_replace_metadata: +# for QuestionableQuesting NSFW subforum. + tagsfromtitle=>^\[NSFW\].*?([\(\[]([^\]\)]+)[\)\]]).*?$=>NSFW,\2 +# remove anything outside () or [] + tagsfromtitle=>^.*?([\(\[]([^\]\)]+)[\)\]]).*?$=>\2 +# remove () [] +# tagsfromtitle=>[\(\)\[\]]=> +# change (spaces)slash(or semicolon)(spaces) to comma + tagsfromtitle=> *[/;] *=>, + tagsfromtitle=> [xX] =>, + +# remove [] or () blocks and leading/trailing spaces/dashes/colons + title=>[-: ]*[\(\[]([^\]\)]+)[\)\]][-: ]*=> +# remove 'Thread' and the next word, usually "Thread 2", "Thread +# four", "Thread iv", "Story Thread", etc + title,tagsfromtitle=>[-: ]*(Story *)?[Tt]hread [^ ]+[-: ]*=> + +# Normalize 'fanfiction/fanfic/fan-fiction' a little. + forumtags=>[Ff]an-?[Ff]ic(tion)?=>FanFiction + +add_to_extra_titlepage_entries:,tagsfromtitle,forumtags + +## XenForo tags are all lowercase everywhere that I've seen. This +## makes the first letter of each word uppercase. Applied before +## replace_metadata. +capitalize_forumtags:true + +## Add both title tags and forumtags to standard (subject) tags. +## '.SPLIT' tells the system to split by ',' +add_to_include_subject_tags:,tagsfromtitle.SPLIT,forumtags + +## base_xenforoforum reads Published and Updated datetimes from +## Threadmarks if used, or from the posted & updated times of the +## 'first' post if no threadmarks. +datePublished_format:%%Y-%%m-%%d %%H:%%M +dateUpdated_format:%%Y-%%m-%%d %%H:%%M + +## Only take the first X characters of the 'first' post to use as +## the description. +description_limit:500 + +## Because base_xenforoforum adapters can pull chapter URLs from human +## posts, the odds of errors in the chapter URLs are vastly higher. +## You can set continue_on_chapter_error:true to continue on after +## failing to download a chapter and instead record an error message +## in the ebook for that chapter. +continue_on_chapter_error:false + +## When given a thread URL, use threadmarks as chapter links when +## there are at least this many threadmarks. A number of older +## threads have a single threadmark to an 'index' post. Set to 1 to +## use threadmarks whenever they exist. +minimum_threadmarks:2 + +## When 'first post' (or post URL) is being added as a chapter, give +## the chapter this title. +first_post_title:First Post + +## In normal operation, if given a post URL or a thread URL with less +## than minimum_threadmarks, the given post or the first post of the +## thread will be included as the first chapter (with chapter title +## from first_post_title) unless that post is explicitly linked to in +## the collected chapter list. First post is not included when using +## thread marks. +## +## If always_include_first_post:true, then the given or first post +## will be included as above even if it is a link in the post or even +## if threadmarks are used. Can result in a duplicated chapter. +always_include_first_post:false + +## In normal operation, forumtags will only be populated when +## threadmarks are used for chapters (see minimum_threadmarks above). +## When always_use_forumtags:true, always populate forumtags. +always_use_forumtags:false + +## Each output format has a section that overrides [defaults] +[html] + +## include images from img tags in the body and summary of +## stories. Images will be converted to jpg for size if possible. +## include_images is *only* available in epub and html output formats. +## include_images is *not* available in the web service in any format. +#include_images:false + +## This switch prevents FanFicFare from doing any processing on the images. +## Usually they would be converted to jpg, resized and optionally made +## grayscale. +no_image_processing: true + +## output background color--only used by html and epub (and ignored in +## epub by many readers). Included below in output_css--will be +## ignored if not in output_css. +background_color: ffffff + +## Allow customization of CSS. Make sure to keep at least one space +## at the start of each line and to escape % to %%. Also need +## background_color to be in the same section, if included in CSS. +output_css: + body { background-color: #%(background_color)s; } + .CI { + text-align:center; + margin-top:0px; + margin-bottom:0px; + padding:0px; + } + .center {text-align: center;} + .cover {text-align: center;} + .full {width: 100%%; } + .quarter {width: 25%%; } + .smcap {font-variant: small-caps;} + .u {text-decoration: underline;} + .bold {font-weight: bold;} + .big { font-size: larger; } + .small { font-size: smaller; } + +[txt] +## Add URLs since there aren't links. +titlepage_entries: series,seriesUrl,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,site,storyUrl, authorUrl, description + +## Width to word wrap text output. 0 indicates no wrapping. +wrap_width: 78 + +## use \r\n for line endings, the windows convention. text output only. +windows_eol: true + +[epub] + +## epub carries the TOC in metadata. +## mobi generated from epub by calibre will have a TOC at the end. +include_tocpage: false + +## include a Update Log page before the story text. If 'true', the +## log will be updated each time the epub is and all the metadata +## fields that have changed since the last update (typically +## dateUpdated,numChapters,numWords at a minimum) will be shown. +## Great for tracking when chapters came out and when the description, +## etc changed. +## Plugin will now preserve the log page when the epub is overwritten, +## too. +include_logpage: false +## If set to 'smart', logpage will only be included if the story is +## status:In-Progress or already had a logpage. That way you don't +## end up with Completed stories that have just one logpage entry. +#include_logpage: smart + +## items to include in the log page Empty metadata entries, or those +## that haven't changed since the last update, will *not* appear, even +## if in the list. You can include extra text or HTML that will be +## included as-is in each log entry. Eg: logpage_entries: ...,
, +## summary,
,... +logpage_entries: dateCreated,datePublished,dateUpdated,numChapters,numWords,status,series,title,author,description,category,genre,rating,warnings + +## epub->mobi conversions typically don't like tables. +titlepage_use_table: false + +## When using tables, make these span both columns. +wide_titlepage_entries: description, storyUrl, authorUrl, seriesUrl + +## output background color--only used by html and epub (and ignored in +## epub by many readers). Included below in output_css--will be +## ignored if not in output_css. +background_color: ffffff + +## Allow customization of CSS. Make sure to keep at least one space +## at the start of each line and to escape % to %%. Also need +## background_color to be in the same section, if included in CSS. +## 'adobe-hyphenate: none;' prevents hyphenation on newer Nooks +## STR(wG) (1.2.1+ for sure) +output_css: + body { background-color: #%(background_color)s; + text-align: justify; + margin: 2%%; + adobe-hyphenate: none; } + pre { font-size: x-small; } + sml { font-size: small; } + h1 { text-align: center; } + h2 { text-align: center; } + h3 { text-align: center; } + h4 { text-align: center; } + h5 { text-align: center; } + h6 { text-align: center; } + .CI { + text-align:center; + margin-top:0px; + margin-bottom:0px; + padding:0px; + } + .center {text-align: center;} + .cover {text-align: center;} + .full {width: 100%%; } + .quarter {width: 25%%; } + .smcap {font-variant: small-caps;} + .u {text-decoration: underline;} + .bold {font-weight: bold;} + .big { font-size: larger; } + .small { font-size: smaller; } + +## include images from img tags in the body and summary of +## stories. Images will be converted to jpg for size if possible. +## include_images is *only* available in epub and html output format. +include_images:true + +## If set, the first image found will be made the cover image. If +## keep_summary_html is true, any images in summary will be before any +## in chapters. +make_firstimage_cover: true + +## If set, the epub will never have a cover, even include_images is on +## and the site has specific cover images. +#never_make_cover: false + +## If set, and there isn't already a cover image from the adapter or +## from make_firstimage_cover, this image will be made the cover. +## It can be either a 'file:' or 'http:' url. +## Note that if you enable make_firstimage_cover in [epub], but want +## to use default_cover_image for a specific site, use the site:format +## section, for example: [ficwad.com:epub] +## default_cover_image is a python string Template string with +## ${title}, ${author} etc, same as titlepage_entries. Unless +## allow_unsafe_filename is true, invalid filename chars will be +## removed from metadata fields +#default_cover_image:file:///C:/Users/username/Desktop/nook/images/icon.png +#default_cover_image:file:///C:/Users/username/Desktop/nook/images/${title}/icon.png +#default_cover_image:http://www.somesite.com/someimage.gif + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +#cover_exclusion_regexp:/stories/999/images/.*?_trophy.png + +## Resize images down to width, height, preserving aspect ratio. +## Nook size, with margin. +image_max_size: 580, 725 + +## Change image to grayscale, if graphics library allows, to save +## space. +#grayscale_images: false + +## jpg or png +## -- jpg produces smaller images, and may be supported by more +## readers, but it's older and doesn't allow transparency. +## Transparency removed as if remove_transparency: true +## -- png is newer but does allow transparency, but only in CLI. +## It doesn't work in calibre PI due to limitations of the API. +convert_images_to: jpg + +## Remove transparency and fill with background_color if true. +remove_transparency: true + +## This switch prevents FanFicFare from doing any processing on the images. +## Usually they would be converted to jpg, resized and optionally made +## grayscale. +#no_image_processing: false + +## if the tag doesn't have a div or a p around it, nook gets +## confused and displays it on every page after that under the text +## for the rest of the chapter. I doubt adding a div around the img +## will break any other readers, but in case it does, the fix can be +## turned off. This setting is not used if replace_br_with_p is +## true--replace_br_with_p also fixes the problem. +nook_img_fix:true + +[mobi] +## mobi TOC cannot be turned off right now. +#include_tocpage: true + +## Each site has a section that overrides [defaults]. +## test1.com specifically is not a real story site. Instead, +## it is a fake site for testing configuration and output. It uses +## URLs like: http://test1.com?sid=12345 +[test1.com] +extratags: FanFiction,Testing + +# extracategories:Fafner +# extragenres:Romance,Fluff +# extracharacters:Reginald Smythe-Smythe,Mokona,Harry P. +# extraships:Smythe-Smythe/Mokona +# extrawarnings:Extreme Bogosity + +# extra_valid_entries:metaA,metaB,metaC,listX,listY,listZ,compositeJ,compositeK,compositeL + +# include_in_compositeJ:dateCreated +# include_in_compositeK:metaC,listX,compositeL,compositeJ,compositeK,listZ +# include_in_compositeL:ships,metaA,listZ,datePublished,dateUpdated, + +# extra_titlepage_entries: metaA,metaB,metaC,listX,listY,listZ,compositeJ,compositeK,compositeL +# extra_logpage_entries: metaA,metaB,metaC,listX,listY,listZ,compositeJ,compositeK,compositeL +# extra_subject_tags: metaA,metaB,metaC + +# replace_metadata: +# compositeL=>Val=>VALUE +# series,extratags=>Test=>Plan +# Puella Magi Madoka Magica.* => Madoka +# Comedy=>Humor +# Crossover: (.*)=>\1 +# (.*)Great(.*)=>\1Moderate\2 +# .*-Centered=> +# characters=>Harry P\.=>Harry Potter + + +## If necessary, you can define [:] sections to +## customize the formats differently for the same site. Overrides +## defaults, format and site. +[test1.com:txt] +extratags: FanFiction,Testing,Text + +[test1.com:html] +extratags: FanFiction,Testing,HTML + +[archive.skyehawke.com] + +[archiveofourown.org] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +is_adult:true + +## archiveofourown.org stories allow chapters to be added out of +## order. So the newest chapter may not be the last one. FanFicFare update +## doesn't like that. If do_update_hook is uncommented and set true, +## the adapter will discard all existing chapters from the newest one +## on when updating to enforce accurate chapters. +## Starting July 2015, FFF stores chapter URLs in the chapter files. +## Stories downloaded after that shouldn't need this setting anymore. +#do_update_hook:false + +## AO3 adapter defines a few extra metadata entries. +## If there's ever more than 4 series, add series04,series04Url etc. +extra_valid_entries:fandoms,freeformtags,freefromtags,ao3categories,comments,kudos,hits,bookmarks,collections,byline,series00,series01,series02,series03,series00Url,series01Url,series02Url,series03Url,series00HTML,series01HTML,series02HTML,series03HTML +fandoms_label:Fandoms +freeformtags_label:Freeform Tags +freefromtags_label:Freeform Tags +ao3categories_label:AO3 Categories +comments_label:Comments +kudos_label:Kudos +hits_label:Hits +collections_label:Collections +bookmarks_label:Bookmarks +series00HTML_label:Series +series01HTML_label:Additional Series +series02HTML_label:Additional Series +series03HTML_label:Additional Series + +## Assume entryUrl, apply to "%s" to +## make entryHTML. +make_linkhtml_entries:series00,series01,series02,series03 + +## AO3 doesn't have anything it calls 'genre'. The adapter used to be +## hardcoded to include the site specific metadata freeformtags & +## ao3categories in the standard metadata field genre. By making it +## configurable, users can change it. +include_in_genre: freeformtags, ao3categories + +## AO3 uses the word 'category' differently than most sites. The +## adapter used to be hardcoded to include the site specific metadata +## fandom in the standard metadata field category. By making it +## configurable, users can change it. +include_in_category:fandoms + +## freeformtags was previously typo'ed as freefromtags. This way, +## freefromtags will still work for people who've used it. +include_in_freefromtags:freeformtags + +## adds to titlepage_entries instead of replacing it. +#extra_titlepage_entries: fandoms,freeformtags,ao3categories,comments,kudos,hits,bookmarks,series01HTML,series02HTML,series03HTML,byline + +## adds to include_subject_tags instead of replacing it. +#extra_subject_tags:fandoms,freeformtags,ao3categories + +## AO3 chapters can include several different types of notes. We've +## traditionally included them all in the chapter text, but this allows +## you to customize which you include. Copy this parameter to your +## personal.ini and list the ones you don't want. +#exclude_notes:authorheadnotes,chaptersummary,chapterheadnotes,chapterfootnotes,authorfootnotes + +## AO3 is blocking people more aggressively. If you download fewer +## stories less often you can likely get by with reducing this sleep. +slow_down_sleep_time:2 + +[ashwinder.sycophanthex.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extracharacters:Severus Snape,Hermione Granger +extraships:Severus Snape/Hermione Granger + +[asr3.slashzone.org] +## Site dedicated to these categories/characters/ships +extracategories:The Sentinel + +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +[bloodshedverse.com] +## website encoding(s) In theory, each website reports the character +## encoding they use for each page. In practice, some sites report it +## incorrectly. Each adapter has a default list, usually "utf8, +## Windows-1252" or "Windows-1252, utf8", but this will let you +## explicitly set the encoding and order if you need to. The special +## value 'auto' will call chardet and use the encoding it reports if +## it has +90% confidence. 'auto' is not reliable. +website_encodings:Windows-1252,ISO-8859-1,auto + +## dateUpdate doesn't usually have time, but it does on +## bloodshedverse.com. See +## http://docs.python.org/library/datetime.html#strftime-strptime-behavior +## Note that ini format requires % to be escaped as %%. +dateUpdated_format:%%Y-%%m-%%d %%H:%%M + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:warnings,reviews +reviews_label:Reviews + +## Site dedicated to these categories/characters/ships +extracharacters:Spike,Buffy +extracategories:Buffy the Vampire Slayer + +## Strips links found in the story text +## Specific to bloodshedverse.com +strip_text_links:true + +[bloodties-fans.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Blood Ties + +[fanfic.castletv.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Castle + +[chaos.sycophanthex.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/images/.*?ribbon.gif + +[csi-forensics.com] +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +extra_valid_entries: readings +readings_label: Readings + +[dark-solace.org] +## Site dedicated to these categories/characters/ships +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +extracategories:Buffy: The Vampire Slayer +extracharacters:Buffy, Spike +extraships:Spike/Buffy + +[dramione.org] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extracharacters:Draco Malfoy,Hermione Granger +extraships:Draco Malfoy/Hermione Granger + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/images/.*?ribbon.gif + +## Some adapters collect additional meta information beyond the +## standard ones. They need to be defined in extra_valid_entries to +## tell the rest of the FanFicFare system about them. They can be used in +## include_subject_tags, titlepage_entries, extra_titlepage_entries, +## logpage_entries, extra_logpage_entries, and include_in_* config +## items. You can also add additional entries here to build up +## composite metadata entries. dramione.org, for example, adds +## 'cliches' and then defines as the composite of hermiones,dracos in +## include_in_cliches. +extra_valid_entries:themes,hermiones,dracos,timeline,cliches,read,reviews +include_in_cliches:hermiones,dracos + +## For another example, you could, by uncommenting this line, include +## themes in with genre metadata. +#include_in_genre:genre, themes + +## You can give each new valid entry a specific label for use on +## titlepage and logpage. If not defined, it will simply be the +themes_label:Themes +hermiones_label:Hermiones +dracos_label:Dracos +timeline_label:Timeline +cliches_label:Character Cliches + +## extra_titlepage_entries (and extra_logpage_entries) *add* to +## titlepage_entries (and logpage_entries) so you can add site +## specific entries to titlepage/logpage without having to copy the +## entire titlepage_entries line. (But if you want them higher than +## the end, you will need to copy titlepage_entries.) +#extra_titlepage_entries: themes,timeline,cliches +#extra_logpage_entries: themes,timeline,cliches +#extra_subject_tags: themes,timeline,cliches + +## (Plugin Only) - You can also populate calibre custom columns with +## the site specific metadata using custom_columns_settings (but only +## if 'Allow custom_columns_settings from personal.ini' is checked in +## the plugin GUI config.) There are three parts, the entry name, +## then the label of the calibre custom column, then (optionally) a +## 'mode'. 'r' to Replace any existing values, 'a' to Add to existing +## value (use with tag-like columns), and 'n' for setting on New books +## only. (Default is 'r'.) + +## Literal strings can be set into custom columns using double quotes. +## Each metadata=>column mapping must be on a separate line and each +## needs to have one space at the start of each line. + +## 'r_anthaver' and 'n_anthaver' can be used to indicate the same as +## 'r' and 'n' for normal downloads, but to average the metadata for +## the differents story in an anthology before setting in integer and +## float type custom columns. This can be useful for a averrating +## column, for example. Default is to sum the values of all stories, +## and numChapters and numWords are always summed. + +#custom_columns_settings: +# cliches=>#acolumn +# themes=>#bcolumn,a +# timeline=>#ccolumn,n +# "FanFiction"=>#collection +# averrating=>#averrating,r_anthaver + +[efiction.esteliel.de] +## Site dedicated to these categories/characters/ships +extracategories:Lord of the Rings + +[erosnsappho.sycophanthex.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/images/.*?ribbon.gif + +[fanfiction.csodaidok.hu] +## website encoding(s) In theory, each website reports the character +## encoding they use for each page. In practice, some sites report it +## incorrectly. Each adapter has a default list, usually "utf8, +## Windows-1252" or "Windows-1252, utf8", but this will let you +## explicitly set the encoding and order if you need to. The special +## value 'auto' will call chardet and use the encoding it reports if +## it has +90% confidence. 'auto' is not reliable. +website_encodings:ISO-8859-2,auto + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:reviews,challenge +reviews_label:Reviews +challenge_label:Challenge + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[fanfic.hu] +## website encoding(s) In theory, each website reports the character +## encoding they use for each page. In practice, some sites report it +## incorrectly. Each adapter has a default list, usually "utf8, +## Windows-1252" or "Windows-1252, utf8", but this will let you +## explicitly set the encoding and order if you need to. The special +## value 'auto' will call chardet and use the encoding it reports if +## it has +90% confidence. 'auto' is not reliable. +website_encodings:ISO-8859-1,auto + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[fanfiction.mugglenet.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[fanfic.potterheadsanonymous.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[fanfiction.portkey.org] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extraships:Harry Potter/Hermione Granger + +[fanfiction.tenhawkpresents.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +[fannation.shades-of-moonlight.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +extra_valid_entries: readings,romance +extra_titlepage_entries: readings,romance +readings_label: Readings +romance_label: Romance + +[fhsarchive.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +[ficwad.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +[fictionmania.tv] +## website encoding(s) In theory, each website reports the character +## encoding they use for each page. In practice, some sites report it +## incorrectly. Each adapter has a default list, usually "utf8, +## Windows-1252" or "Windows-1252, utf8", but this will let you +## explicitly set the encoding and order if you need to. The special +## value 'auto' will call chardet and use the encoding it reports if +## it has +90% confidence. 'auto' is not reliable. +website_encodings:ISO-8859-1,auto + +## items to include in the log page Empty metadata entries, or those +## that haven't changed since the last update, will *not* appear, even +## if in the list. You can include extra text or HTML that will be +## included as-is in each log entry. Eg: logpage_entries: ...,
, +## summary,
,... +## Don't include numChapters since all stories are a single "chapter", there's +## no way to reliably find the next chapter +logpage_entries: dateCreated,datePublished,dateUpdated,numChapters,numWords,status,series,title,author,description,category,genre,rating,warnings + +## items to include in the title page +## Empty metadata entries will *not* appear, even if in the list. +## You can include extra text or HTML that will be included as-is in +## the title page. Eg: titlepage_entries: ...,
,summary,
,... +## All current formats already include title and author. +## Don't include numChapters since all stories are a single "chapter", there's +## no way to reliably find the next chapter +titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numWords,site,description + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:fileName,fileSize,oldName,newName,keyWords,mainCharactersAge,readings + +## Turns all space characters into " " HTML entities to forcefully preserve +## formatting with spaces. Enabling this will blow up the filesize quite a bit +## and is probably not a good idea, unless you absolutely need the story +## formatting. +## Specific to fictionmania.tv +non_breaking_spaces:false + +[fictionpad.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +extra_valid_entries:followers,comments,views,likes,dislikes +#extra_titlepage_entries:followers,comments,views,likes,dislikes + +followers_label:Followers +comments_label:Comments +views_label:Views +likes_label:Likes +dislikes_label:Dislikes + +[finestories.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +## finestories.com has started requiring login by email rather than +## pen name. +#username:youremail@yourdomain.dom +#password:yourpassword + +## Clear FanFiction from defaults, site is original fiction. +extratags: + +extra_valid_entries:size,universe,universeUrl,universeHTML,sitetags,notice,codes,score +#extra_titlepage_entries:size,universeHTML,sitetags,notice,score +include_in_codes:sitetags + +## adds to include_subject_tags instead of replacing it. +#extra_subject_tags:sitetags + +size_label:Size +universe_label:Universe +universeUrl_label:Universe URL +universeHTML_label:Universe +sitetags_label:Site Tags +notice_label:Notice +score_label:Score + +## Assume entryUrl, apply to "%s" to +## make entryHTML. +make_linkhtml_entries:universe + +## storiesonline.net stories can be in a series or a universe, but not +## both. By default, universe will be populated in 'series' with +## index=0 +universe_as_series: true + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/css/bir.png + +[forums.spacebattles.com] +## see [base_xenforoforum] + +[forums.sufficientvelocity.com] +## see [base_xenforoforum] + +[hlfiction.net] +## Site dedicated to these categories/characters/ships +extracategories:Highlander + +[imagine.e-fic.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +[indeath.net] +## Site dedicated to these categories/characters/ships +extracategories:In Death + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/public/style_emoticons/.* + +[it-could-happen.net] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## RPF == http://en.wikipedia.org/wiki/Real_person_fiction +## Site dedicated to these categories/characters/ships +extracategories:Glee RPF +extracharacters:Darren Criss, Chris Colfer +extraships:Darren Criss/Chris Colfer + +[ksarchive.com] +## Site dedicated to these categories/characters/ships +extracategories:Star Trek +extracharacters:Kirk,Spock +extraships:Kirk/Spock + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:universe,crossoverfandom +universe_label:Universe +crossoverfandom_label:Crossover Fandom +extra_titlepage_entries:universe,crossoverfandom + +[literotica.com] +extra_valid_entries:eroticatags,averrating +eroticatags_label:Erotica Tags +averrating_label:Average Rating +extra_titlepage_entries:eroticatags,averrating + +## Extract more erotica_tags from the meta tag of each chapter +use_meta_keywords: true + +## For multiple chapter stories, attempt to clean up the chapter title. This will +## remove the story title and change "Ch. 01" to "Chapter 1", "Pt. 01" to "Part 1" +## or just use the text. If this can't be done, the full title is used. +clean_chapter_titles: false + +## Add the chapter description at the start of each chapter. +description_in_chapter: false + +[lotrfanfiction.com] +extra_valid_entries: readings +readings_label: Readings + +## Site dedicated to these categories/characters/ships +extracategories:Lord of the Rings + +[lumos.sycophanthex.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[mcstories.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Clear FanFiction from defaults, site is original fiction. +extratags:Erotica + +extra_valid_entries:eroticatags +eroticatags_label:Erotica Tags +extra_titlepage_entries: eroticatags + +[merlinfic.dtwins.co.uk] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Merlin + +[national-library.net] +## Site dedicated to these categories/characters/ships +extracategories:West Wing + +[ncisfic.com] +## Site dedicated to these categories/characters/ships +extracategories:NCIS + +[nfacommunity.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:NCIS + +[nha.magical-worlds.us] +## Site dedicated to these categories/characters/ships +extracategories:Buffy: The Vampire Slayer +extracharacters:Willow + +[ninelivesarchive.com] +## Site dedicated to these categories/characters/ships +extracategories:The Walking Dead +extracharacters:Carol,Daryl +extraships:Carol/Daryl + +[nocturnal-light.net] +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:readings,reviews +readings_label:Readings +reviews_label:Reviews + +## Site dedicated to these categories/characters/ships +extracharacters:Spike,Buffy +extracategories:Buffy the Vampire Slayer + +[occlumency.sycophanthex.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extracharacters:Severus Snape + +[onedirectionfanfiction.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:One Direction + +[pommedesang.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Anita Blake Vampire Hunter + +[ponyfictionarchive.net] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:My Little Pony: Friendship is Magic + +[pretendercentre.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:The Pretender + +[forum.questionablequesting.com] +## see [base_xenforoforum] + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +[samandjack.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Stargate: SG-1 +extracharacters:Sam,Jack +extraships:Sam/Jack + +[samdean.archive.nu] +## Site dedicated to these categories/characters/ships +extracategories:Supernatural +extracharacters:Sam,Dean +extraships:Sam/Dean + +[sheppardweir.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Stargate: Atlantis +extracharacters:John Sheppard,Elizabeth Weir +extraships:John Sheppard/Elizabeth Weir + +[spikeluver.com] +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:warnings,reviews +reviews_label:Reviews + +## Site dedicated to these categories/characters/ships +extracharacters:Spike,Buffy +extracategories:Buffy the Vampire Slayer + +[storiesonline.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +## storiesonline.net has started requiring login by email rather than +## pen name. +#username:youremail@yourdomain.dom +#password:yourpassword + +## Clear FanFiction from defaults, site is original fiction. +extratags: + +extra_valid_entries:size,universe,universeUrl,universeHTML,sitetags,notice,codes,score +#extra_titlepage_entries:size,universeHTML,sitetags,notice,score +include_in_codes:sitetags + +## adds to include_subject_tags instead of replacing it. +#extra_subject_tags:sitetags + +size_label:Size +universe_label:Universe +universeUrl_label:Universe URL +universeHTML_label:Universe +sitetags_label:Site Tags +notice_label:Notice +score_label:Score + +## Assume entryUrl, apply to "%s" to +## make entryHTML. +make_linkhtml_entries:universe + +## storiesonline.net stories can be in a series or a universe, but not +## both. By default, universe will be populated in 'series' with +## index=0 +universe_as_series: true + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/css/bir.png + +[tgstorytime.com] +## Site dedicated to these categories/characters/ships +extracategories:Transgender + +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. +#is_adult:true + +## This site has a number of additional site specific metadata +## entries. This is the first test case of base_efiction 'Auto +## metadata' automatically including unrecognized metadata. Still +## requires entries in extra_valid_entries to be used. +extra_valid_entries:turnedinto,featureditems,locale,motivationforchange,sexualorientation,storytheme,bodymodification,personality,storytype,typeofchange +#add_to_titlepage_entries:,turnedinto,featureditems,locale,motivationforchange,sexualorientation,storytheme,bodymodification,personality,storytype,typeofchange + +turnedinto_label:Turned Into +featureditems_label:Featured Items +locale_label:Locale +motivationforchange_label:Motivation for Change +sexualorientation_label:Sexual Orientation +storytheme_label:Story Theme +bodymodification_label:Body Modification +personality_label:Personality +storytype_label:Story Type +typeofchange_label:Type of Change + +[thehexfiles.net] +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extracharacters:Draco Malfoy,Harry Potter +extraships:Harry Potter/Draco Malfoy + +[thehookupzone.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Criminal Minds + +[themaplebookshelf.com] +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +extra_valid_entries: readings,challenge +extra_titlepage_entries: readings,challenge +challenge_label: Challenge +readings_label: Readings + +[themasque.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +[tolkienfanfiction.com] +## Site dedicated to these categories/characters/ships +extracategories:Lord of the Rings + +[trekiverse.org] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Star Trek + +extra_valid_entries:readings,awards +extra_titlepage_entries:readings,awards +awards_label:Awards +readings_label:Readings + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:art/.*Awards.jpg + +[voracity2.e-fic.com] +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:reviews,readings +reviews_label:Reviews +readings_label:Readings + +[www.adastrafanfic.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Star Trek + +[www.dracoandginny.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extracharacters:Draco Malfoy,Ginny Weasley +extraships:Draco Malfoy/Ginny Weasley + +[www.thealphagate.com] +## Site dedicated to these categories/characters/ships +extracategories:Stargate: SG-1 + +[www.destinysgateway.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +[www.dokuga.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:InuYasha +extracharacters:Sesshoumaru,Kagome +extraships:Sesshoumaru/Kagome + +[www.efpfanfic.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:notes,context,type +notes_label:Notes +context_label:Context +type_label:Type of Couple + +[www.fanfiction.net] +user_agent: +## fanfiction.net's 'cover' images are really just tiny thumbnails. +## Set this to true to never use them. +#never_make_cover: false + +## exclude fanfiction.net imageu (old user vs story detect) and +## default user (d_60_90) +cover_exclusion_regexp:(/imageu/|d_60_90\.jpg) + +## April 2015, ffnet changed their story and user pictures urls to be +## the same. Now the only way to know if the story image is really +## the author image is to go get the author image and check. +skip_author_cover:true + +## fanfiction.net is blocking people more aggressively. If you +## download fewer stories less often you can likely get by with +## reducing this sleep. +slow_down_sleep_time:10 + +## ffnet is sensitive to too many hits. Users are sensitive to long +## waits during the initial metadata collection in the foreground. +## When used, these settings will speed up metadata downloads in the +## foreground linearly. +tweak_fg_sleep:true +min_fg_sleep:10.0 +max_fg_sleep:20.0 +max_fg_sleep_at_downloads: 10 + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:reviews,favs,follows + +## ffnet uses 'Pairings', not 'Relationship', stating they don't have +## to be romantic pairings. +ships_label:Pairings + +## Date formats used by FanFicFare. Published and Update don't usually have +## time, but they do now on ffnet. +## See http://docs.python.org/library/datetime.html#strftime-strptime-behavior +## Note that ini format requires % to be escaped as %%. +#dateCreated_format:%%Y-%%m-%%d %%H:%%M:%%S +datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S +dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S + +## ffnet used to have a tendency to send out update notices in email +## before all their servers were showing the update on the first +## chapter. It generates another server request and doesn't seem to +## be needed lately, so now default it to off. +check_next_chapter:false + +[www.fanfiktion.de] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +[www.ficbook.net] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +[www.fictionalley.org] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +## fictionalley.org doesn't have a status metadatum. If uncommented, +## this will be used for status. +#default_value_status:Unknown + +[www.fictionpress.com] +user_agent: +## Clear FanFiction from defaults, fictionpress.com is original fiction. +extratags: + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:reviews,favs,follows + +## fanfiction.net shows the user's +cover_exclusion_regexp:(/imageu/|d_60_90\.jpg) + +## fanfiction.net is blocking people more aggressively. If you +## download fewer stories less often you can likely get by with +## reducing this sleep. +slow_down_sleep_time:4 + +## Date formats used by FanFicFare. Published and Update don't usually have +## time, but they do now on ffnet. +## See http://docs.python.org/library/datetime.html#strftime-strptime-behavior +## Note that ini format requires % to be escaped as %%. +#dateCreated_format:%%Y-%%m-%%d %%H:%%M:%%S +datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S +dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S + +[www.fimfiction.net] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## fimfiction.net stories can be locked requiring individual +## passwords. If fail_on_password is set, the downloader will fail +## when a password is required rather than prompting every time. +#fail_on_password: false + +## fimfiction.net stories allow chapters to be added out of order. So +## the newest chapter may not be the last one. FanFicFare update doesn't +## like that. If do_update_hook is uncommented and set true, the +## adapter will discard all existing chapters from the newest one on +## when updating to enforce accurate chapters. +#do_update_hook:false + +## fimfiction.net is reported to misinterprete some BBCode with +## blockquotes incorrectly. This fixes those instances and defaults +## to on, but can be switched off if it is found to cause problems. +fix_fimf_blockquotes:true + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/images/emoticons/ + +## Site dedicated to these categories/characters/ships +extracategories:My Little Pony: Friendship is Magic + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:likes,dislikes,views,total_views,short_description,groups,groupsUrl,groupsHTML,prequel,prequelUrl,prequelHTML,sequels,sequelsUrl,sequelsHTML,comment_count,coverSource,coverSourceUrl,coverSourceHTML +likes_label:Likes +dislikes_label:Dislikes +views_label:Highest Single Chapter Views +total_views_label:Total Views +short_description_label:Short Summary +groups_label:Groups +groupsUrl_label:Groups URLs +groupsHTML_label:Groups +prequel_label:Prequel +prequelUrl_label:Prequel URL +prequelHTML_label:Prequel +sequels_label:Sequels +sequelsUrl_label:Sequel URLs +sequelsHTML_label:Sequels +comment_count_label:Comment Count +coverSource_label:Cover Source +coverSourceUrl_label:Cover Source URL +coverSourceHTML_label:Cover Source + +keep_in_order_sequels:true +keep_in_order_sequelsUrl:true +keep_in_order_groups:true +keep_in_order_groupsUrl:true + +## Assume entryUrl, apply to "%s" to +## make entryHTML. +make_linkhtml_entries:prequel,sequels,groups,coverSource + +[www.harrypotterfanfiction.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[www.hpfandom.net] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +extra_valid_entries:reads,reviews +reads_label:Total Read Count + +[www.hpfanficarchive.com] +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[www.ik-eternal.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:InuYasha +extracharacters:InuYasha,Kagome +extraships:InuYasha/Kagome + +[www.libraryofmoria.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Lord of the Rings + +[www.masseffect2.in] +## Site dedicated to this fandom. +extracategories: Mass Effect + +## Ucoz.com engine, upon which MassEffect2.in is based, imposes an unspecified limit on request frequency. +## Reports vary from `5 requests per second' to `2 requests per second for more than 10 per minute'. +## With default settings, a several-hours IP ban may follow, so set it higher. +slow_down_sleep_time: 2 + +## Whether to exclude editor signature from the bottom of chapter text. +exclude_editor_signature: false + +## Stories on the site almost never have cover image, and for the stories which do, +## this may be adjusted in `personal.ini' before downloading. +never_make_cover: true + +## Titles for ratings identified by 1- or 2-letter codes from `ERATING system' +## (`система Р.Е.Й.Т.И.Н.Г.'). MassEffect2.in and some other sites adopted it, +## but changed titles and update them occasionally. +rating_titles: R=RESTRICTED (16+), E=EXEMPT (18+), I=ART HOUSE, T=To every, A=IN=Иной мир, Nn=Новый мир, G=О\, Господи! +adult_ratings: E,R + +[www.mediaminer.org] +dateUpdated_format:%%Y-%%m-%%d %%H:%%M:%%S +## Note that mediaminer doesn't give datePublished on the story's +## index page--it's collected from the earliest uploaded chapter. So +## it's not available when only fetching metadata. +datePublished_format:%%Y-%%m-%%d %%H:%%M:%%S + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/img/rss.png + +[www.midnightwhispers.ca] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Queer as Folk + +## some sites include images that we don't ever want becoming the +## cover image. This lets you exclude them. +cover_exclusion_regexp:/stories/999/images/.*?_trophy.png + +[www.ncisfiction.net] +## Site dedicated to these categories/characters/ships +extracategories:NCIS + +[www.phoenixsong.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## phoenixsong.net, oddly, can have high rated chapters (login +## required) in the middle of a lower rated story. Use this to force +## FanFicFare to always login to phoenixsong.net so those stories download +## correctly. If you have a login, this is recommended. +#force_login:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extraships:Harry Potter/Ginny Weasley + +[www.potionsandsnitches.org] +extra_valid_entries:stars,reviews,reads,takesplaces,snapeflavours,sitetags +stars_label:Frogs +takesplaces_label:Takes Place +snapeflavours_label:Snape Flavour +sitetags_label:Site Tags + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +add_to_include_subject_tags:,takesplaces,snapeflavours,sitetags +#add_to_extra_titlepage_entries:,stars,reviews,reads,takesplaces,snapeflavours,sitetags + +[www.potterfics.com] +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter + +[www.psychfic.com] +## Site dedicated to these categories/characters/ships +extracategories:Psych + +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +[www.qaf-fic.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Queer as Folk + +[quotev.com] +extra_valid_entries:pages,readers,reads,favorites,searchtags,comments +pages_label:Pages +readers_label:Readers +reads_label:Reads +favorites_label:Favorites +searchtags_label:Search Tags +comments_label:Comments + +include_in_category:category,searchtags + +[www.restrictedsection.org] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extragenres:Erotica + +[www.scarvesandcoffee.net] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Glee +extracharacters:Kurt Hummel,Blaine Anderson + +[www.sinful-desire.org] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Supernatural + +[www.siye.co.uk] +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extracharacters:Harry Potter,Ginny Weasley +extraships:Harry Potter/Ginny Weasley + +[www.squidge.org/peja] +## www.squidge.org/peja calls it Fandom +category_label:Fandom + +## Remove numWords -- www.squidge.org/peja word counts are inaccurate +titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,site,description + +[www.squidge.org/peja:txt] +## Add URLs since there aren't links and remove numWords -- +## www.squidge.org/peja word counts are inaccurate +titlepage_entries: series,seriesUrl,category,genre,language,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,site,storyUrl, authorUrl, description + +[www.storiesofarda.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Lord of the Rings + +[www.thepetulantpoetess.com] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +[www.twcslibrary.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Some sites also require the user to confirm they are adult for +## adult content. In commandline version, this should go in your +## personal.ini, not defaults.ini. +#is_adult:true + +## twcslibrary.net (ab)uses series as personal reading lists. +collect_series: false + +[www.tthfanfic.org] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## tth is a little unusual--it doesn't require user/pass, but the site +## keeps track of which chapters you've read and won't send another +## update until it thinks you're up to date. This way, on download, +## it thinks you're up to date. +#username:YourName +#password:yourpassword + +## TtH uses 'category' Buffy-Centered, Xander-Centered, etc. If +## centeredcat_to_characters:true, they will not be included in the +## category list and Buffy, Xander, etc will instead be included in +## the characters list. +centeredcat_to_characters:true + +## TtH uses 'category' Pairing: Dawn, Pairing: Willow, etc, but only +## if there's already been a -Centered category, like Xander-Centered. +## If pairingcat_to_characters_ships:true, Pairing: Whomever will not +## be included in the category list and Dawn, Willow, etc will instead +## be included in the characters list *and* an entry added to the +## ships list for Centered character / Pairing character. IE, +## category: Xander-Centered, Pairing: Dawn becomes characters: +## Xander, Dawn and ships: Xander/Dawn. +pairingcat_to_characters_ships:true + +## TtH uses 'category' Romance followed by a pairing 'category', such +## as Romance > Buffy/Spike. If romancecat_to_characters_ships:true, +## Romance will still be added to category, but Buffy/Spike will +## instead be added to characters Buffy, Spike and ships Buffy/Spike +romancecat_to_characters_ships:true + +[www.twilightarchives.com] +## Site dedicated to these categories/characters/ships +extracategories:Twilight + +[www.twilighted.net] +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Twilight + +## twilighted.net (ab)uses series as personal reading lists. +collect_series: false + +[www.walkingtheplank.org] +extra_valid_entries:reads +reads_label:Read Count + +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Harry Potter +extracharacters:Severus Snape,Harry Potter +extraships:Severus Snape/Harry Potter + +[www.whofic.com] + +[www.wolverineandrogue.com] +## Site dedicated to these categories/characters/ships +extracategories:X-Men Movie +extracharacters:Wolverine,Rogue + +[www.wraithbait.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Site dedicated to these categories/characters/ships +extracategories:Stargate: Atlantis + +extra_valid_entries:reviews +reviews_label:Reviews + +[buffygiles.velocitygrass.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracharacters:Buffy,Giles + +[fanfiction.lucifael.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +[www.andromeda-web.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Andromeda + +[www.artemis-fowl.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +## Site dedicated to these categories/characters/ships +extracategories:Artemis Fowl + +[www.naiceanilme.net] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + +## Some sites require login (or login for some rated stories) The +## program can prompt you, or you can save it in config. In +## commandline version, this should go in your personal.ini, not +## defaults.ini. +#username:YourName +#password:yourpassword + +[overrides] +## It may sometimes be useful to override all of the specific format, +## site and site:format sections in your private configuration. For +## example, this extratags param here would override all of the +## extratags params in all other sections. Only commandline options +## beat overrides. +#extratags:fanficdownloader + + +[teststory:defaults] +valid_entries:title,author_list,authorId_list,authorUrl_list,storyUrl, + datePublished,dateUpdated,numWords,status,language,series,seriesUrl, + rating,category_list,genre_list,warnings_list,characters_list,ships_list, + description,site,extratags + +# {{storyId}} is a special case--it's the only one that works. +title:Test Story Title {{storyId}} +author_list:Test Author aa +authorId_list:1 +authorUrl_list:http://test1.com?authid=1 +storyUrl:http://test1.com?sid={{storyId}} +datePublished:1975-03-15 +dateUpdated:1975-04-15 +numWords:123,456 +status:In-Progress +language:English + +chaptertitles:Prologue + +## Add additional sections with different numbers to get different +## parameters for different story urls. +## test1.com?sid=1000 +[teststory:1000] +# note the leading commas when doing add_to_ with valid_entries and *_list +add_to_valid_entries:,favs +title:Testing New Feature {{storyId}} +author_list:Bob Smith +authorId_list:45 +authorUrl_list:http://test1.com?authid=45 +datePublished:2013-03-15 +dateUpdated:2013-04-15 +numWords:1456 +favs:56 +series:The Great Test [4] +seriesUrl:http://test1.com?seriesid=1 +rating:Tweenie +category_list:Harry Potter,Furbie,Crossover,Puella Magi Madoka Magica/魔法少女まどか★マギカ,Magical Girl Lyrical Nanoha +genre_list:Fantasy,Comedy,Sci-Fi,Noir +warnings_list:Swearing,Violence +characters_list:Bob Smith,George Johnson,Fred Smythe + +chaptertitles:Prologue,Chapter 1\, Xenos on Cinnabar,Chapter 2\, Sinmay on Kintikin,3. Chapter 3 + diff --git a/root/config.default/fanfiction_file b/root/config.default/fanfiction_file new file mode 100644 index 0000000..e69de29 diff --git a/root/config.default/personal.ini b/root/config.default/personal.ini new file mode 100644 index 0000000..08c773e --- /dev/null +++ b/root/config.default/personal.ini @@ -0,0 +1,140 @@ +## This is an example of what your personal configuration might look +## like. Uncomment options by removing the '#' in front of them. + +[defaults] +## [defaults] section applies to all formats and sites but may be +## overridden at several levels. Example: + +## [defaults] +## titlepage_entries: category,genre, status +## [www.whofic.com] +## # overrides defaults. +## titlepage_entries: category,genre, status,dateUpdated,rating +## [epub] +## # overrides defaults & site section +## titlepage_entries: category,genre, status,datePublished,dateUpdated,dateCreated +## [www.whofic.com:epub] +## # overrides defaults, site section & format section +## titlepage_entries: category,genre, status,datePublished +## [overrides] +## # overrides all other sections +## titlepage_entries: category + +## Some sites also require the user to confirm they are adult for +## adult content. Uncomment by removing '#' in front of is_adult. +is_adult:true + +## Don't like the numbers at the start of chapter titles on some +## sites? You can use strip_chapter_numbers to strip them off. Just +## want to make them all look the same? Strip them off, then add them +## back on with add_chapter_numbers. Don't like the way it strips +## numbers or adds them back? See chapter_title_strip_pattern and +## chapter_title_add_pattern. +#strip_chapter_numbers:true +#add_chapter_numbers:true + +## Add this to genre if there's more than one category. +#add_genre_when_multi_category: Crossover + +[epub] +## include images from img tags in the body and summary of stories. +## Images will be converted to jpg for size if possible. Images work +## in epub format only. To get mobi or other format with images, +## download as epub and use Calibre to convert. +include_images:true + +## If not set, the summary will have all html stripped for safety. +## Both this and include_images must be true to get images in the +## summary. +#keep_summary_html:true + +## If set, the first image found will be made the cover image. If +## keep_summary_html is true, any images in summary will be before any +## in chapters. +make_firstimage_cover:true + +## Resize images down to width, height, preserving aspect ratio. +## Nook size, with margin. +#image_max_size: 580, 725 + +## Change image to grayscale, if graphics library allows, to save +## space. +#grayscale_images: false + + +## Most common, I expect will be using this to save username/passwords +## for different sites. Here are a few examples. See defaults.ini +## for the full list. + +[www.twilighted.net] +#username:YourPenname +#password:YourPassword +## default is false +#collect_series: true + +[ficwad.com] +#username:YourUsername +#password:YourPassword + +[www.adastrafanfic.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. +#is_adult:true + +[www.fictionalley.org] +#is_adult:true + +[www.harrypotterfanfiction.com] +#is_adult:true + +[www.fimfiction.net] +#is_adult:true +#fail_on_password: false + +[www.tthfanfic.org] +#is_adult:true +## tth is a little unusual--it doesn't require user/pass, but the site +## keeps track of which chapters you've read and won't send another +## update until it thinks you're up to date. This way, on download, +## it thinks you're up to date. +#username:YourName +#password:yourpassword + +[www.fanfiction.net] +check_next_chapter:true +skip_author_cover:false +user_agent:Mozilla/5.0 +continue_on_chapter_error:false +# for use with the workaround +#use_nsapa_proxy:true +#use_cloudscraper:false +use_flaresolverr_proxy:true +# option settings, these are the defaults: +flaresolverr_proxy_address:localhost +flaresolverr_proxy_port:8191 +flaresolverr_proxy_protocol:http + +## This option if uncommented, will put a box around the spoiler +## blocks with the original spoiler button text as a label using +## fieldset and legend HTML tags. For a simple box, see the +## add_to_output_css example for [base_xenforoforum:epub]. +#legend_spoilers:true + + +## This section will override anything in the system defaults or other +## sections here. +[overrides] +## default varies by site. Set true here to force all sites to +## collect series. +#collect_series: true + +# Change oneshot to ['Completed'] to ['Completed','Oneshot'] only when +# numChapters is exactly 1. +# with ',' instead of '\,' it would be ['Completed'] to +# ['Completed,Oneshot']--one string instead of two. +add_to_replace_metadata: + oneshot=>Completed=>Completed\,Oneshot&&numChapters=>^1$ + + + + diff --git a/root/etc/cont-init.d/05-default-confs b/root/etc/cont-init.d/05-default-confs new file mode 100644 index 0000000..1b76fac --- /dev/null +++ b/root/etc/cont-init.d/05-default-confs @@ -0,0 +1,25 @@ +#!/usr/bin/with-contenv sh + +if ! [ -f "/config/config.ini" ] +then + echo "[default-confs] restoring default 'config.ini'." + cp /config.default/config.ini /config/ +fi + +if ! [ -f "/config/defaults.ini" ] +then + echo "[default-confs] restoring default 'defaults.ini'." + cp /config.default/defaults.ini /config/ +fi + +if ! [ -f "/config/personal.ini" ] +then + echo "[default-confs] restoring default 'personal.ini'." + cp /config.default/personal.ini /config/ +fi + +if ! [ -f "/config/fanfiction_file" ] +then + echo "[default-confs] restoring default 'fanfiction_file'." + cp /config.default/fanfiction_file /config/ +fi \ No newline at end of file diff --git a/root/etc/cont-init.d/90-user-permissions b/root/etc/cont-init.d/90-user-permissions new file mode 100644 index 0000000..c449b3b --- /dev/null +++ b/root/etc/cont-init.d/90-user-permissions @@ -0,0 +1,10 @@ + +#!/usr/bin/with-contenv bash + +groupmod -o -g "$PGID" abc +usermod -o -u "$PUID" abc + +chown -R abc:abc /app +chown -R abc:abc /config + +chmod +x /app/run.sh \ No newline at end of file diff --git a/root/etc/cont-init.d/99-init.d-finish b/root/etc/cont-init.d/99-init.d-finish new file mode 100644 index 0000000..b968246 --- /dev/null +++ b/root/etc/cont-init.d/99-init.d-finish @@ -0,0 +1,11 @@ +#!/usr/bin/with-contenv sh + +echo " +UID/GID +--------------------------------------- +User uid: $(id -u abc) +User gid: $(id -g abc) +--------------------------------------- + +Image Made By: MrTyton +" \ No newline at end of file diff --git a/root/etc/services.d/ffdl/run b/root/etc/services.d/ffdl/run new file mode 100644 index 0000000..f2732d0 --- /dev/null +++ b/root/etc/services.d/ffdl/run @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv bash + +sleep 30s +exec s6-setuidgid abc /app/run.sh \ No newline at end of file