@fraczak/k 4.0.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/sc.py DELETED
@@ -1,25 +0,0 @@
1
- import json
2
- import sys
3
-
4
- # Check if file is provided
5
- if len(sys.argv) != 3:
6
- print("Usage: python speedup_cast.py input.cast output.cast")
7
- sys.exit(1)
8
-
9
- input_file = sys.argv[1]
10
- output_file = sys.argv[2]
11
- speedup_factor = 0.5 # 2x speed
12
-
13
- # Load the original cast file
14
- with open(input_file, 'r') as f:
15
- cast = json.load(f)
16
-
17
- # Update the timing of each event
18
- for event in cast['stdout']:
19
- event[0] = event[0] * speedup_factor
20
-
21
- # Save the modified cast file
22
- with open(output_file, 'w') as f:
23
- json.dump(cast, f)
24
-
25
- print(f"Successfully sped up {input_file} and saved to {output_file}")