blob: 0f9740884a71a4470ed3acd556f4c946240a03cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Cross-referencing code and requirement
---
Example for generating identifier for requirements from user stories:
```bash
# Try to delete ./example/srs_with_id.txt and then run this command
python ./src/storode.py ./example/srs.txt
```
Example for generating web pages:
```bash
# Try to delete ./doc and run this command
python ./src/storode.py ./example/srs_with_id.txt ./example/src
```
A cross-referencing document will be generated at
./doc/example-srs_with_id.html. Open example-srs_with_id.html in a
web browser to view it.
Example for testing collision rate of cut of MD5 digest:
```bash
python ./src/collision.py
```
I cloned this project from https://gitee.com/dragondove/storode. I
fixed the following two bugs.
Bug#1:
>python ./src/storode.py ../englishpal/app/englishpal-srs_with_id.txt ../englishpal/app
Traceback (most recent call last):
File "./src/storode.py", line 241, in <module>
for line in file.readlines():
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 6578: illegal multibyte sequence
Bug#2:
>python ./src/storode.py ../englishpal/app/englishpal-srs_with_id.txt ../englishpal/app
Traceback (most recent call last):
File "./src/storode.py", line 340, in <module>
with open(requirement_out_file, 'w') as out_file:
FileNotFoundError: [Errno 2] No such file or directory: './doc/englishpal-srs_with_id.html'
|