Skip to content

Commit

Permalink
Remove old code. Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
NguyenDanPhuong committed Sep 27, 2016
1 parent a246315 commit f21703a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
22 changes: 0 additions & 22 deletions MangaRipper.Core/Helper/ChapterProgress.cs

This file was deleted.

1 change: 0 additions & 1 deletion MangaRipper.Core/MangaRipper.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
<Compile Include="Framework.cs" />
<Compile Include="IMangaService.cs" />
<Compile Include="Downloader.cs" />
<Compile Include="Helper\ChapterProgress.cs" />
<Compile Include="Extension.cs" />
<Compile Include="MangaFoxService.cs" />
<Compile Include="MangaHereService.cs" />
Expand Down
18 changes: 18 additions & 0 deletions MangaRipper.Core/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,21 @@

namespace MangaRipper.Core
{
/// <summary>
/// Looking for manga/chapter information in html, using regex.
/// </summary>
class Parser
{
private static Logger logger = LogManager.GetCurrentClassLogger();

/// <summary>
/// Looking for chapter information in html code.
/// </summary>
/// <param name="regExp">The regex with 2 captured groups.</param>
/// <param name="input">The html code.</param>
/// <param name="nameGroup">The group name that capture chapter name.</param>
/// <param name="valueGroup">The group name that capture chapter url.</param>
/// <returns></returns>
public IList<Chapter> ParseGroup(string regExp, string input, string nameGroup, string valueGroup)
{
logger.Info("> ParseGroup: {0}", regExp);
Expand All @@ -30,6 +41,13 @@ public IList<Chapter> ParseGroup(string regExp, string input, string nameGroup,
return list.Distinct().ToList();
}

/// <summary>
/// Using regex to capture a group with input html code.
/// </summary>
/// <param name="regExp">The regular expression</param>
/// <param name="input">HTML string</param>
/// <param name="groupName">Name of captured group. It's returned information.</param>
/// <returns></returns>
public IList<string> Parse(string regExp, string input, string groupName)
{
logger.Info("> Parse: {0}", regExp);
Expand Down

0 comments on commit f21703a

Please sign in to comment.