.sh/.py/.jinja

pull/3/head
E.zn 5 years ago
parent 569d59ddc5
commit 3060147e64

@ -1,14 +1,16 @@
#!/bin/sh
python3 upload_imgs_dir.py \
--title 'Ang Bayan December 1984' \
--creator 'Central Committee of the Communist Party of the Philippines' \
--date '1984/12/01' \
--org 'Communist Party of the Philippines' \
--format 'Bulletin' \
--topic 'Communism, Armed Struggle' \
--dir '/full/path/to/2020_bantayog/Folder name' \
# --dry
--title 'No' \
--creator 'a' \
--date '2020/01/01' \
--org 'b' \
--format 'c' \
--event 'd' \
--topic 'e' \
--language 'English' \
--dir '/home/ezn/Desktop/XPUB/Special_Issue_XI_[Ezn]/D.lo/2020_bantayog/Kalayaan Vol. 12 No. 1' \
--dry
# Note:
# * Add this values to you upload specific upload.

@ -8,5 +8,6 @@
|Format={{ format }}
|Event={{ event }}
|Topic={{ topic }}
|Language={{ language }}
{{ '}}' }}
[[Template:ImageMetadata]]

@ -36,6 +36,8 @@ p.add_argument('--event', required=False, action='append', default=[''],
help='Multiple values should be SEPARATED BY COMMA')
p.add_argument('--topic', required=False, action='append', default=[''],
help='Multiple values should be SEPARATED BY COMMA')
p.add_argument('--language', required=False, action='append', default=[''],
help='Multiple values should be SEPARATED BY COMMA')
# TODO ADD NEW PROPS
args = p.parse_args()
@ -89,7 +91,8 @@ for n, _file in enumerate(lsimgs):
organization=(', ').join(args.org[1:]),
format=(', ').join(args.format[1:]),
event=(', ').join(args.event[1:]),
topic=(', ').join(args.topic[1:])
topic=(', ').join(args.topic[1:]),
language=(', ').join(args.language[1:]),
)
_file_path = os.path.join(args.dir, _file)

Loading…
Cancel
Save