inews

Video IDs

Andreas Hartmann, 25.05.2007 11:48:

Question

Can we create video-ids automatically?

Answer

Yes, but not with built-in components of iNEWS. You need a combination of a Linux shell script and a macro inside iNEWS.

  1. The shell script is started via crontab once a day very early morning. It generates a list of new video-ids (for that day) in a hidden place of the iNEWS database.
  2. The macro moves the next entry out of this list and paste it into the video-id field of the current story. An already assigned video id will not be overwritten by the macro.

So this solution take care about:

  1. The video id is unique. Whenever a user picks up a video id out of the list this id is immediately removed from the list. No chance to take the same id twice.
  2. The video id for a given story is fix. The macro keeps an already assigned id in the target story. It's not possible to change the id after working with (at least not with our macro)
Setup
  1. Video-id queue - inside iNEWS Client
    • Create a new folder hidden in iNEWS database.
    • Inside create a new queue video-ids.
    • Set readgroup for the folder to nobody.
    • Set readgroup and writegroup for the queue to !none or the group which is allowed to assign video-ids.
    • Set the queue to inverted.
  2. Script - Linux shell as user root (su) on both machines - inews-a and inews-b, respectively.
    • Create a directory /site/scripts/video-ids
    • Create a directory /site/scripts/video-ids/data
    • Inside /site/scripts create a file yes2 with following content:
      y
      y
    • Inside /site/scripts/video-ids create a file video-ids.sh with following content:
      #! /bin/bash
      #
      # creates video-ids
      # runs every morning at (via crontab)
      #
      if /exc/ifis master
      then
          LOGFILE=/var/log/messages
          LOGDATE=$(date | cut -c5-19)
          DATE=$(date +%Y-%m-%d)
          ID=1
          DIGIT=00
       
          /exc/dbpurge hidden.video-ids 0 < /site/scripts/yes2 > /dev/null
          rm /site/scripts/video-ids/data/ids
       
          while test $ID -le 300
          do
              if test $ID -ge 10
              then
                  DIGIT="0"
              fi
              if test $ID -ge 100
              then
                  DIGIT=""
              fi
              echo "$(date +%d%m)-$DIGIT$ID" >> /site/scripts/video-ids/data/ids
              ID=$(expr $ID + 1)
          done
       
          /exc/doc -pu hidden.video-ids /site/scripts/video-ids/data/ids
          echo "$LOGDATE localhost $(basename $0): creating video IDs for $DATE" >> $LOGFILE
      fi
    • Set permissions for video-ids.sh with
      chmod 744 /site/scripts/video-ids/video-ids.sh
    • 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:
      /site/scripts/video-ids/video-ids.sh
    • Add an entry to roots crontab like
      35 5 * * * /site/scripts/video-ids/video-ids.sh > /dev/null 2&>1

      The leading two parameters specify the time when the script has to run (in our case 05:35). See the man-page for more information. Type man crontab to read this man-page. The last parameters after > prevent some error messages to get printed. You should have an entry for video-ids.sh in the crontab of each iNEWS server.

  3. Type forms story - inside iNEWS Client as superuser1)
    • Create a queue system.forms.t.type-q
    • Insert a new story and change the fields for that story. For our macro it is necessary to have the video-id field at second position. Other fields don't matter for our macro - maybe for others…
  4. 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:
      {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}


      German version:

      {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}


      French version:

      {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}
    • 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
  • The script above creates video-ids in the format ddmm-xxxwhereas 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.
1) The macro can address the video-id-field just with tabs. To avoid a disruption of its functionality by changing the rundown queue forms the macro works with its own queue view

Discussion

yanmaneee, 2019/04/22 19:17

