This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on my [previous script](https://gist.github.com/J0hnL0cke/95dbf624465034e399592c5d9690eb11) for converting mhtml -> pdf | |
# This script scans the output directory, in order to figure out if the conversion has failed for any mhtml files | |
# Instructions | |
# Install docker | |
# Set the number on the `tail` commands (in 2 locations now!) to strip file paths (ie "./Readings/filename.mhtml" -> strip first 8 chars -> "filename.mhtml" ) | |
# Run in a directory where you have run `mkdir ./out` and have mhtml files in current folder or subfolders | |
# To customize where the program searches, for files, edit the path used by the `find` command | |
IFS=$'\n' && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MHTML To PDF Fetcher | |
# This short bash script opens .mhtml files, finds the original download url, then uses wkhtmltopdf to download a pdf from that site. | |
# Inspired by the lack of support for .mhtml in e-readers and the lack of options for converting them to other formats. | |
# Limitations: | |
# curl cannot use javascript, and thus can't get past anti-scripting protections that use JS redirects | |
# Because of how `find` escapes special characters, file names with special characters may turn out weird | |
# Sometimes wkhtmltopdf just gets stuck on a page. Press ctrl+C 3 times to break out of the container and skip to the next one | |
# Before using: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#This is a program for the Google Voice Kit. It uses the Speech Recognition library to send audio snippets to Houndify for interpretation, | |
#and it uses pyttsx3 to respond to the user | |
#This program uses code snippets from this example file: https://github.com/Uberi/speech_recognition/blob/master/examples/audio_transcribe.py | |
#As well as from Google's voice_recorder file: https://github.com/google/aiyprojects-raspbian/blob/aiyprojects/src/examples/voice/voice_er.py | |
print("Importing libraries...") |