Difference between revisions of "User:Cthaeh"
m (moving to talk page) |
m (Protected "User:Cthaeh" ([Edit=Administrators/supervisors only] (indefinite) [Move=Administrators/supervisors only] (indefinite))) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
− | I'm really thankful for the work the translators (and editors) have done so that I am able to read these light novels; so I figured the best way to show my appreciation would be |
+ | I'm really thankful for the work the translators (and editors) have done so that I am able to read these light novels; so I figured the best way to show my appreciation would be editing. I spent some time reading and editing Toaru Majustu no Index, so I'm a little attached to that project. I also try to help out a little with some of the other new and ongoing translations. |
− | |||
+ | These days I also help out with some of the admin'ish tasks and play around with [[User:Cthaeh_bot|my bot]]. |
||
==Italics Macro== |
==Italics Macro== |
||
Line 62: | Line 62: | ||
I spent a little time figuring out a good way to compile all the chapters of a series into a single file, so I figured I'd share it (Really I'm just trying to justify having spent the time to figure it out by pretending that people will actually see this page; now if only I had a way to justify the time spent writing these instructions). I think this would be useful if you're doing multiple edits through an entire series (ie updating terminology). I also find it useful to have a file with all the chapters open just so I can run a search through the series to check for consistency when editing. |
I spent a little time figuring out a good way to compile all the chapters of a series into a single file, so I figured I'd share it (Really I'm just trying to justify having spent the time to figure it out by pretending that people will actually see this page; now if only I had a way to justify the time spent writing these instructions). I think this would be useful if you're doing multiple edits through an entire series (ie updating terminology). I also find it useful to have a file with all the chapters open just so I can run a search through the series to check for consistency when editing. |
||
− | Obviously, if it's a shorter series, then it may be easier to just copy paste each chapter individually than it is to read these instructions (but I didn't want to do that for Index's 300+ chapters). I found the cutoff for which method |
+ | Obviously, if it's a shorter series, then it may be easier to just copy paste each chapter individually than it is to read these instructions (but I didn't want to do that for Index's 300+ chapters). I found the cutoff for me as to which method was more efficient to be around 8 volumes (~10 min); or if I already have the page list done and am repeating (updating) the download, then the cutoff is about 4 volumes (~5 min). |
{| class="wikitable collapsible collapsed" |
{| class="wikitable collapsible collapsed" |
||
Line 78: | Line 78: | ||
*Open the file with Microsoft Word. It will likely bring up a screen about what text code to use. It should automatically select "Unicode 8". That's the one that worked for me |
*Open the file with Microsoft Word. It will likely bring up a screen about what text code to use. It should automatically select "Unicode 8". That's the one that worked for me |
||
+ | *''Note: The following few bullets describe instructions for manually cleaning the xml formatting from the file. I also put a simple macro below that does the exact same thing as these steps (so you don't have to type each one in if you don't want to). |
||
*Use the following in the Find/Replace box (Ctrl-H) to get rid of xml tags between chapters. You will need to check the "use wildcards" option in the find/replace box. Use the "Replace All" button. |
*Use the following in the Find/Replace box (Ctrl-H) to get rid of xml tags between chapters. You will need to check the "use wildcards" option in the find/replace box. Use the "Replace All" button. |
||
::*Find: '''\</text\>*"\>''' Replace with: '''^p^p''' |
::*Find: '''\</text\>*"\>''' Replace with: '''^p^p''' |
||
Line 93: | Line 94: | ||
*Bonus advice: After you've done your editing, you can select each chapter to copy into the wiki with "Find Next" (needs the wildcards turned on). It's easier than holding shift and scrolling down to find the next chapter. |
*Bonus advice: After you've done your editing, you can select each chapter to copy into the wiki with "Find Next" (needs the wildcards turned on). It's easier than holding shift and scrolling down to find the next chapter. |
||
− | ::*Find: '''== |
+ | ::*Find: '''==*/noinclude\>''' |
− | :::-That's actually a poorly defined search term, and it |
+ | :::-That's actually a somewhat poorly defined search term, and it only works if your cursor starts at the start/end of a chapter. But I like to use it. |
− | ::*And I'll add on as a novelty that you can select only chapters that have a certain term with the following (if you were just updating one term or phrase). |
||
− | :::*Find: '''==?*word or phrase*/noinclude?''' |
||
− | |||
Note: This is using Microsoft Word. I imagine you could do the same thing in other document editors, you just may need to modify the replacement rules that rely on wildcards. |
Note: This is using Microsoft Word. I imagine you could do the same thing in other document editors, you just may need to modify the replacement rules that rely on wildcards. |
||
|} |
|} |
||
+ | |||
{| class="wikitable collapsible collapsed" |
{| class="wikitable collapsible collapsed" |
||
Line 121: | Line 120: | ||
Toaru Majutsu no Index:Volume2 Epilogue |
Toaru Majutsu no Index:Volume2 Epilogue |
||
Toaru Majutsu no Index:Volume2 Afterword</pre> |
Toaru Majutsu no Index:Volume2 Afterword</pre> |
||
+ | |} |
||
+ | |||
+ | {| class="wikitable collapsible collapsed" |
||
+ | |- |
||
+ | ! BT_export_cleaning macro code |
||
+ | |- |
||
+ | | |
||
+ | '''NOTE:''' You should copy the code from the edit version of the page. Some of the code gets automatically changed when displayed in the normal view (the &-quot;, &-lt;, &-gt;, and &-amp; (minus the "-") get changed to ", <, > ,&). |
||
+ | <pre> |
||
+ | Sub BT_export_cleaning() |
||
+ | ' |
||
+ | ' BT_export_cleaning Macro |
||
+ | ' Removes the xml formatting that is present in a file downloaded with "Special:Export" |
||
+ | ' Macro recorded 5/25/2013 by Cthaeh |
||
+ | ' Assumes the first character of the first chapter is a "=", if not you will need to manually delete the first block of xml code |
||
+ | |||
+ | Selection.Find.ClearFormatting |
||
+ | Selection.Find.Replacement.ClearFormatting |
||
+ | With Selection.Find |
||
+ | .Text = "\</text\>*""\>" |
||
+ | .Replacement.Text = "^p^p" |
||
+ | .Forward = True |
||
+ | .Wrap = wdFindContinue |
||
+ | .Format = False |
||
+ | .MatchCase = False |
||
+ | .MatchWholeWord = False |
||
+ | .MatchAllWordForms = False |
||
+ | .MatchSoundsLike = False |
||
+ | .MatchWildcards = True |
||
+ | End With |
||
+ | Selection.Find.Execute Replace:=wdReplaceAll |
||
+ | |||
+ | With Selection.Find |
||
+ | .Text = "\</text\>*\</mediawiki\>" |
||
+ | .Replacement.Text = "" |
||
+ | .Forward = True |
||
+ | .Wrap = wdFindContinue |
||
+ | .Format = False |
||
+ | .MatchCase = False |
||
+ | .MatchWholeWord = False |
||
+ | .MatchWildcards = True |
||
+ | .MatchSoundsLike = False |
||
+ | .MatchAllWordForms = False |
||
+ | End With |
||
+ | Selection.Find.Execute Replace:=wdReplaceAll |
||
+ | |||
+ | With Selection.Find |
||
+ | .Text = "\<mediawiki*\>=" |
||
+ | .Replacement.Text = "=" |
||
+ | .Forward = True |
||
+ | .Wrap = wdFindContinue |
||
+ | .Format = False |
||
+ | .MatchCase = False |
||
+ | .MatchWholeWord = False |
||
+ | .MatchWildcards = True |
||
+ | .MatchSoundsLike = False |
||
+ | .MatchAllWordForms = False |
||
+ | End With |
||
+ | Selection.Find.Execute Replace:=wdReplaceAll |
||
+ | |||
+ | With Selection.Find |
||
+ | .Text = """ |
||
+ | .Replacement.Text = """" |
||
+ | .Forward = True |
||
+ | .Wrap = wdFindContinue |
||
+ | .Format = False |
||
+ | .MatchCase = False |
||
+ | .MatchWholeWord = False |
||
+ | .MatchWildcards = False |
||
+ | .MatchSoundsLike = False |
||
+ | .MatchAllWordForms = False |
||
+ | End With |
||
+ | Selection.Find.Execute Replace:=wdReplaceAll |
||
+ | |||
+ | With Selection.Find |
||
+ | .Text = "<" |
||
+ | .Replacement.Text = "<" |
||
+ | .Forward = True |
||
+ | .Wrap = wdFindContinue |
||
+ | .Format = False |
||
+ | .MatchCase = False |
||
+ | .MatchWholeWord = False |
||
+ | .MatchWildcards = False |
||
+ | .MatchSoundsLike = False |
||
+ | .MatchAllWordForms = False |
||
+ | End With |
||
+ | Selection.Find.Execute Replace:=wdReplaceAll |
||
+ | |||
+ | With Selection.Find |
||
+ | .Text = ">" |
||
+ | .Replacement.Text = ">" |
||
+ | .Forward = True |
||
+ | .Wrap = wdFindContinue |
||
+ | .Format = False |
||
+ | .MatchCase = False |
||
+ | .MatchWholeWord = False |
||
+ | .MatchWildcards = False |
||
+ | .MatchSoundsLike = False |
||
+ | .MatchAllWordForms = False |
||
+ | End With |
||
+ | Selection.Find.Execute Replace:=wdReplaceAll |
||
+ | |||
+ | Selection.Find.ClearFormatting |
||
+ | Selection.Find.Replacement.ClearFormatting |
||
+ | With Selection.Find |
||
+ | .Text = "&" |
||
+ | .Replacement.Text = "&" |
||
+ | .Forward = True |
||
+ | .Wrap = wdFindContinue |
||
+ | .Format = False |
||
+ | .MatchCase = False |
||
+ | .MatchWholeWord = False |
||
+ | .MatchWildcards = False |
||
+ | .MatchSoundsLike = False |
||
+ | .MatchAllWordForms = False |
||
+ | End With |
||
+ | Selection.Find.Execute Replace:=wdReplaceAll |
||
+ | End Sub |
||
+ | </pre> |
||
|} |
|} |
Latest revision as of 04:01, 18 December 2015
I guess I'll create this page so the link to my name isn't red anymore...
I'm really thankful for the work the translators (and editors) have done so that I am able to read these light novels; so I figured the best way to show my appreciation would be editing. I spent some time reading and editing Toaru Majustu no Index, so I'm a little attached to that project. I also try to help out a little with some of the other new and ongoing translations.
These days I also help out with some of the admin'ish tasks and play around with my bot.
Italics Macro
Converting Microsoft Word text formatted as italics into the wiki format came up in a discussion. So I copied a visual basic macro from the internet and modified it to add the two single quotes around text that is italicized in Microsoft Word. Just go to Tools -> Macros -> Create New Macro, then paste the following code into visual basic window that pops up, and then save. Go back to Word, open macros again, and hit run on the new macro.
(Nov 25, 2012) Updated macro to better deal with italics that go to the end of a line (previously would put the closing single quotes on the next line), or italics that contain blank lines. Hopefully there aren't any other edge cases / bugs I'm missing.
italics macro code |
---|
Sub convert_italics() Dim oRange As Range With Selection .HomeKey (wdStory) .Find.ClearFormatting End With With Selection.Find .Text = "" .Font.Italic = True .Forward = True .Wrap = wdFindStop Do While .Execute Set oRange = Selection.Range With oRange 'remove the italic .Font.Italic = False If Len(.Text) > 1 Then If Right(.Text, 1) = vbCr Then .Text = "''" & Left(.Text, Len(.Text) - 1) & "''" & Right(.Text, 1) Else .Text = "''" & .Text & "''" End If Else .Text = .Text & "" End If End With Loop End With Set oRange = Nothing Selection.Find.ClearFormatting Selection.HomeKey (wdStory) MsgBox "Finished." End Sub |
Exporting all chapters (edit versions) in a series
I spent a little time figuring out a good way to compile all the chapters of a series into a single file, so I figured I'd share it (Really I'm just trying to justify having spent the time to figure it out by pretending that people will actually see this page; now if only I had a way to justify the time spent writing these instructions). I think this would be useful if you're doing multiple edits through an entire series (ie updating terminology). I also find it useful to have a file with all the chapters open just so I can run a search through the series to check for consistency when editing.
Obviously, if it's a shorter series, then it may be easier to just copy paste each chapter individually than it is to read these instructions (but I didn't want to do that for Index's 300+ chapters). I found the cutoff for me as to which method was more efficient to be around 8 volumes (~10 min); or if I already have the page list done and am repeating (updating) the download, then the cutoff is about 4 volumes (~5 min).
Instructions for exporting all chapters in a series |
---|
Note: This is using Microsoft Word. I imagine you could do the same thing in other document editors, you just may need to modify the replacement rules that rely on wildcards. |
example export page input |
---|
Toaru Majutsu no Index:Volume1 Prologue Toaru Majutsu no Index:Volume1 Chapter1 Toaru Majutsu no Index:Volume1 Chapter2 Toaru Majutsu no Index:Volume1 Chapter3 Toaru Majutsu no Index:Volume1 Chapter4 Toaru Majutsu no Index:Volume1 Epilogue Toaru Majutsu no Index:Volume1 Afterword Toaru Majutsu no Index:Volume2 Prologue Toaru Majutsu no Index:Volume2 Chapter1 Toaru Majutsu no Index:Volume2 Chapter2 Toaru Majutsu no Index:Volume2 Chapter3 Toaru Majutsu no Index:Volume2 Chapter4 Toaru Majutsu no Index:Volume2 Epilogue Toaru Majutsu no Index:Volume2 Afterword |
BT_export_cleaning macro code |
---|
NOTE: You should copy the code from the edit version of the page. Some of the code gets automatically changed when displayed in the normal view (the &-quot;, &-lt;, &-gt;, and &-amp; (minus the "-") get changed to ", <, > ,&). Sub BT_export_cleaning() ' ' BT_export_cleaning Macro ' Removes the xml formatting that is present in a file downloaded with "Special:Export" ' Macro recorded 5/25/2013 by Cthaeh ' Assumes the first character of the first chapter is a "=", if not you will need to manually delete the first block of xml code Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "\</text\>*""\>" .Replacement.Text = "^p^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = "\</text\>*\</mediawiki\>" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = True .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = "\<mediawiki*\>=" .Replacement.Text = "=" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = True .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = """ .Replacement.Text = """" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = "<" .Replacement.Text = "<" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = ">" .Replacement.Text = ">" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "&" .Replacement.Text = "&" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll End Sub |