Browse Source

Удаление метаданных pdf

master
Maxim Likhachev 5 years ago
parent
commit
3ad651123f
  1. 9
      press-n-post

9
press-n-post

@ -133,12 +133,13 @@ namespace eval pdf { @@ -133,12 +133,13 @@ namespace eval pdf {
proc guess_language {title} {
# Базовый набор символов
set eng {[a-z[:space:][:punct:]]}
set rus_eng {[a-zа-я[:space:][:punct:]]}
switch -nocase -regexp $title "^${eng}*\[äöüß]+${eng}*" {
set lang DEU
} "^${eng}*\[àâæçéèêëîïôœùûüÿ]+${eng}*" {
set lang FRA
} "^${eng}*\[а-яћџђљњčćžđš]+${eng}*" {
} "^${rus_eng}*\[ћџђљњčćžđš]+${rus_eng}*" {
set lang SRB
} "^${eng}*\[а-я]+${eng}*" {
set lang RUS
@ -190,10 +191,16 @@ namespace eval pdf { @@ -190,10 +191,16 @@ namespace eval pdf {
# Сохранение метаданных в файл
# и запись markdown-описания на диск
proc write_metadata {} {
clear_tags
write_tags
write_markdown
}
# Удаление всех метаданных
proc clear_tags {} {
exec exiftool -all:all= "[file join $::pdf::file_path $::pdf::file]" 2>/dev/null
}
# Запись метаданных
proc write_tags {} {
exec exiftool -Author=$::pdf::tags(Author)\

Loading…
Cancel
Save