This shows you the differences between two versions of the page.
forum:inews:multiple-video-ids [2008/03/20 11:23] andreas |
forum:inews:multiple-video-ids [2023/11/19 22:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
<- [[:forum:inews]] | <- [[:forum:inews]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 12: | Line 17: | ||
Yes, but again not with built-in components of iNEWS. The idea behind this solution is the same as for the single video id script (see [[forum:inews:video-ids]]). | Yes, but again not with built-in components of iNEWS. The idea behind this solution is the same as for the single video id script (see [[forum:inews:video-ids]]). | ||
- | There is one strict limitation so far: You have to create stories for different rundowns in separate folders. It is not possible to choose the relevant show during the video id assignment. | + | :!: There are two strict limitations so far: |
+ | * You have to create stories for different rundowns in separate folders. It is not possible to choose the relevant show during the video id assignment. | ||
+ | * Name((Strictly spoken the last part of a queue name - i.e. show.1800.**rundown**)) of queues where video ids are assigned in must have exactly a given length. Otherwise the macro will fail. The given macros below assume a queue name with seven characters like ''rundown''. | ||
At all you need a combination of a Linux shell script and a macro inside iNEWS. | At all you need a combination of a Linux shell script and a macro inside iNEWS. | ||
Line 28: | Line 35: | ||
* Place one story inside this queue which contains the description of each rundown or folder where video ids for a given show have to be assigned. If there are more than one story in this queue all stories are processed. | * Place one story inside this queue which contains the description of each rundown or folder where video ids for a given show have to be assigned. If there are more than one story in this queue all stories are processed. | ||
* All empty lines and strings after semicolon (;) are ignored. Also the program proofs the format of the remaining lines and only valid ones are taken. | * All empty lines and strings after semicolon (;) are ignored. Also the program proofs the format of the remaining lines and only valid ones are taken. | ||
- | * The valid format is<code> | + | * The format of each line is<code> |
<rundown> <show string> <date format></code> | <rundown> <show string> <date format></code> | ||
- | * The ''<rundown>'' is the queue where video ids are assigned. Its parent folder must contain a hidden folder with a video-id queue inside. See next point how to create it. | + | * The ''<rundown>'' is the queue where video ids are assigned. Its parent folder must contain a hidden folder with a video-id queue inside. See next point how to create it. |
- | * The ''<show string>'' is a string containing only characters A-Z, a-z and 0-9 and especially it must contain no spaces. | + | * The ''<show string>'' is a string containing only characters A-Z, a-z and 0-9 and especially it must contain no spaces. |
- | * The ''<date format>'' refers to the linux strftime format. Call ''man strftime'' on the iNEWS server console to get more help. | + | * The ''<date format>'' refers to the linux strftime format. Call ''man strftime'' on the iNEWS server console to get more help. |
+ | * Here is a sample story for description of some rundowns:<code> | ||
+ | ; This story must contain the list of all rundown queues. | ||
+ | ; It is used by the linux script /site/scripts/video-ids/video-ids.sh. | ||
+ | ; All rundowns must be named "RUNDOWN". | ||
+ | ; There must be a HIDDEN.VIDEO-IDS queue in each show directory. | ||
+ | ; Format of the entries is: | ||
+ | ; <rundown> <show string> <date format> | ||
+ | |||
+ | news.1800.rundown N18 %d%m%y | ||
+ | |||
+ | news.2130.rundown N21 %d%m%y | ||
- | - Video-id queue - inside iNEWS Client | + | features.business.rundown FB %d%m%y</code> |
- | * Create a new folder ''hidden'' in each ''<show directory>'' (see previous point) inside iNEWS database. | + | - Video-id queues - inside iNEWS Client |
+ | * Create a new folder ''hidden'' in each show directory (see previous point) inside iNEWS database. | ||
* Inside create a new queue ''video-ids''. | * Inside create a new queue ''video-ids''. | ||
* Set readgroup for the folder to ''nobody''. | * Set readgroup for the folder to ''nobody''. | ||
Line 117: | Line 136: | ||
* Set permissions for video-ids.sh with<code bash> | * Set permissions for video-ids.sh with<code bash> | ||
chmod 744 /site/scripts/video-ids/video-ids.sh</code> | chmod 744 /site/scripts/video-ids/video-ids.sh</code> | ||
- | * Test the script. If you get no error messages at the terminal but a story with video-ids inside the ''hidden.video-ids'' queue, your script works properly. To run the script type:<code bash> | + | * Test the script. If you get no error messages at the terminal but stories with video-ids inside the ''hidden.video-ids'' queues, your script works properly. Also you should check the /var/log/messages file for some errors. To run the script type:<code bash> |
/site/scripts/video-ids/video-ids.sh</code> | /site/scripts/video-ids/video-ids.sh</code> | ||
* Add an entry to roots crontab like<code> | * Add an entry to roots crontab like<code> | ||
Line 126: | Line 145: | ||
- Macro - inside iNEWS Client as superuser | - Macro - inside iNEWS Client as superuser | ||
* In a keyboard story of your choice (normally the producer keyboard) assign the following macro to a key.\\ English version:<code> | * In a keyboard story of your choice (normally the producer keyboard) assign the following macro to a key.\\ English version:<code> | ||
- | {alt wo}hidden.video-ids{enter} {alt {right}{right}} {ctrl {home}} {shift {end}{left}} {ctrl x} {delete} {ctrl se} {alt wc} {alt {right}{right}{left}} {alt vuf}type-q{enter} {home} {tab} {f2} {space}{backspace} {home} {ctrl v} {shift {end}} {ctrl x} {shift {home}} {ctrl v} {ctrl se} {alt vun} {home} {tab}{tab}</code>\\ German version:<code> | + | {alt {right}{right}{left}}{alt wo}{end}{backspace}{backspace}{backspace}{backspace}{backspace}{backspace}{backspace}hidden.video-ids{enter} {alt {right}{right}}{ctrl {home}}{shift {end}{left}}{ctrl x}{delete}{ctrl se}{alt wc}{alt vuf}type-q{enter}{home}{tab}{f2}{home}{ctrl v}{shift {end}}{ctrl x}{shift {home}}{ctrl v}{f2}{shift {tab}}{alt vun}{home}{tab}{tab}{tab}</code>\\ German version:<code> |
- | {alt fa}hidden.video-ids{enter} {alt {right}{right}} {ctrl {home}} {shift {end}{left}} {ctrl x} {delete} {ctrl se} {alt fs} {alt {right}{right}{left}} {alt abf}type-q{enter} {home} {tab} {f2} {space}{backspace} {home} {ctrl v} {shift {end}} {ctrl x} {shift {home}} {ctrl v} {ctrl se} {alt abn} {home} {tab}{tab}</code>\\ French version:<code> | + | {alt {right}{right}{left}}{alt fa}{end}{backspace}{backspace}{backspace}{backspace}{backspace}{backspace}{backspace}hidden.video-ids{enter} {alt {right}{right}}{ctrl {home}}{shift {end}{left}}{ctrl x}{delete}{ctrl se}{alt fs}{alt abf}type-q{enter}{home}{tab}{f2}{home}{ctrl v}{shift {end}}{ctrl x}{shift {home}}{ctrl v}{f2}{shift {tab}}{alt abn}{home}{tab}{tab}{tab}</code>\\ French version:<code> |
- | {alt no}hidden.video-ids{enter} {alt {right}{right}} {ctrl {home}} {shift {end}{left}} {ctrl x} {delete} {ctrl se} {alt nf} {alt {right}{right}{left}} {alt hum}type-q{enter} {home} {tab} {f2} {space}{backspace} {home} {ctrl v} {shift {end}} {ctrl x} {shift {home}} {ctrl v} {ctrl se} {alt hun} {home} {tab}{tab}</code> | + | {alt {right}{right}{left}}{alt no}{end}{backspace}{backspace}{backspace}{backspace}{backspace}{backspace}{backspace}hidden.video-ids{enter} {alt {right}{right}}{ctrl {home}}{shift {end}{left}}{ctrl x}{delete}{ctrl se}{alt nf}{alt hum}type-q{enter}{home}{tab}{f2}{home}{ctrl v}{shift {end}}{ctrl x}{shift {home}}{ctrl v}{f2}{shift {tab}}{alt hun}{home}{tab}{tab}{tab}</code> |
* Test the macro. Save the keyboard story. Choose this keyboard in your preferences. Then go to a rundown story and press the related shortcut. If the story have had no video-id, now it should have the next one out of your list (and this number should be removed from the list). If the story have had a video-id before, this video-id should be there even if you run the macro. In that case nevertheless a number is removed from the list. | * Test the macro. Save the keyboard story. Choose this keyboard in your preferences. Then go to a rundown story and press the related shortcut. If the story have had no video-id, now it should have the next one out of your list (and this number should be removed from the list). If the story have had a video-id before, this video-id should be there even if you run the macro. In that case nevertheless a number is removed from the list. | ||
== Comments == | == Comments == | ||
- | * The script above creates video-ids in the format ''ddmm-xxx''whereas ''xxx'' is a sequential number. This format can be easily changed or extended. | ||
- | * Actually the script produces 300 ids. Of course you can increase this value by adjusting the loop border. | ||
~~DISCUSSION~~ | ~~DISCUSSION~~ |