Skip to content

Commit

Permalink
Revert "Cleaning up bugs"
Browse files Browse the repository at this point in the history
This reverts commit b674226.
  • Loading branch information
hopto-dot committed Sep 12, 2020
1 parent b674226 commit 94bcd5a
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions Japanese Conjugation Helper/Module1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,6 @@ Module Module1
HTML = Client.DownloadString(New Uri(WordURL))
Dim AddingTemp As String

If HTML.IndexOf("No matches for") <> -1 Then
Console.WriteLine("Looking for similar words...")
End If

If HTML.IndexOf("zen_bar") <> -1 And Anki = False Then
TranslateSentence(Word)
End If
Expand Down Expand Up @@ -438,7 +434,6 @@ Module Module1
Dim WordChoice As Integer = 10000
Dim ActualSearch2ndAppearance As String
Dim Definition1 As String = ""

If WordIndex <> 1 Then 'scraping of words and definitions -------------------------------------------------------------------------------------------
For LoopIndex = 0 To Max - 1
Array.Resize(FoundWords, FoundWords.Length + 1)
Expand Down Expand Up @@ -500,7 +495,6 @@ Module Module1


Next 'end of multiple word scrapping ___________________________________________________________________________
Console.WriteLine("Finalizing...")
Array.Resize(FoundDefinitions, FoundDefinitions.Length - 1)
Array.Resize(FoundWords, FoundDefinitions.Length)
Array.Resize(FoundWordLinks, FoundDefinitions.Length)
Expand Down Expand Up @@ -531,7 +525,7 @@ Module Module1
Console.Clear()
Console.WriteLine("Which definition would you like details for? Type a number, 0 to cancel.")
Console.WriteLine()

Console.WriteLine()
Dim TotalWordsFound As Integer = 0
For looper = 1 To FoundWords.Length
If IsNothing(FoundWords(looper - 1)) = False Then
Expand Down Expand Up @@ -617,7 +611,7 @@ Module Module1
Max = 0 'because we are in the "else" part of the if statement which means that the user inputted no number or 1
WordChoice = 0
End If 'end of one word scrapping and all scrapping _______________________________________________________________________________________________________________________
Console.WriteLine("Building information...")

If WordChoice = 0 Then
WordChoice = 1
End If
Expand All @@ -629,6 +623,8 @@ Module Module1
SelectedDefinition(Add - 1) = SelectedDefinition(Add - 1).Replace("&quot;", QUOTE) & Add
Next



Dim StartingHTML As Integer
StartingHTML = HTML.IndexOf(ActualSearchWord)
HTMLTemp = Mid(HTML, StartingHTML)
Expand All @@ -642,7 +638,7 @@ Module Module1
End If
Dim FullWordType As String = TypeSnip
Dim TypeSnipEnd As Integer = TypeSnip.IndexOf(",") 'This is to check if there is more than one word type

Console.Clear()



Expand Down Expand Up @@ -745,8 +741,6 @@ Module Module1
End If
NumberCheckT = NumberCheckT.Replace(" ", "")

Console.Clear()

If NumberCheckT = NumberCheckD Then
If Definition < DefG1 + 1 Then
If Definition <> 0 Then
Expand Down Expand Up @@ -1360,6 +1354,7 @@ Module Module1
Console.WriteLine("Copied " & QUOTE & KanjisLine & QUOTE & " to clipboard")
Console.ReadLine()


ElseIf LastRequest.ToLower = "anki" Or LastRequest.ToLower = "copy anki" Or Anki = True Then
If FoundTypes.IndexOf("!") = FoundTypes.Length Then
FoundTypes = Left(FoundTypes, FoundTypes.Length - 1)
Expand Down Expand Up @@ -1406,8 +1401,12 @@ Module Module1

If NumberCheckT = NumberCheckD Then

If Definition <> 0 Then
AnkiCopy = vbCrLf & AnkiCopy
End If

If Definition < 10 Then
AnkiCopy = AnkiCopy & (Left(AnkiString(Type), AnkiString(Type).Length - NumberCheckT.Length))
AnkiCopy = AnkiCopy & (Left(AnkiString(Type), AnkiString(Type).Length - NumberCheckT.Length)) & vbCrLf
ElseIf Definition > 9 And AnkiString(Type).IndexOf("aux") <> -1 Or Definition > 9 And AnkiString(Type).IndexOf("irr") Then
AnkiCopy = AnkiCopy & vbCrLf & (Left(AnkiString(Type), AnkiString(Type).Length - NumberCheckT.Length))

Expand All @@ -1422,9 +1421,9 @@ Module Module1

AnkiCopy = AnkiCopy & vbCrLf

AnkiCopy = AnkiCopy & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") & BArea
AnkiCopy = vbCrLf & AnkiCopy & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") & BArea
Else
AnkiCopy = AnkiCopy & vbCrLf & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "")
AnkiCopy = vbCrLf & AnkiCopy & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "")
End If

End If
Expand All @@ -1449,7 +1448,7 @@ Module Module1

If BArea.IndexOf("kana") = -1 Then
If Definition <> 0 Then
'AnkiCopy = AnkiCopy & vbCrLf
AnkiCopy = AnkiCopy & vbCrLf
End If
AnkiCopy = AnkiCopy & vbCrLf & Definition + 1 & ". " & Left(SelectedDefinition(Definition), SelectedDefinition(Definition).Length - NumberCheckD.Length).Replace(BArea, "") & BArea
Else
Expand Down

0 comments on commit 94bcd5a

Please sign in to comment.