Loading bin/pyggle +9 −1 Original line number Diff line number Diff line Loading @@ -548,6 +548,9 @@ if __name__ == "__main__": action="store_true", help="Store captions as EXIF comments (IN-PLACE EDIT)", ) parser.add_argument( "--cdn", metavar="URL", type=str, help="Load JS and CSS from URL/{css,js}" ) parser.add_argument( "--edit-in-place", action="store_true", Loading Loading @@ -617,11 +620,16 @@ if __name__ == "__main__": base_dir = "/".join(os.path.realpath(sys.argv[0]).split("/")[:-2]) if not args.cdn: copy_files(f"{base_dir}/share") with open(f"{base_dir}/share/html_start", "r") as f: html_buf = f.read().replace("<!-- $title -->", args.title) if args.cdn: html_buf = html_buf.replace('href=".data/css/"', f'href="{args.cdn}/css/') html_buf = html_buf.replace('src=".data/js/"', f'sc="{args.cdn}/js/') if args.html_include: with open(args.html_include, "r") as f: html_buf += f.read() Loading Loading
bin/pyggle +9 −1 Original line number Diff line number Diff line Loading @@ -548,6 +548,9 @@ if __name__ == "__main__": action="store_true", help="Store captions as EXIF comments (IN-PLACE EDIT)", ) parser.add_argument( "--cdn", metavar="URL", type=str, help="Load JS and CSS from URL/{css,js}" ) parser.add_argument( "--edit-in-place", action="store_true", Loading Loading @@ -617,11 +620,16 @@ if __name__ == "__main__": base_dir = "/".join(os.path.realpath(sys.argv[0]).split("/")[:-2]) if not args.cdn: copy_files(f"{base_dir}/share") with open(f"{base_dir}/share/html_start", "r") as f: html_buf = f.read().replace("<!-- $title -->", args.title) if args.cdn: html_buf = html_buf.replace('href=".data/css/"', f'href="{args.cdn}/css/') html_buf = html_buf.replace('src=".data/js/"', f'sc="{args.cdn}/js/') if args.html_include: with open(args.html_include, "r") as f: html_buf += f.read() Loading