From a6c551ee1be8dfc2c4e54965ade5e9c2c34d45e9 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 16 Apr 2018 11:31:18 -0500 Subject: [PATCH] Add/Update some comments to rikkitp's changes. --- fanficfare/adapters/adapter_lightnovelgatecom.py | 2 +- fanficfare/adapters/adapter_webnovelcom.py | 2 +- fanficfare/dateutils.py | 2 ++ fanficfare/htmlcleanup.py | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fanficfare/adapters/adapter_lightnovelgatecom.py b/fanficfare/adapters/adapter_lightnovelgatecom.py index 5ac567e9..87ec82cb 100644 --- a/fanficfare/adapters/adapter_lightnovelgatecom.py +++ b/fanficfare/adapters/adapter_lightnovelgatecom.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2017 FanFicFare team +# Copyright 2018 FanFicFare team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/fanficfare/adapters/adapter_webnovelcom.py b/fanficfare/adapters/adapter_webnovelcom.py index de9ee7ec..11f27304 100644 --- a/fanficfare/adapters/adapter_webnovelcom.py +++ b/fanficfare/adapters/adapter_webnovelcom.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2014 Fanficdownloader team, 2017 FanFicFare team +# Copyright 2014 Fanficdownloader team, 2018 FanFicFare team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/fanficfare/dateutils.py b/fanficfare/dateutils.py index d57291b7..5046abed 100644 --- a/fanficfare/dateutils.py +++ b/fanficfare/dateutils.py @@ -2,6 +2,8 @@ from datetime import datetime, timedelta UNIX_EPOCHE = datetime.fromtimestamp(0) +## Currently used by adapter_webnovelcom & adapter_wwwnovelallcom + def parse_relative_date_string(string_): # Keep this explicit instead of replacing parentheses in case we discover a format that is not so easily # translated as a keyword-argument to timedelta. In practice I have only observed hours, weeks and days diff --git a/fanficfare/htmlcleanup.py b/fanficfare/htmlcleanup.py index ddeb98e5..3ae44553 100644 --- a/fanficfare/htmlcleanup.py +++ b/fanficfare/htmlcleanup.py @@ -119,6 +119,10 @@ def removeEntities(text): # < < and & are the only html entities allowed in xhtml, put those back. return text.replace('&', '&').replace('&lt', '<').replace('&gt', '>') +## Currently used(optionally) by adapter_lightnovelgatecom and +## adapter_wwwnovelallcom only. I hesitate to put the option in +## base_adapter.make_soup for all adapters due to concerns about it +## maybe breaking metadata parsing as it changes tags. def fix_excess_space(text): # For easier extra space removing (when combining p an br) text = removeEntities(text)