All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.4.1 - 2022.07.21
- cli add
--hash-raw
,-r
option to use raw hash strategy.
- Fix fields order in CLI output may not as same as it in origin files.
- Remove useless dependency
typing_extensions
.(#12)
0.4.0 - 2022.01.17
- Add
usebytes
error handler. It will usestrict
mode when decoding bytes to string, but if error happened, it returns raw bytes instead of raise exception. - Add
TorrentFileCreator
class. - Internal Add
DataWrapper
andJSONEncoderDataWrapperBytesToString
for output convertbytes
intostring
when output using json format. CLI output needs them, but normal users should not use those two class.
- Default mode of
parse_torrent_file
andTorrentFileParser
change tousebytes
. - BREAK!
BEcoder
andBDecoder
will not treat any field as hash fields by default. BDecoder
accept file-like object as input.
0.3.0 - 2018.06.23
- Add
errors
option inTorrentFileParser
andparse_torrent_file
to let user set the encoding error handler. (Thanks @yasuotakei) - Add
-e
/--error
to CLI option to set theerrors
option ofparse_torrent_file
. BDecoder
class anddecode
shortcut function to directly decode bytes.decode
shortcut function to directly encode data to bytes.- Added
hash_fields
parameter and method to customize hash field list. - Added
hash_raw
parameter to let all hash field be parsed as raw bytes.
- BreakChange
TorrentFileCreator
rename toBEncoder
as the origin name don't describe its function. TorrentFileParser
don't need the outmost level of parsed data to be adict
now.BEncoder
don't need the outmost level of encoded data to be adict
now.BEncoder
now support encode raw bytes.
0.2.0 - 2018.5.25
- Just bump version to 0.2.0 to follow semver.
0.1.5rc1 - 2018.4.28
TorrentFileCreator
class andcreate_torrent_file
shortcut function for write back data to a torrent file.
0.1.4 - 2018-04-06
encoding
option can beauto
, which will usechardet
package to decide which encoding to use. Ifchardet
is noe installed, will raise a warning and fallback to 'utf-8'. (Thanks to @ltfychrise)- Add changelog.
- Reorganize test codes/files.
- Fix integer filed can't be negative bug. (Thanks to @ltfychrise)
- Fix
_seek_back
method not make_pos
back bug. (Thanks to @ltfychrise)
0.1.3 - 2017-06-21
- Now
UnicodeDecodeError
is wrapped inInvalidTorrentDataException
.
- Use
IOError
instead ofFileNotFoundError
in Python 2.
InvalidTorrentFileException
rename toInvalidTorrentDataException
.
0.1.2 - 2017-06-21
- Emm, I don't know, I just changed the version code...
0.1.1 - 2017-06-20
- CLI add coding
--coding/-c
option for file string filed encoding.
ed2k
andfilehash
field now use same structure as 'pieces'.
0.1.0 - 2017-05-23
- Parse torrent from file and data into a dict.
- CLI provided.
- Simple tests.
- Available on pip.