From bd046c6a76988b2745fbb4044ee9287b3e188cb0 Mon Sep 17 00:00:00 2001 From: Philipp Winter Date: Sat, 9 Mar 2024 22:38:01 -0600 Subject: [PATCH] Delete now-unused files. --- Makefile | 19 --- assets/author-icon.svg | 1 - assets/author-reverse-icon.svg | 1 - assets/donate-icon.svg | 1 - assets/file-icon.svg | 1 - assets/lock-icon.svg | 1 - assets/year-icon.svg | 1 - assets/year-reverse-icon.svg | 1 - docs/index.html | 1 - favicon.svg | 59 --------- fetch_pdfs.py | 100 --------------- footer.tpl | 7 -- header.tpl | 219 --------------------------------- open-access.svg | 99 --------------- 14 files changed, 511 deletions(-) delete mode 100644 Makefile delete mode 100644 assets/author-icon.svg delete mode 100644 assets/author-reverse-icon.svg delete mode 100644 assets/donate-icon.svg delete mode 100644 assets/file-icon.svg delete mode 100644 assets/lock-icon.svg delete mode 100644 assets/year-icon.svg delete mode 100644 assets/year-reverse-icon.svg delete mode 100644 docs/index.html delete mode 100644 favicon.svg delete mode 100755 fetch_pdfs.py delete mode 100644 footer.tpl delete mode 100644 header.tpl delete mode 100644 open-access.svg diff --git a/Makefile b/Makefile deleted file mode 100644 index 5166372..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -define LATEX_CODE -\\documentclass{article} -\\usepackage[top=2cm,bottom=2.5cm,left=2cm,right=2cm]{geometry} -\\usepackage[backend=biber]{biblatex} -\\addbibresource{references.bib} -\\begin{document} -\\nocite{*} -\\printbibliography -\\end{document} -endef - -export LATEX_CODE - -test: - TMP_FILE=$$(mktemp "censorbib-tmp-XXXXXXX.tex") ;\ - echo "$$LATEX_CODE" > "$$TMP_FILE" ;\ - pdflatex --interaction=batchmode "$${TMP_FILE%.tex}" ;\ - biber "$${TMP_FILE%.tex}" ;\ - rm "$${TMP_FILE%.tex}"* ; diff --git a/assets/author-icon.svg b/assets/author-icon.svg deleted file mode 100644 index d3b0a1f..0000000 --- a/assets/author-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/author-reverse-icon.svg b/assets/author-reverse-icon.svg deleted file mode 100644 index 8321cc9..0000000 --- a/assets/author-reverse-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/donate-icon.svg b/assets/donate-icon.svg deleted file mode 100644 index e13015b..0000000 --- a/assets/donate-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/file-icon.svg b/assets/file-icon.svg deleted file mode 100644 index c581e8f..0000000 --- a/assets/file-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/lock-icon.svg b/assets/lock-icon.svg deleted file mode 100644 index 19dfa22..0000000 --- a/assets/lock-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/year-icon.svg b/assets/year-icon.svg deleted file mode 100644 index 565af50..0000000 --- a/assets/year-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/year-reverse-icon.svg b/assets/year-reverse-icon.svg deleted file mode 100644 index 71dbcdd..0000000 --- a/assets/year-reverse-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 3b18e51..0000000 --- a/docs/index.html +++ /dev/null @@ -1 +0,0 @@ -hello world diff --git a/favicon.svg b/favicon.svg deleted file mode 100644 index 1e3ba38..0000000 --- a/favicon.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - CB - - diff --git a/fetch_pdfs.py b/fetch_pdfs.py deleted file mode 100755 index 49967ae..0000000 --- a/fetch_pdfs.py +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright 2015 Philipp Winter -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -""" -Fetch pdf and ps files in BibTeX file. -""" - -import os -import sys -import errno -import urllib.request - -import pybtex.database.input.bibtex as bibtex - - -def download_pdf(url, file_name): - """ - Download file and write it to given file name. - """ - - print("Now fetching %s" % url) - - try: - req = urllib.request.Request(url, headers={'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36"}) - fetched_file = urllib.request.urlopen(req) - except Exception as err: - print(url, err, file=sys.stderr) - return - - with open(file_name, "wb") as fd: - fd.write(fetched_file.read()) - - -def main(file_name, output_dir): - """ - Extract BibTeX key and URL, and then trigger file download. - """ - - parser = bibtex.Parser() - bibdata = parser.parse_file(file_name) - - # Create download directories. - - try: - os.makedirs(os.path.join(output_dir, "pdf")) - os.makedirs(os.path.join(output_dir, "ps")) - except OSError as exc: - if exc.errno == errno.EEXIST: - pass - else: - raise - - # Iterate over all BibTeX entries and trigger download if necessary. - - for bibkey in bibdata.entries: - - entry = bibdata.entries[bibkey] - url = entry.fields.get("url") - if url is None: - continue - - # Extract file name extension and see what we are dealing with. - - _, ext = os.path.splitext(url) - if ext: - ext = ext[1:] - - if ext not in ["pdf", "ps"]: - continue - - file_name = os.path.join(output_dir, ext, bibkey + ".%s" % ext) - if os.path.exists(file_name): - continue - - download_pdf(url, file_name) - - return 0 - - -if __name__ == "__main__": - - if len(sys.argv) != 3: - print("\nUsage: %s FILE_NAME OUTPUT_DIR\n" % sys.argv[0], - file=sys.stderr) - sys.exit(1) - - sys.exit(main(sys.argv[1], sys.argv[2])) diff --git a/footer.tpl b/footer.tpl deleted file mode 100644 index 10d642a..0000000 --- a/footer.tpl +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/header.tpl b/header.tpl deleted file mode 100644 index 3514449..0000000 --- a/header.tpl +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - The Internet censorship bibliography - - - - - - -
- -
- -
-

Selected Research Papers
in Internet Censorship

-
- -
- -
- CensorBib is an online archive of selected research papers in the field - of Internet censorship. Most papers on CensorBib approach the topic - from a technical angle, by proposing designs that circumvent censorship - systems, or by measuring how censorship works. The icons next to each - paper make it easy to download, cite, and link to papers. If you think - I missed a paper, - let me know. - You can sort papers by - year, - reverse year (default), - author, and - reverse author. - Finally, the - net4people/bbs forum - has reading groups for many of the papers listed below. -
- - - -
- -
- -
- -
-
-
- -
- Are you a researcher? If so, you may like my book - Research Power Tools. -
-
- -
- -
- - diff --git a/open-access.svg b/open-access.svg deleted file mode 100644 index 209cac0..0000000 --- a/open-access.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - -image/svg+xml \ No newline at end of file