25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.6 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. Logchecker
  2. ==========
  3. A CD rip logchecker, used for analyzing the generated logs for any problems that would potentially
  4. indicate a non-perfect rip was produced. Of course, just because a log doesn't score a perfect 100%
  5. does not mean that the produced rip isn't bit perfect, it's just less likely. While this library can
  6. largely run on both Linux and Windows, validating of checksums is only really supported for Linux.
  7. While this library will analyze most parts of a log, unfortunately it cannot properly validate the checksums
  8. for all types of logs. This is due to creators of these programs making their logchecker closed source
  9. and involves some amount of custom mathematical work to produce it. Therefore, we have to fallback on
  10. external methods to validate the checksums of EAC and XLD. If the logchecker detects that we do not have
  11. the necessary programs, then we will just skip this external step and assume the checksum is valid. For
  12. setting up the necessary programs to validate the checksum, see below for the given program you care about.
  13. ## Requirements
  14. * PHP 7.0+
  15. * Python3.4+
  16. * [chardet](https://github.com/chardet/chardet)
  17. * [eac_logchecker.py](https://github.com/OPSnet/eac_logchecker.py)
  18. * [xld_logchecker.py](https://github.com/OPSnet/xld_logchecker.py)
  19. ## Installation
  20. ```
  21. $ composer require orpheusnet/logchecker
  22. $ pip3 install chardet eac-logchecker xld-logchecker
  23. ```
  24. ## Usage
  25. ### CLI
  26. ```
  27. $ logchecker list
  28. Logchecker by Orpheus 0.5.0
  29. Usage:
  30. command [options] [arguments]
  31. Options:
  32. -h, --help Display this help message
  33. -V, --version Display this application version
  34. Available commands:
  35. analyze analyze log file
  36. help Displays help for a command
  37. list Lists commands
  38. $ logchecker analyze --help
  39. Description:
  40. analyze log file
  41. Usage:
  42. analyze [options] [--] <file>
  43. Arguments:
  44. file Log file to analyze
  45. Options:
  46. --output Print the HTML log text
  47. -h, --help Display this help message
  48. Help:
  49. This command analyzes a log file
  50. $ logchecker analyze tests/logs/wgdbcm.log
  51. Score : 57
  52. Checksum: false
  53. Details :
  54. [Notice] Translated log from Русский (Russian) to English.
  55. EAC version older than 0.99 (-30 points)
  56. Could not verify read mode (-1 point)
  57. Could not verify read offset (-1 point)
  58. Could not verify null samples
  59. Could not verify gap handling (-10 points)
  60. Could not verify id3 tag setting (-1 point)
  61. ```
  62. ### Code
  63. ```
  64. <?php
  65. $logchecker = new OrpheusNET\Logchecker\Logchecker();
  66. $logchecker->add_file('path/to/file.log');
  67. list($score, $details, $checksum, $log_text) = $logchecker->parse();
  68. ```