# Path: dtformats/output_writers.py
# class OutputWriter(object):
# class StdoutWriter(OutputWriter):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):
# 
# Path: dtformats/rp_change_log.py
# class ChangeLogEntry(object):
# class RestorePointChangeLogFile(data_format.BinaryDataFile):
#   def __init__(self):
#   def __init__(self, debug=False, output_writer=None):
#   def _DebugPrintChangeLogEntryRecord(self, change_log_entry_record):
#   def _DebugPrintFileHeader(self, file_header):
#   def _DebugPrintRecordHeader(self, record_header):
#   def _ReadChangeLogEntries(self, file_object):
#   def _ReadChangeLogEntry(self, file_object):
#   def _ReadFileHeader(self, file_object):
#   def _ReadRecord(self, record_data, record_data_offset):
#   def _ReadVolumePath(self, record_data, volume_path_offset):
#   def ReadFileObject(self, file_object):
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('rp_change_log.yaml')
#   _RECORD_SIGNATURE = 0xabcdef12
#   LOG_ENTRY_FLAGS = {
#       0x00000001: 'CHANGE_LOG_ENTRYFLAGS_TEMPPATH',
#       0x00000002: 'CHANGE_LOG_ENTRYFLAGS_SECONDPATH',
#       0x00000004: 'CHANGE_LOG_ENTRYFLAGS_ACLINFO',
#       0x00000008: 'CHANGE_LOG_ENTRYFLAGS_DEBUGINFO',
#       0x00000010: 'CHANGE_LOG_ENTRYFLAGS_SHORTNAME',
#   }
#   LOG_ENTRY_TYPES = {
#       0x00000001: 'CHANGE_LOG_ENTRYTYPES_STREAMCHANGE',
#       0x00000002: 'CHANGE_LOG_ENTRYTYPES_ACLCHANGE',
#       0x00000004: 'CHANGE_LOG_ENTRYTYPES_ATTRCHANGE',
#       0x00000008: 'CHANGE_LOG_ENTRYTYPES_STREAMOVERWRITE',
#       0x00000010: 'CHANGE_LOG_ENTRYTYPES_FILEDELETE',
#       0x00000020: 'CHANGE_LOG_ENTRYTYPES_FILECREATE',
#       0x00000040: 'CHANGE_LOG_ENTRYTYPES_FILERENAME',
#       0x00000080: 'CHANGE_LOG_ENTRYTYPES_DIRCREATE',
#       0x00000100: 'CHANGE_LOG_ENTRYTYPES_DIRRENAME',
#       0x00000200: 'CHANGE_LOG_ENTRYTYPES_DIRDELETE',
#       0x00000400: 'CHANGE_LOG_ENTRYTYPES_MOUNTCREATE',
#       0x00000800: 'CHANGE_LOG_ENTRYTYPES_MOUNTDELETE',
#       0x00001000: 'CHANGE_LOG_ENTRYTYPES_VOLUMEERROR',
#       0x00002000: 'CHANGE_LOG_ENTRYTYPES_STREAMCREATE',
#       0x00010000: 'CHANGE_LOG_ENTRYTYPES_NOOPTIMIZE',
#       0x00020000: 'CHANGE_LOG_ENTRYTYPES_ISDIR',
#       0x00040000: 'CHANGE_LOG_ENTRYTYPES_ISNOTDIR',
#       0x00080000: 'CHANGE_LOG_ENTRYTYPES_SIMULATEDELETE',
#       0x00100000: 'CHANGE_LOG_ENTRYTYPES_INPRECREATE',
#       0x00200000: 'CHANGE_LOG_ENTRYTYPES_OPENBYID',
#   }


import argparse
import logging
import sys
from dtformats import output_writers
from dtformats import rp_change_log

  argument_parser.add_argument(
      '-d', '--debug', dest='debug', action='store_true', default=False,
      help='enable debug output.')

  argument_parser.add_argument(
      'source', nargs='?', action='store', metavar='PATH',
      default=None, help='path of the Windows Restore Point change.log file.')

  options = argument_parser.parse_args()

  if not options.source:
    print('Source file missing.')
    print('')
    argument_parser.print_help()
    print('')
    return False

  logging.basicConfig(
      level=logging.INFO, format='[%(levelname)s] %(message)s')

  output_writer = output_writers.StdoutWriter()

  try:
    output_writer.Open()
  except IOError as exception:
    print('Unable to open output writer with error: {0!s}'.format(exception))
    print('')
    return False