http://www.hermes-birkin.us.com http://www.ferragamobelt.us.org http://www.stephencurry.us.com http://www.retro-jordans.us.com http://www.airmax270.us.com http://www.louboutinshoes.uk http://www.nike-huarache.com http://www.onlineshopmk.com http://www.vapormaxshoes.us http://www.jimmychoo-shoes.us.com http://www.nike-airmax97.us.com http://www.coachoutletstorefactory.com http://www.birkinbag.us.com http://www.kd-10.us http://www.offwhitehoodie.us.com http://www.fila-shoes.us.com http://www.cheap-airjordans.us.com http://www.lebron15.net http://www.kobesneakers.com http://www.hardenshoes.us.com http://www.outletlacoste.us.com http://www.yeezyboost350v2.org.uk http://www.yeezy-500.us.com http://www.cheapjordans.us.org http://www.nikeair-max.us.com http://www.airmax95.us http://www.michaelkorsfactorystore.com http://www.adidasyeezys.uk http://www.nikejordans.us.com http://www.goyard-handbags.us.com http://www.monclercoat.us.com http://www.chromeheartsoutletonline.com http://www.goldengoose-sneakers.com http://www.adidaszxflux.com http://www.adidasgazelle.us.com http://www.lebron16.us http://www.nikeairmax2018.us.com http://www.christianlouboutin-shoes.com http://www.shoesyeezy.us http://www.bapehoodie.us http://www.offwhite.us.com http://www.air-max270.com http://www.guccibelt.us.com http://www.supremenewyork.us.com http://www.yeezyboost-350.uk http://www.longchamphandbags.co.uk http://www.hermesonlineshop.com http://www.bape-hoodie.us.com http://www.offwhiteclothing.us.com http://www.christianlouboutinsoutlet.net http://www.nikeairforce1.us.com http://www.jordan-retro.us.com http://www.jordan13.us.com http://www.redbottom-shoes.us.com http://www.supremeclothing.us http://www.kyrie5.us http://www.nike-hyperdunk.us.com http://www.yeezyadidas.us.com http://www.cheapnbajerseyswholesale.us http://www.nhljerseysshop.us.com http://www.shoesjordan.us.com http://www.monclers.us.org http://www.nikebasketballshoes.us.com http://www.hermes-handbags.us.com http://www.nmdadidas.com http://www.converseoutlet.us.com http://www.yeezyshoesus.com http://www.katespadehandbags-outlet.us.com http://www.jordansforcheap.us.com http://www.michaelkorsbagoutletbag.com http://www.supremeclothingonline.us.org http://www.michael-korsoutlets.com http://www.offwhitexjordan1.com http://www.golden-goose.us.com http://www.vans-outlet.us.com http://www.nike-shox.us.com http://www.jordan12.us.com http://www.curry6shoes.com http://www.outlettimberland.us.org http://www.christianlouboutin-shoes.org http://www.michael-kors-handbags.org.uk http://www.nikehuaracheshoes.us.com http://www.off-whiteshoes.us.com http://www.balenciagashoes.us.com http://www.nfljerseys.us.org http://www.vapormax.org.uk http://www.michaelkors-outletonlines.us.com http://www.yeezy-shoes.org.uk http://www.yeezyshoes.in.net http://www.monclersoutletonline.com http://www.christianlouboutinbar.com http://www.airmax-95.com http://www.nikeairmax95.us.com http://www.nikefoamposite.us.com http://www.hermesbelts.com http://www.nikecortez.us.com http://www.monclerjackets.us http://www.timberlands.us http://www.outletonline-michaelkors.us.org http://www.jordanssneakers.us.com http://www.yeezysshoes.us.com http://www.christianlouboutinshoessale.com http://www.polosralphlaurenuk.com http://www.mbts.us.org http://www.louboutins.us.com http://www.adidasstansmith.us.com http://www.goldengooseoutlet.us http://www.hermesbelts.co.uk http://www.russellwestbrookshoes.us http://www.jordan4.us.com http://www.yeezy-boost.us.com http://www.yeezy-boost350.us.com http://www.goldengoose.us.com http://www.nike-airmax2017.us.com http://www.michael--korsoutlet.us.org http://www.yeezyboost.com.co http://www.curry6.net http://www.nike-airvapormax.com http://www.jordan6.us.com http://www.vapormaxs.us http://www.christianlouboutin-outletonline.us.com http://www.nike-airmax97.us http://www.goldengoose-sneakers.us http://www.kd11.us http://www.nike270.us http://www.coachoutletsfactory.com http://www.yeezyshoesuk.com http://www.airmax-270.com http://www.curry4shoes.us.com http://www.goldengoose-outlet.us.com http://www.michael-korsoutlets.us http://www.coachoutletssale.com http://www.balenciaga.us.com http://www.air-vapormax.com http://www.nikeairmax2019.us.com http://www.adidas-tubular.us.com http://www.jordansshoes.us.org http://www.handbagsmichaelkors.com http://www.kobe-shoes.us.com http://www.hermes-belt.us.com http://www.air-max.us.com http://www.yeezy-boosts.us.com http://www.valentinosshoes.us http://www.yeezy700.us.com http://www.adidassuperstar.us.com http://www.monclerjacket.net http://www.asics-shoes.us.org http://www.nike-airmax97.us http://www.reebokoutlet.us.org http://www.balenciagashoes.us.org http://www.fila.us.org http://www.curry4.net http://www.ultraboost.us.com http://www.jordanshoes.org.uk http://www.airmax90.us.org http://www.outletmichael-kors.us.com http://www.longchampshandbags.us http://www.fakerolex.us.com http://www.ferragamobelt.us http://www.goldengoosesneakers.us http://www.nikereact.org http://www.air-jordanshoes.us.org http://www.nikereact.us.com http://www.calvinkleinoutlet.us.com http://www.hogan-outlet.us.com http://www.monclersoutlet.us.com http://www.michaelkorshandbagsus.com http://www.hermeshandbags.us.org http://www.filashoes.org http://www.curry-6.us http://www.jordan11retro.us.com http://www.paulgeorgeshoes.us.com http://www.long-champ.us.com http://www.supreme-clothing.us.com http://www.adidasnmdr1.us.com http://www.adidasyeezys.us.com http://www.goyard.us.com http://www.lacosteonlineshop.us.com http://www.mlbjerseys.in.net http://www.curry5shoes.net http://www.coachoutlets.name http://www.nikeairmax97.net http://www.kyrie3.us.com http://www.chromehearts.name http://www.supremeoutlets.us.com http://www.yeezyboost-350v2.us.com http://www.nikeflyknit.us.com http://www.michaeljordanshoes.us.com http://www.supreme-hoodie.us.com http://www.michael-kors-handbags.com.co http://www.coachsonline.us.com http://www.kyrieirving-shoes.us.com http://www.yeezyboost350v2shoes.us.com http://www.louboutin-outlet.us.com http://www.adidasyeezy500.us.com http://www.christianlouboutinoutletofficial.com http://www.adidasnmds.us.com http://www.kyrie4.org http://www.kd11.us.com http://www.kobebasketballshoes.net http://www.caterpillarboots.us.com http://www.goyardhandbags.us.com http://www.russellwestbrookshoes.us.com http://www.chromehearts.com.co http://www.kyrie5.us.com http://www.michaelkors-outletfactory.us.org http://www.canada-goose.in.net http://www.nikesneakers.us.com http://www.kevindurant-shoes.us.com http://www.lebronjames-shoes.us.com http://www.yeezyboost.in.net http://www.fitflops-saleclearance.us.com http://www.filashoes.us.org http://www.louboutinshoes.co.uk http://www.airjordanretro.uk yanmaneee

