* update HACKING to mention pep8, data structures, and more test discs * add notice of TODO deprecation * remove ChangeLog, NEWS, and RELEASE from new versions * rename COPYING to LICENSE
73 lines
2.7 KiB
Plaintext
73 lines
2.7 KiB
Plaintext
style guide
|
|
-----------
|
|
|
|
Where possible when writing new code, try to stay as PEP8 compliant as possible.
|
|
We understand that large portions of the codebase are not, but part of our
|
|
ongoing efforts is to clean up whipper.
|
|
|
|
major data structures
|
|
---------------------
|
|
|
|
- image.table.Track: A list of track properties, including a list of indexes,
|
|
the isrc, cdtext, pre-emphasis flag, track number, and track type (audio
|
|
or data)
|
|
|
|
- image.table.Index: A list of track index properties, including the track's path,
|
|
relative and absolute offsets within the track & disc, respectively, as
|
|
well as the track number and counter.
|
|
|
|
- image.table.Table: An ordered list of Track objects, with their leadouts,
|
|
cdtext, and catalog numbers.
|
|
|
|
- image.cue.CueFile: Generates an image.table.Table from a .cue file from an
|
|
existing rip.
|
|
|
|
- image.toc.TocFile: Generates an image.table.Table from a .toc file generated
|
|
by `cdrdao read-toc`.
|
|
|
|
notes
|
|
-----
|
|
|
|
test: single rip of kings of leon - only by the night
|
|
|
|
track 1: frame start 0, 17811 CD frames,
|
|
track 2: frame start 17811, 18481 CD frames
|
|
ARCue.pl says 2c15499a
|
|
track 11: frame start 166858, 25103 CD frames (14760564 audio frames)
|
|
|
|
191961 total CD frames
|
|
|
|
unicode
|
|
-------
|
|
- All text files should be read and written as unicode.
|
|
- All strings that came from the outside should be converted to unicode objects.
|
|
- Use asserts liberally to ensure this so we catch problems earlier.
|
|
- All gst.parse_launch() pipelines should be passed as utf-8; use
|
|
encode('utf-8')
|
|
- morituri.extern.log.log is not unicode-safe; don't pass it unicode objects;
|
|
for example, always use %r to log paths
|
|
- run with RIP_DEBUG=5 once in a while to catch unicode/logging errors.
|
|
- Also use unicode prefix/suffix in tempfile.* methods; to force unicode.
|
|
- filesystems on Unix do not have an encoding. file names are bytes.
|
|
However, most distros default to a utf-8 interpretation
|
|
- You can either treat paths as byte strings all the way without interpreting
|
|
(even when writing them to other files), or assume utf-8 on in and out.
|
|
- also direct output to a file; redirection sets codec to ASCII and brings out
|
|
unicode bugs
|
|
|
|
CDROMS
|
|
------
|
|
|
|
PLEXTOR CD-R PX-W8432T Read offset of device is: 355.
|
|
|
|
test discs
|
|
----------
|
|
Julie Roberts - Julie Roberts: cdparanoia paranoid mode has a false positive
|
|
jitter correction and silently rips the incorrect track. ripping with
|
|
-Z rips the correct track.
|
|
Rush - Test for Echo: has 31 frames of silence in the first track's pregap,
|
|
test for HTOA detection regressions.
|
|
The Strokes - Someday (promo): has 1 frame silence marked as SILENCE
|
|
The Pixies - Surfer Rosa/Come on Pilgrim: has pre-gap, and INDEX 02 on TRACK 11
|
|
Florence & The Machine - Lungs: data track
|