# Path: dtformats/output_writers.py
# class OutputWriter(object):
# class StdoutWriter(OutputWriter):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):
# 
# Path: dtformats/rp_change_log.py
# class ChangeLogEntry(object):
# class RestorePointChangeLogFile(data_format.BinaryDataFile):
#   def __init__(self):
#   def __init__(self, debug=False, output_writer=None):
#   def _DebugPrintChangeLogEntryRecord(self, change_log_entry_record):
#   def _DebugPrintFileHeader(self, file_header):
#   def _DebugPrintRecordHeader(self, record_header):
#   def _ReadChangeLogEntries(self, file_object):
#   def _ReadChangeLogEntry(self, file_object):
#   def _ReadFileHeader(self, file_object):
#   def _ReadRecord(self, record_data, record_data_offset):
#   def _ReadVolumePath(self, record_data, volume_path_offset):
#   def ReadFileObject(self, file_object):
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('rp_change_log.yaml')
#   _RECORD_SIGNATURE = 0xabcdef12
#   LOG_ENTRY_FLAGS = {
#       0x00000001: 'CHANGE_LOG_ENTRYFLAGS_TEMPPATH',
#       0x00000002: 'CHANGE_LOG_ENTRYFLAGS_SECONDPATH',
#       0x00000004: 'CHANGE_LOG_ENTRYFLAGS_ACLINFO',
#       0x00000008: 'CHANGE_LOG_ENTRYFLAGS_DEBUGINFO',
#       0x00000010: 'CHANGE_LOG_ENTRYFLAGS_SHORTNAME',
#   }
#   LOG_ENTRY_TYPES = {
#       0x00000001: 'CHANGE_LOG_ENTRYTYPES_STREAMCHANGE',
#       0x00000002: 'CHANGE_LOG_ENTRYTYPES_ACLCHANGE',
#       0x00000004: 'CHANGE_LOG_ENTRYTYPES_ATTRCHANGE',
#       0x00000008: 'CHANGE_LOG_ENTRYTYPES_STREAMOVERWRITE',
#       0x00000010: 'CHANGE_LOG_ENTRYTYPES_FILEDELETE',
#       0x00000020: 'CHANGE_LOG_ENTRYTYPES_FILECREATE',
#       0x00000040: 'CHANGE_LOG_ENTRYTYPES_FILERENAME',
#       0x00000080: 'CHANGE_LOG_ENTRYTYPES_DIRCREATE',
#       0x00000100: 'CHANGE_LOG_ENTRYTYPES_DIRRENAME',
#       0x00000200: 'CHANGE_LOG_ENTRYTYPES_DIRDELETE',
#       0x00000400: 'CHANGE_LOG_ENTRYTYPES_MOUNTCREATE',
#       0x00000800: 'CHANGE_LOG_ENTRYTYPES_MOUNTDELETE',
#       0x00001000: 'CHANGE_LOG_ENTRYTYPES_VOLUMEERROR',
#       0x00002000: 'CHANGE_LOG_ENTRYTYPES_STREAMCREATE',
#       0x00010000: 'CHANGE_LOG_ENTRYTYPES_NOOPTIMIZE',
#       0x00020000: 'CHANGE_LOG_ENTRYTYPES_ISDIR',
#       0x00040000: 'CHANGE_LOG_ENTRYTYPES_ISNOTDIR',
#       0x00080000: 'CHANGE_LOG_ENTRYTYPES_SIMULATEDELETE',
#       0x00100000: 'CHANGE_LOG_ENTRYTYPES_INPRECREATE',
#       0x00200000: 'CHANGE_LOG_ENTRYTYPES_OPENBYID',
#   }


# Path: scripts/rp_change_log.py
import argparse
import logging
import sys
from dtformats import output_writers
from dtformats import rp_change_log


  argument_parser.add_argument(
      '-d', '--debug', dest='debug', action='store_true', default=False,
      help='enable debug output.')

  argument_parser.add_argument(
      'source', nargs='?', action='store', metavar='PATH',
      default=None, help='path of the Windows Restore Point change.log file.')

  options = argument_parser.parse_args()

  if not options.source:
    print('Source file missing.')
    print('')
    argument_parser.print_help()
    print('')
    return False

  logging.basicConfig(
      level=logging.INFO, format='[%(levelname)s] %(message)s')

  output_writer = output_writers.StdoutWriter()

  try:
    output_writer.Open()
  except IOError as exception:
    print('Unable to open output writer with error: {0!s}'.format(exception))
    print('')
    return False


  change_log_file = rp_change_log.RestorePointChangeLogFile(