yanmaneee, 2019/07/10 08:29

http://www.goldengooseoutlet.org http://www.nikeairmax2019.com http://www.retrojordanssale.com http://www.longchampshandbags.us http://www.goldengoose-outlet.us.com http://www.monclerjackets.us http://www.christianlouboutinsoutlet.net http://www.longchamphandbags.co.uk http://www.supremeclothingonline.us.org http://www.yeezyboost-350v2.us.com http://www.balenciagas.us.com http://www.goyardhandbags.us.com http://www.curry4.net http://www.mbts.us.org http://www.nikexoffwhite.com http://www.calvinkleinoutlet.us.com http://www.nfljerseyssale.us http://www.air-jordanshoes.us.org http://www.bapehoodie.us http://www.offwhite.us.com http://www.hermes-birkin.us.com http://www.christianlouboutinoutletofficial.com http://www.yeezy-boosts.us.com http://www.michaelkorshandbagsus.com http://www.adidasnmdr1.us.com http://www.offwhitehoodie.us.com http://www.supremenewyork.us.com http://www.jordans.com.co http://www.goldengoosesneakersstore.com http://www.yeezyboost.com.co http://www.christianlouboutinbar.com http://www.nhljerseysshop.us.com http://www.michael-kors-handbags.org.uk http://www.adidasnmds.us.com http://www.christianlouboutinshoessale.com http://www.yeezy-boost.us.com http://www.nikereact.org http://www.balenciagashoes.us.org http://www.jordanssneakers.us.com http://www.adidassuperstar.us.com http://www.kd11.us http://www.goldengooseoutlet.us http://www.airmax270.us.com http://www.michaelkorsbagoutletbag.com http://www.nike-airmax97.us.com http://www.lebronjames-shoes.us.com http://www.ferragamobelt.us.org http://www.balenciaga-sneakers.us.com http://www.curry6.net http://www.nike-hyperdunk.us.com http://www.hermes-handbags.us.com http://www.yeezyboost350v2.org.uk http://www.louboutins.us.com http://www.jordan4.us.com http://www.supremesstore.com http://www.jordan12.us.com http://www.coachoutletsfactory.com http://www.michael--korsoutlet.us.org http://www.goldengoosesneakers.us http://www.yeezyboost-350.uk http://www.fitflops-saleclearance.us.com http://www.coachoutlets.name http://www.nikereact.us.com http://www.yeezy-shoes.org.uk http://www.cheap-airjordans.us.com http://www.vans-outlet.us.com http://www.coachoutletssale.com http://www.jordanstoreonline.com http://www.kd-10.us http://www.air-vapormax.com http://www.christianlouboutin-shoes.com http://www.michael-kors-handbags.com.co http://www.airmax95.us http://www.hermesbelts.com http://www.handbagsmichaelkors.com http://www.goldengoose.us.com http://www.outlettimberland.us.org http://www.filashoes.org http://www.coachoutletstorefactory.com http://www.paulgeorgeshoes.us.com http://www.kobebasketballshoes.net http://www.kyrie4.org http://www.guccibelt.us.com http://www.goldengoosesonline.com http://www.vapormaxs.us http://www.louboutinshoes.uk http://www.vapormaxshoes.us http://www.monclercoat.us.com http://www.supreme-clothing.us.com http://www.adidas-tubular.us.com http://www.shoesjordan.us.com http://www.offwhiteclothing.us.com http://www.onlineshopmk.com http://www.kobe-shoes.us.com http://www.nikeairmax2019.us.com http://www.hogan-outlet.us.com http://www.yeezysshoes.us.com http://www.jordans.net.co http://www.asics-shoes.us.org http://www.kyrie5.us.com http://www.monclersoutlet.us.com http://www.goldengoose-sneakers.us http://www.nike-airmax97.us http://www.michaelkors-outletonlines.us.com http://www.nikeairmax95.us.com http://www.monclersoutletonline.com http://www.jimmychoo-shoes.us.com http://www.hardenshoes.us.com http://www.kyrie5.us http://www.monclerjacket.net http://www.balenciaga.us.com http://www.polosralphlaurenuk.com http://www.hermesonlineshop.com http://www.kyrieirving-shoes.us.com http://www.nikejordans.us.com http://www.hermes-handbags.us.org http://www.balenciaga-shoes.us http://www.ferragamobelt.us http://www.filashoes.us.org http://www.balenciagashoes.us.com http://www.goldengoosedeluxebrands.com http://www.christianlouboutin-outletonline.us.com http://www.adidasstansmith.us.com http://www.golden-goose.us.com http://www.timberlands.us http://www.goldengooseofficial.com http://www.nikeflyknit.us.com http://www.nmdsadidas.com http://www.goldengoose-sneakers.com http://www.michael-korsoutlets.us http://www.curry5shoes.net http://www.cheapmlbjerseys.us.org http://www.nike-airvapormax.com http://www.retro-jordans.us.com http://www.ultraboost.us.com http://www.stephencurry.us.com http://www.jordanshoes.org.uk http://www.adidasyeezys.us.com http://www.michaeljordanshoes.us.com http://www.nikeair-max.us.com http://www.yeezy700.us.com http://www.supremeoutlets.us.com http://www.balenciagasus.com http://www.fila-shoes.us.com http://www.russellwestbrookshoes.us http://www.yeezy-shoes.us.org http://www.yeezyadidas.us.com http://www.lebron16.us http://www.air-max270.com http://www.jordansforcheap.us.com http://www.kyrie3.us.com http://www.curry6shoes.us http://www.airjordanretro.uk http://www.cheapnbajerseyswholesale.us http://www.supreme-hoodie.us.com http://www.outletonline-michaelkors.us.org http://www.adidaszxflux.com http://www.yeezyshoes.in.net http://www.yeezyshoesuk.com http://www.balenciagaspeeds.com http://www.yeezyboost.in.net http://www.yeezy-boost350.us.com http://www.outletmichael-kors.us.com http://www.jordansshoes.us.org http://www.jordan13.us.com http://www.birkinbag.us.com http://www.coachsonline.us.com http://www.nike-shox.us.com http://www.airmax-95.com http://www.yeezyshoesus.com http://www.nike-huarache.com http://www.air-max.us.com http://www.russellwestbrookshoes.us.com http://www.nikeairmax97.net http://www.monclers.us.org http://www.nikecortez.us.com http://www.reebokoutlet.us.org http://www.louboutinshoes.co.uk http://www.shoesyeezy.us http://www.off-whiteshoes.us.com http://www.cheapjordans.us.org http://www.cheap--jordans.us.com http://www.kobesneakers.com http://www.lebron15.net http://www.curry4shoes.us.com http://www.converseoutlet.us.com http://www.louboutin-outlet.us.com http://www.airmax-270.com http://www.canada-goose.in.net http://www.nikeairmax2018.us.com http://www.jordan-retro.us.com http://www.yeezysus.com http://www.goyard.us.com http://www.jordan11retro.us.com http://www.fila.us.org http://www.jordanshoes.us http://www.kevindurant-shoes.us.com http://www.supremesclothing.us http://www.nikebasketballshoes.us.com http://www.yeezyboost350v2shoes.us.com http://www.goyard-handbags.us.com http://www.nike-airmax2017.us.com http://www.michaelkorsfactorystore.com http://www.michaelkors-outletfactory.us.org http://www.nike270.us http://www.jordan6.us.com http://www.yeezys.uk http://www.nikesneakers.us.com http://www.hermesbirkins.com http://www.caterpillarboots.us.com http://www.nfljerseys.us.org http://www.bape-hoodie.us.com http://www.nikefoamposite.us.com http://www.offwhitexjordan1.com http://www.katespadehandbags-outlet.us.com http://www.hermes-belt.us.com http://www.goldengoosesneakers.org http://www.air-max97.com http://www.nikeairforce1.us.com http://www.nikehuaracheshoes.us.com http://www.adidasyeezy500.us.com http://www.vapormax.org.uk http://www.airmax90.us.org http://www.hermesbelts.co.uk http://www.valentinosshoes.us http://www.adidasgazelle.us.com http://www.long-champ.us.com http://www.kd11.us.com http://www.yeezy-500.us.com http://www.christianlouboutin-shoes.org http://www.curry-6.us yanmaneee

You could leave a comment if you were logged in.
forum/inews/video-ids.txt · Last modified: 2019/03/30 12:59 (external edit)


All trademarks and registered trademarks used are the property of their respective owners.
 

Recent changes RSS feed Driven by DokuWiki