Skip to content

Commit baca1fc

Browse files
committed
0.20150709: init version
0 parents  commit baca1fc

File tree

13 files changed

+1098
-0
lines changed

13 files changed

+1098
-0
lines changed

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
PACKAGE = torreadwrite
2+
TARGETS = torread torwrite
3+
4+
CC = gcc
5+
LD = $(CC)
6+
CFLAGS =
7+
LDFLAGS = -s
8+
SRCS = src
9+
RM = rm -fv
10+
11+
.PHONY: all clean
12+
13+
all: $(TARGETS)
14+
15+
torread: $(SRCS)/torread.c
16+
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
17+
18+
torwrite: $(SRCS)/torwrite.c
19+
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
20+
21+
clean:
22+
$(RM) $(TARGETS)

README

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
torreadwrite 0.20150709
2+
VL-LUG
3+
XMPP: <xmpp:[email protected]>
4+
URL: http://www.linuxdv.org/wiki/projects/torrents_editor
5+
SRC: http://linuxdv.ru/forum/download/file.php?id=28
6+
7+
8+
BUILD
9+
10+
$ bash build.sh
11+
12+
INSTALL
13+
14+
$ sudo cp torread /usr/bin
15+
$ sudo cp torwrite /usr/bin
16+
$ sudo cp torreadwrite.1.gz /usr/share/man/man1
17+
$ sudo ln -s /usr/share/man/man1/torreadwrite.1.gz /usr/share/man/man1/torread.1.gz
18+
$ sudo ln -s /usr/share/man/man1/torreadwrite.1.gz /usr/share/man/man1/torwrite.1.gz
19+
20+
SAMPLE
21+
22+
$ torread samplefile.torrent > samplefile.torrent.txt
23+
$ nano samplefile.torrent.txt
24+
25+
$ torwrite samplefile.torrent.txt > samplefile.mod.torrent
26+
27+
STRUCTURE
28+
29+
Content torrent file
30+
31+
Content torrent file is encoded as described above. Himself torrent file is bencoded dictionary with the following keys:
32+
33+
    info: a dictionary describing the files in the torrent. There are two forms of the dictionary, the first to the torrent that contains only one file, and the second - for multi file torrent.
34+
    announce: string with a URL of the tracker.
35+
    announce-list: (optional) list of lists, each of which contains a string with a URL of the tracker.
36+
    creation date: (optional) integer - the creation of a torrent in seconds era UNIX (number of seconds since 00:00:00 01/01/1970).
37+
    comment: (optional) string with an arbitrary comment.
38+
    created by: (optional) string with the name and version of the created torrent file program.
39+
    encoding: (optional) any string of unknown purpose.
40+
41+
In beztrekernom torrent announce and no announce-list, but instead there is an element nodes, which is a list of lists, each of which contains a line with the address and the number of nodes - the port number. Something like nodes = [[«<host>», <port>], [«<host>», <port>], ...]. The simplest option - nodes = [[«127.0.0.1», 6881]].
42+
43+
Dictionary info
44+
45+
The parameters are the same for single-file and multi-file torrents.
46+
47+
    piece length: number of bytes in a piece, usually a power of two.
48+
    pieces: a string of united 20-byte SHA1 hash pieces.
49+
    private: (optional) number. If it is one, the customer to search for peers to be used only tracker (s) specified in the torrent file. If this number is zero, the customer can add peers any methods: manually, or via DHT and Peer Exchange t. D.
50+
51+
For single file torrents:
52+
53+
    name: string filename.
54+
    length: the number of bytes in the file.
55+
    md5sum: (optional) string MD5 sums file. Fucking useless.
56+
57+
For multi file torrent:
58+
59+
    name: string with the name of the directory where all files will be placed.
60+
    files: a list of dictionaries, one for each file. Each dictionary contains the following keys:
61+
    length: the number of bytes in the file.
62+
    md5sum: (optional) string MD5 sums file. Fuck no one needs, as in the previous case.
63+
    path: a list of one or more lines, representing together a file path. The last line - the name of the file, the previous - the sequence of nested directories. For example, the path «dir1 / dir2 / file.ext» will be presented in a list of three lines: «dir1», «dir2», «file.ext».

html/ru/index.html

Lines changed: 383 additions & 0 deletions
Large diffs are not rendered by default.

html/ru/index.rdf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<RDF:RDF xmlns:MAF="http://maf.mozdev.org/metadata/rdf#"
3+
xmlns:NC="http://home.netscape.com/NC-rdf#"
4+
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
5+
<RDF:Description RDF:about="urn:root">
6+
<MAF:originalurl RDF:resource="file:///home/mykaralw/Downloads/html/torreadwrite-wiki_www.linuxdv.org.utf8.html"/>
7+
<MAF:title RDF:resource="Редактирование торрент-файлов - Linux во Владивостоке"/>
8+
<MAF:archivetime RDF:resource="Thu, 09 Jul 2015 19:33:39 +0300"/>
9+
<MAF:indexfilename RDF:resource="index.html"/>
10+
<MAF:charset RDF:resource="UTF-8"/>
11+
</RDF:Description>
12+
</RDF:RDF>

html/ru/index_files/button-dw.png

398 Bytes
Loading
176 Bytes
Loading

html/ru/index_files/button-rss.png

179 Bytes
Loading
317 Bytes
Loading

html/ru/index_files/css.php.css

Lines changed: 173 additions & 0 deletions
Large diffs are not rendered by default.

html/ru/index_files/favicon_ico

7.23 KB
Binary file not shown.

0 commit comments

Comments
 (0)