Browse Source

added readme todo, removed print statements

master
rra 5 years ago
parent
commit
b9c228ed73
  1. 5
      README.md
  2. 4
      page_metadata.py

5
README.md

@ -8,7 +8,10 @@ It calculates the weight of the HTML page including all image media and returns
it currently is tailored to https://solar.lowtechmagazine.com and needs work in the following areas: it currently is tailored to https://solar.lowtechmagazine.com and needs work in the following areas:
* add options to show file name and generation time * add options to show file name and generation time
* properly handle subsites plugin (currently it only works for dither+subsites)* make sure it works with --relative-urls flag * properly handle subsites plugin (currently it only works for dither+subsites)
* make sure it works with --relative-urls flag
* handle static assets
## Use: ## Use:
To enable the plugin add it to the `PLUGINS` list in `pelicanconf.py`. To enable the plugin add it to the `PLUGINS` list in `pelicanconf.py`.

4
page_metadata.py

@ -113,9 +113,9 @@ def generate_metadata(path, context):
else: else:
file_name = m.replace(context['SITEURL']+'/', '') file_name = m.replace(context['SITEURL']+'/', '')
m = os.path.join(output_path, file_name.strip('/')) m = os.path.join(output_path, file_name.strip('/'))
print(m) #print(m)
if os.path.exists(m): if os.path.exists(m):
print(m, 'exists') #print(m, 'exists')
media_size = media_size + os.path.getsize(m) media_size = media_size + os.path.getsize(m)
current_file = os.path.join(output_path, output_file) current_file = os.path.join(output_path, output_file)

Loading…
Cancel
Save