|
|
@ -71,6 +71,21 @@ func addText(img *image.RGBA, x, y uint, text string, size float64) error { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
|
|
|
|
|
flag.Usage = func() { |
|
|
|
|
|
|
|
fmt.Printf(` -add_note_space |
|
|
|
|
|
|
|
Add bottom space for a note or not |
|
|
|
|
|
|
|
-dst_dir string |
|
|
|
|
|
|
|
Specify path to the output directory (default "output_images") |
|
|
|
|
|
|
|
-fontsize float |
|
|
|
|
|
|
|
Set font size for note (default 150) |
|
|
|
|
|
|
|
-note string |
|
|
|
|
|
|
|
Set a note that will be added to the bottom of each extracted image |
|
|
|
|
|
|
|
-src_dir string |
|
|
|
|
|
|
|
Specify path to the directory where each found PDF file's pages will be converted to images (default ".") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(c) Kasyanov Nikolay Alexeyevich (Unbewohnte) |
|
|
|
|
|
|
|
`) |
|
|
|
|
|
|
|
} |
|
|
|
flag.Parse() |
|
|
|
flag.Parse() |
|
|
|
|
|
|
|
|
|
|
|
err := os.MkdirAll(*extractionDirPath, os.ModePerm) |
|
|
|
err := os.MkdirAll(*extractionDirPath, os.ModePerm) |
|
|
|