User:Cthaeh: Difference between revisions

From Baka-Tsuki
Jump to navigation Jump to search
Cthaeh (talk | contribs)
m reorganizing
Cthaeh (talk | contribs)
tips on exporting all volumes in a series for editing purposes
Line 11: Line 11:
(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.
(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.


{| class="wikitable collapsible collapsed"
|-
! italics macro code
|-
|
<pre>
<pre>
Sub convert_italics()
Sub convert_italics()
Line 52: Line 57:
End Sub
End Sub
</pre>
</pre>
|}
==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 which method is more efficient to be around 8 volumes (~10 min); or if I already have the page list done, such as when downloading it again for an updated version, then the cutoff is about 4 volumes (~5 min).
{| class="wikitable collapsible collapsed"
|-
! Instructions for exporting all chapters in a series
|-
|
*Export with [[Special:Export]] page
::*This requires a list of the page names.  You can do it manually, but I personally used Excel to parse the project page with the following equation (after pasting the project page in cell A1)
::*cell B2 = MID(A1,FIND("[[",A1)+2,FIND("|",A1)-FIND("[[",A1)-2)
::*Drag down column B.  Copy column B. Then "paste special"-values into column C.  Delete things like the illustration pages and the full text pages.  Then compile the list of just the pages you want, and paste that list into the export page.
::*Below these instructions are an example of what this should look like.
*Using the export page will download a '.xml' file. After downloading, change the file name from '.xml' to '.txt'.
*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
*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'''
*Use the following to get rid of special xml formatting. Uncheck the "use wildcards" box first.  Use the "Replace All" button. '''Remove the "-" after the & in the Find field''' (I couldn't get my browser to render it otherwise).
::*Find: '''&-quot;'''  Replace with: '''"''' (straight quotes)
::*Find: '''&-lt;'''  Replace with: '''<'''
::*Find: '''&-gt;'''  Replace with: '''>'''
::*Find: '''&-amp;'''  Replace with: '''&'''
*Now there's just a block of xml text left at the beginning and end of the document that you can delete manually.
*And ta da, now you have all the chapters in a series in one file, saving you from a bit of tedious copy-pasting. Though, it still leaves you with the tedious copy pasting to put it back into the wiki after you're done editing (read more for bonus advice).
*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: '''==?*/noinclude?'''
:::-That's actually a poorly defined search term, and it may only work as if your cursor starts at the start/end of a chapter, but I don't have the motivation to think of a better one at the moment. It works just fine for me when I 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.
|}
{| class="wikitable collapsible collapsed"
|-
! example export page input
|-
|
<pre>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</pre>
|}

Revision as of 02:57, 23 May 2013

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 to do edits. I'm currently slowly reading and editing Toaru Majustu no Index to convert the older chapters to the past tense. I plan to do a consistency edit through all of the Index volumes once I've finished reading the main series and the extra stories. I also try to help out a little with some of the other new and ongoing translations.


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.

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 which method is more efficient to be around 8 volumes (~10 min); or if I already have the page list done, such as when downloading it again for an updated version, then the cutoff is about 4 volumes (~5 min).