Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Auto format from database textfile

Return to Member Forum

  • Author
    Posts
    • #67719

      Hello, Im working as a graphic designer and I just got a hard assignment. Im making sort of a catalogue with lots and lots of diffrent clubs listed. I get a textfile with all the information delivered like this:

      2320#CITY#1#Number#CLUB
      2320#CITY#1#Chartrad#Mars 1953
      2320#CITY#1#Charterpresident#53-54 N Lastname
      2320#CITY#1#Address#Location#Street1###zipcode#City
      2320#CITY#1#Meeting time#Day#12:00
      2320#CITY#1#Phone#xxxx#xxxxxx
      2320#CITY#1#Email#email@email.com
      2320#CITY#1#Webpage#https://www.gamlegamle.com
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email

      The goal is to automate the process of formatting it. The first three columns are not going to be in the catalogue (2320#CITY#2#).

      This is what I want to achieve:
      https://forumbilder.se/DC7GU/formattest

      I´ve managed to import it to excel and get it a bit less overwhelming. The idea Im working on right now is to try and format it in excel and then import to indesign and link the styles.

      Any ideas?

      //Oscar Norling

    • #67720
      David Blatner
      Keymaster

      Sounds like a great job for Data Merge. I have a title about Data Merge at lynda.com and there are also many articles about data merge here on our site (search for data merge in the search field)

    • #67721

      I thought the same, worked alot with data merge previous to this. But the problem is that its not consistent, some contain more posts, some less, and I would need to put each club in a single row in excel. Now they and up pretty much like it looks now, but with new columns where the #´s are.

    • #67722
      Masood Ahmad
      Participant

      Are there Hash (#) symbols in between or are they white spaces or something else. Could you upload 3-4 listings, I’ll try to sort it out. BUT can’t promise.

    • #67723

      Basicly they continue like this, some of the later post (2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email) vary in numbers, sometimes there are two, sometimes seven. But they atleast always looks the same towards the end.

      2320#CITY#1#Number#CLUB
      2320#CITY#1#Chartrad#Mars 1953
      2320#CITY#1#Charterpresident#53-54 N Lastname
      2320#CITY#1#Address#Location#Street1###zipcode#City
      2320#CITY#1#Meeting time#Day#12:00
      2320#CITY#1#Phone#xxxx#xxxxxx
      2320#CITY#1#Email#email@email.com
      2320#CITY#1#Webpage#https://www.gamlegamle.com
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY2#1#Number#CLUB
      2320#CITY2#1#Chartrad#Mars 1953
      2320#CITY2#1#Charterpresident#53-54 N Lastname
      2320#CITY2#1#Address#Location#Street1###zipcode#City
      2320#CITY2#1#Meeting time#Day#12:00
      2320#CITY2#1#Phone#xxxx#xxxxxx
      2320#CITY2#1#Email#email@email.com
      2320#CITY2#1#Webpage#https://www.gamlegamle.com
      2320#CITY2#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY2#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY2#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY2#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY2#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY2#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY3#1#Number#CLUB
      2320#CITY3#1#Chartrad#Mars 1953
      2320#CITY3#1#Charterpresident#53-54 N Lastname
      2320#CITY3#1#Address#Location#Street1###zipcode#City
      2320#CITY3#1#Meeting time#Day#12:00
      2320#CITY3#1#Phone#xxxx#xxxxxx
      2320#CITY3#1#Email#email@email.com
      2320#CITY3#1#Webpage#https://www.gamlegamle.com
      2320#CITY3#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY3#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY3#2#Title#Firstname#Lastname#xxx#xxxxxxx#email
      2320#CITY3#2#Title#Firstname#Lastname#xxx#xxxxxxx#email

      And the # are #.

      Would really appreciate your help!

    • #67724
      Masood Ahmad
      Participant

      P.S.: Also wants to know if there are any Paragraph/Character styles and what applies where?

      I’ll prefer there exact names, if possible.

    • #67725
      Masood Ahmad
      Participant

      Thanks, let me give it a try…

    • #67726

      No paragraph/character styles at this point, I just set up the indesign document to look like what I wanted to achieve. The text/excel file is just raw text.

      Cant give you the exakt names for privacy reasons. But I set theese up to mimic the original text exaktly.

    • #67728
      David Blatner
      Keymaster

      I see what you mean. You may want to look at some of the other database publishing tools out there. I talk about one in my LDC title: InData (from emsoftware.com). There are other, even more robust options, such as DesignMerge from Meadows or EasyCatalog from 65bit.com

      Or, you could also try assigning paragraph styles to this using InDesign Tagged Text.

    • #67734
      Masood Ahmad
      Participant

      Dear Oscar,

      Based upon your sample text, I have tried to write some GREP Find/Change codes, that will help you to automate your task upto some extent. Since I’m not a script writer, I hope someone or David might help you accumulate all the below ten Find/Change GREP queries into one “FindChangeList” Apple or Java script, built-in in InDesign.

      Here are my codes with no formatting. Just run each step by step, you can also use your Paragraph/character style in the “Change Format” options box.

      01_Remove codes.xml
      Find What:
      ^.+(?=(Number|Chartrad|Charterpresident|Address|Meeting time|Phone|Email|Webpage|Title))

      Change to:
      blank (to remove the unwanted stuff)

      02_Change NumberClub.xml
      Find What:
      ^(?i)(Number)#(Club)(?-i)

      Change to:
      $2$1

      03_Change Chartrad.xml
      Find What:
      ^(Chartrad)#(.+)

      Change to:
      $1$2

      04_Change Charterpresident.xml
      Find What:
      ^(Charterpresident)#(.+)

      Change to:
      $1$2

      05_Change Address.xml
      Find What:
      ^(Address)#(\w+)( \w+)?#(\w+)###(\w+)#(\w+)

      Change to:
      $1$2$3,$4,$5 $6

      06_Change Meeting time.xml
      Find What:
      ^(Meeting time)#(.+)#(.+)

      Change to:
      $1$2 $3

      07_Change Phone.xml
      Find What:
      ^(Phone)#(.+)#(.+)

      Change to:
      $1$2-$3

      08_Change Email.xml
      Find What:
      ^(Email)#(.+)

      Change to:
      $1$2

      09_Change Webpage.xml
      Find What:
      ^(Webpage)#(.+)

      Change to:
      $1$2

      10_Change Titles.xml

      Find What:
      ^(Title)#(\w+)#(\w+)#(\w+)#(\w+)#(\w+)

      Change to:
      $1$2 $3$4-$5, $6

      Just try these step by step and let me know it these helps. You can also download these GREP queries from the link given below:
      https://www.hightail.com/download/elNJbGtBUzhkMnNVV01UQw

      and save them under the Find-Change Queries/GREP folder.

      I’m on MAC and my location is:
      //Users/username/Library/Preferences/Adobe%20InDesign/Version%207.0/en_GB/Find-Change%20Queries/GREP/

      …waiting

    • #67912
      Masood Ahmad
      Participant

      Dear Oscar,I’m curious to know the result of my codes. Does they helped?

Viewing 10 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads