* Census format - bulk change
- rodit
- Famous
- Posts: 228
- Joined: 02 Feb 2008 02:39
- Family Historian: V7
- Location: Wollongong, New South Wales, Australia
Census format - bulk change
When I first used AS Census, I used the default 'comma' spacing. It was only after some time and reading in this forum, that I changed to the 'tab' format which I now use all the time. Is it possible to do a 'bulk change' to all the 'comma' formatted records to change them to 'tab' format?
- Jane
- Site Admin
- Posts: 8441
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Re: Census format - bulk change
This is the sort of thing plugins were added for. It may be possible to do this with Mike's enhanced Search and Replace plugin or you may need to write a simple one to select the records that need changing and loop through and replace commas with tab characters.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27084
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Census format - bulk change
Here are some tips for using Search and Replace Plugin V2.1.
Plain Text Settings
On the Major Options tab enter a comma (,) into the Search box and a tab into the Replace box.
The other Search Mode options are unimportant except Confirm the action for every item found should be ticked.
On the Extra Filters tab click Exclude All Short Text and Exclude All Long Text buttons.
Ensure all the tick box options are cleared.
Tick the Text From Source fields option and choose Source (SOUR.TEXT) from the dropdown list.
This will restrict the Search & Replace to just the Source Record - Text From Source fields.
You will be able to review each proposed change and either perform the Replace or Skip it.
The above assumes you are using Source Record - Text From Source fields for your Census transcripts.
Watch out for commas in text such as lists and addresses that use commas as separators and don't need to be changed to tab.
LUA Pattern Settings
Do you have many non-Census transcripts in Text From Source fields that use commas extensively?
Do these usually have a space character after each comma?
Do your Census transcripts NOT have a space character after each comma?
If the answer to each is Yes, the following will avoid all the non-Census transcript commas:
On the Major Options tab enter ,([^ ]) in the Search box and a tab followed by %1 into the Replace box.
Select the LUA Pattern Mode option on the right, then use Search & Replace.
This means search for a comma followed by any character except a space, and capture that character, then replace with a tab and the captured first character.
Alternative Separator
See the how_to:tabulate_multiline_text_in_records_and_reports|> Tabulate Multiline Text in Records and Reports advice.
This suggests that Tab Bar Space is a better separator than just Tab.
To achieve that, just include the | and space characters in the Replace box above.
In any case, that advice talks about needing extra tab and sometimes space characters to achieve tidy columns.
It also advise about how to achieve tidy Report columns.
I am working on an update to the Improve Website or CD DVD HTML Plugin so that web/CD/DVD pages also have tidy columns.
Plain Text Settings
On the Major Options tab enter a comma (,) into the Search box and a tab into the Replace box.
The other Search Mode options are unimportant except Confirm the action for every item found should be ticked.
On the Extra Filters tab click Exclude All Short Text and Exclude All Long Text buttons.
Ensure all the tick box options are cleared.
Tick the Text From Source fields option and choose Source (SOUR.TEXT) from the dropdown list.
This will restrict the Search & Replace to just the Source Record - Text From Source fields.
You will be able to review each proposed change and either perform the Replace or Skip it.
The above assumes you are using Source Record - Text From Source fields for your Census transcripts.
Watch out for commas in text such as lists and addresses that use commas as separators and don't need to be changed to tab.
LUA Pattern Settings
Do you have many non-Census transcripts in Text From Source fields that use commas extensively?
Do these usually have a space character after each comma?
Do your Census transcripts NOT have a space character after each comma?
If the answer to each is Yes, the following will avoid all the non-Census transcript commas:
On the Major Options tab enter ,([^ ]) in the Search box and a tab followed by %1 into the Replace box.
Select the LUA Pattern Mode option on the right, then use Search & Replace.
This means search for a comma followed by any character except a space, and capture that character, then replace with a tab and the captured first character.
Alternative Separator
See the how_to:tabulate_multiline_text_in_records_and_reports|> Tabulate Multiline Text in Records and Reports advice.
This suggests that Tab Bar Space is a better separator than just Tab.
To achieve that, just include the | and space characters in the Replace box above.
In any case, that advice talks about needing extra tab and sometimes space characters to achieve tidy columns.
It also advise about how to achieve tidy Report columns.
I am working on an update to the Improve Website or CD DVD HTML Plugin so that web/CD/DVD pages also have tidy columns.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- rodit
- Famous
- Posts: 228
- Joined: 02 Feb 2008 02:39
- Family Historian: V7
- Location: Wollongong, New South Wales, Australia
Re: Census format - bulk change
Mike
Thanks for that. I have used the Search/Replace before but didn't think of it in this case. I can also tick YES to your second comment = AS inputs for other events, and will have a go at the LUA set up.
Will also look at the Tab Bar Space idea.
Thanks again.
Roger
Thanks for that. I have used the Search/Replace before but didn't think of it in this case. I can also tick YES to your second comment = AS inputs for other events, and will have a go at the LUA set up.
Will also look at the Tab Bar Space idea.
Thanks again.
Roger
- tatewise
- Megastar
- Posts: 27084
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Census format - bulk change
If you choose to use the LUA Pattern method then it will have to be run twice to cope with multiple adjacent commas.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry