{"id":17030349,"url":"https://github.com/vsoch/thesis","last_synced_at":"2025-04-12T12:12:02.134Z","repository":{"id":57475118,"uuid":"64349033","full_name":"vsoch/thesis","owner":"vsoch","description":"html generator for a latex (zipped) thesis from Overleaf","archived":false,"fork":false,"pushed_at":"2021-04-22T03:55:32.000Z","size":16738,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T06:51:12.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://vsoch.github.io/thesis","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-27T23:43:48.000Z","updated_at":"2021-12-24T01:34:34.000Z","dependencies_parsed_at":"2022-09-10T02:23:35.830Z","dependency_job_id":null,"html_url":"https://github.com/vsoch/thesis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fthesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fthesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fthesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsoch%2Fthesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsoch","download_url":"https://codeload.github.com/vsoch/thesis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565077,"owners_count":21125417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:06:25.496Z","updated_at":"2025-04-12T12:12:02.110Z","avatar_url":"https://github.com/vsoch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Thesis HTML Generator\n====================\n\nThis simple Dockerfile will take an Overleaf extracted thesis (a zip file with some main.tex file, images, etc.) and use [hdlatex](http://tug.org/tex4ht/) (and [docs](https://github.com/vsoch/thesis/raw/master/img/gurari.pdf)) to render a simple HTML view for reading the thesis. The installation of latex, etc. and the generation of the static files is done via Docker so the user does not need to worry about installing dependencies. The idea is that if you fork the repo, you can then push the files to your gh-pages branch and **wha-la** you have your thesis as a simple website for sharing!\n\n### Instructions\n\nFirst, fork the repo to your Github by clicking on the fork button. Then clone the repo.\n\n      git clone https://www.github.com/{{username}}/thesis\n      cd thesis\n      \nNext, you need to download your thesis in zip format from Overleaf. They have a nice button to do this:\n\n![overleaf](https://github.com/vsoch/thesis/raw/master/img/overleaf.png)\n\nYou should plop it in this folder, making sure to delete mine (if I've included it in the repo, I maybe haven't until I properly submit it!). The script will find your thesis based on it having the `.zip` extension. If you don't have a zip file, it's going to get angry at you.\n\nThen, you need to run the Docker image. You can either build it locally, or run the version from Dockerhub. I would suggest building locally, but it's up to you. Here is how to build it if needed:\n\n      docker build -t vanessa/thesis .\n\nNow we are going to run the docker image, and map the local folder to it so that the generated files pop up in our present working directory. You can just run the script [generate.sh](generate.sh) to start the container, map the the present working directory, generate the site, and stop the container. To make life easier, if you plan to put the thesis on the gh-pages associated with the repo, I'd check out that branch first:\n\n      git checkout -b gh-pages\n      chmod u+x generate.sh\n      bash generate.sh\n\nYou will see the following:\n\n\n      LOTS OF LATEX OUTPUT...\n\n      ...\n\n      ...\n\n      System return: 0\n      Entering main.css\n      Entering main.tmp\n      @@@@@@@@@@@@@@@@@@@*#?.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@,::,,::***:,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@::::*********?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@.:::***********%@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@.:::************@@@@@@@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@*:::************..?@@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@*.::**********...*@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@*:::::::::::::**.....S@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@+*:::::::::::::***.......@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@..?.%?:*:::::*#???........@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@..*.**********?....#?.......@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@.*.S...S.....S*.........*....@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@*.#...SSSSSSSSSSSSSSSS...*....S@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@........SSSSS?.++.+.%S?....*...*@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@S....%*..?SS++.++...+++....?*....@@@@@@@@@@@@@@\n      @@@@@@@@@++.*.....@@....+.**::::::+......*.....@@@@@@@@@@@@@\n      %****............?@@@@@S.+.#::*%.......@@*.....@@@@@@@@@@@@@\n      @%****...........@@@@@@@@@.......SS...@@@+.....*@@@@@@@@@@@@\n      @@@***.......?@@@@@@@@@@:**...........*@@,*.....@@@@@@@@@@@@\n      @@@@@..%@@@@@@@@@@@@@@@.***.............*@*......@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@:*****..............:*......@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@*******.............+?.......,.%%S@@@@\n      @@@@@@@@@@@@@@@@@@@@@@@@...*?.....+..+.%%%%.+....?@@@@@@@*.%\n      @@@@@@@@@@@@@@@@@@@@@@@@@......#.......,@@S%%%%%%%%%%%...%%%\n\n      Welcome to the Thesis Site Generator!\n      Found HTLATEX at /usr/bin/htlatex\n\n      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+,@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*@@@@@%%?.@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%?@@@#%?#@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@:??#@???+@@@@*?@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@??:??*.#?%%??#@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?#?#???#S@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@@@.%,,::::,::::::.%@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@::::%,::::,::::::::::::::::,.@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@S**?,::,,,::::::::::::::::::::::+*@@@@@@@@@@@@@@\n      @@@@@@@@@@?***::,,,:::::::::::::::::::::::::.,?.?,+@@@@@@@@@\n      @@@@@@@@.***.*@@@@@@:,,,,:::::::*?S.+%::::S#::::::S@@@@@@@@@\n      @@@@@@@.****:.@@@@@@@*::::::::S@@@@@@@@@.:S::::*:*:%@@@@@@@@\n      @@@@@@%.***.:::*@@@@,:::::::::.@@@@@@@@@%:*.*:::::::S:@@@@@@\n      @@@@@:.****.::::::::#@:::%::::*.,@@@@@@#****.:::::::::%@@@@@\n      @@@@@#......#:%@@@,@,,::::::,+.%#%:*********%:::::::::*%@@@@\n      @@@@@?.......+,@@,,,,:.,:,,,,,,,,,:.********?:::::::::::.@@@\n      @@@@@,*..?@@,@,@@@@,,,,,,,,,,,,,:,.*********?:::::::::::::@@\n      @@@@@@.,@@,,@@@@,@,,,,,,,,,,,,,:,**********?.*::::::::::::?@\n      @@@@%@@,@,,,,@@@@,,,,,,,,,,,,,,:*******+?:****:::::::::::*.@\n      @@@S@,@@@@@@,@@,,,,,,,,,,,,,,,,:.**************::::::::::**@\n      @@@@,,@@@@,,,,,,,,,,,,,,,,,,,,,:.**********S********:*:::*.@\n      @@@@@::,,,,,,,,,,,,,,,,,,,,,,::,***********::*************S@\n      @@@@@@*,:::,,,,,,,,,,,,,,,,::,#*************#************?@@\n      @@@@@@@@@@*.:,::::::::::,:%::::::*************%********#@@@@\n      @@@@@@@@@@@+::::::::::::::::::::::::::::*****************@@@\n      @@@@@@@@@@@::::::::::::::::::::::::::::::***************.@@@\n      @@@@@@@@@@+:::::::::::::::::::::::::::::::***************,@@\n      @@@@@@@@@@%::::::::::::::::::::::::::::::::**************.@@\n      S:::S%?.SSS::::::::::::::::::::::::::::::****************%@@\n      @@........?*::::::::::::::::::::::::::::**************..**@@\n      @@@%......S******::::::::::::::::::***********.,,+*?@:*:+@@@\n      @@@@@.......*********************************.,:**:*****%+,@\n      @@@@@@@S...*:*******************************S,:***********:@\n      @@@@@@@@@:S..#*****************************?,:***********?@@\n      @@@@@@@@@@@@@#*#:**************************:,***********@@@@\n      @@@@@@@@@@@@@@@@@+.**********************:.:,:*******:.@@@@@\n      @@@@@@@@@@@@@@@@@:+..S?.********S?+@@@@@@@@@*,****.S@@@@@@@@\n      @@@@@@@@@@@@@@@#::,,,,,,::***...@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n      @@@@@@@@@@@@@@@@@@@@?,,,,,,,:***%@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n      Generating HTML, please wait!\n      Site generation complete. Push to gh-pages for finished site.\n      Stopping container...\n      7e642e3285f7\n      Thesis generation finished, look in site folder for output, and add index.html and site folder to github pages!\n\n\nWhat is really happening? Here are the basic commands. In a nutshell, we are starting the container and directing output to `/dev/null` to keep it running, then getting the ID for it (something like `7e642e3285f7`) programatically, and then sending a command, `python /code/generate.py` directly to the container.\n\n      CONTAINER_MD5=`docker run -v $PWD:/code -d vanessa/thesis tail -f /dev/null`\n      CONTAINER_ID=`echo ${CONTAINER_MD5} | cut -c1-12`\n      docker exec $CONTAINER_ID python /code/generate.py\n\nThis means that the entire generation of the site (and all the software needed to do it) is installed and run in the container, and we get to see and keep the output. If you need to debug or check the command with hdlatex to generate the html, you should look at `site/output.txt`. Pretty neat!\n\n### Output\nYou will see new files in your present working directory, namely an `index.html` that redirects to the main content of your thesis in the `site` folder. In the `site` folder is a simple version of your thesis, in html form, with all the images and links as they should be. Then you simple need to add these files to a github pages branch. If you haven't yet, checkout a new gh-pages branch\n\n      git checkout -b gh-pages\n\nIf you're already on it, skip the above, and just add the site files to the gh-pages branch:\n\n      git add site/\n      git add index.html\n      git push origin gh-pages\n\nThen, your site should be available at `{{username}}.github.io/thesis`. \n\n\n### Changing the font\nBy default, I chose Source Serif Pro (Google Font) because it was the right combination of readable and elegant, but I would imagine not fitting to the taste of many. If you want to change the font, you can add an additional argument to the function call in [generate.sh](generate.sh):\n\n\n      docker exec $CONTAINER_ID python /code/generate.py \"Space Mono\"\n\n\nThe use of parenthesis is especially important if your font has any spaces, and capitalization must be exactly correct. All choices should be a [Google Font](https://fonts.google.com/). The example above would correspond to the \"Roboto\" family, and default is sans-serif. To customize the styling, you will need to edit the function `get_font` in the main [generate.py](generate.py).\n\n\n### Debugging\nYou may need to connect to the container interactively if you run into some issue, and there is an easy way to do that. First, we will use some of the commands that are in [generate.sh](generate.sh) to get the container running, and get it's container ID:\n\n      CONTAINER_MD5=`docker run -v $PWD:/code -d vanessa/thesis tail -f /dev/null`\n      CONTAINER_ID=`echo ${CONTAINER_MD5} | cut -c1-12`\n      \nNow you can connect to it:\n\n      docker exec -it $CONTAINER_ID bash\n\n\n### Anticipated Issues\nI would imagine that University / Institution templates are different. My zipped up thesis only contains a bibliography (thesis.bib), one main `.tex` file (main.tex), a folder of images (`/images`) and a style file (`suthesis-2e.sty`). Thus, my program makes a few assumptions that might need tweaking if your zip is different:\n\nBy default, the first .tex file found via `glob` is assumed to be the main thesis to render. If you have something like supplementary material or else, the fix to this would be to modify the [generate.py](generate.py) script to take the name of this file as first argument instead of finding programatically. Then you would modify the command in the [generate.sh](generate.sh) before running:\n\n      docker exec $CONTAINER_ID python /code/generate.py mainfile.tex\n \nIn the same way, if you have more than one zip file in your folder, it will select the first. This could also be an argument added to the two generate scripts.\n\n\n### Coming Soon\nI am going to add some custom style files to give the thesis a bit of branding, and a bit of... say... style? :) Once mine is submit, I'll add it to the github pages for this repo! Until then.... \n\n### Help and Features\n\nIf you want me to add or change something, please don't hesitate to post on the [issues board](https://github.com/vsoch/thesis/issues).\n\n\n### License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fthesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsoch%2Fthesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsoch%2Fthesis/lists"}