Skip to content

Commit

Permalink
Remove gif command
Browse files Browse the repository at this point in the history
Summary: The libraries required for this added too much weight to idb, it can be reintroduced later with a lighter approach if need be

Reviewed By: lawrencelomax

Differential Revision: D15094599

fbshipit-source-id: 1f9c16c21a2818dd3d5b7502f8d647d72b1c7358
  • Loading branch information
c-ryan747 authored and facebook-github-bot committed Apr 26, 2019
1 parent cc1546b commit d90fc1a
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 152 deletions.
5 changes: 0 additions & 5 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,6 @@ idb record video OUTPUT_MP4
```
Starts recording the targets screen, outputting the content to the specified path. The recording can be stopped by pressing `^C`.

```
idb record gif GIF_PATH
```
Gifs can also be recorded. The frame-rate of the produced gif can be controlled with `--fps`.

### Log
```
idb log
Expand Down
29 changes: 0 additions & 29 deletions idb/cli/commands/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,3 @@ async def run_with_client(self, args: Namespace, client: IdbClient) -> None:
await client.record_video(
stop=signal_handler_event("video"), output_file=args.output_file
)


class RecordGifCommand(TargetCommand):
@property
def description(self) -> str:
return "Record the target's screen to generate a gif."

@property
def name(self) -> str:
return "gif"

@property
def aliases(self) -> List[str]:
return ["record-gif"]

def add_parser_arguments(self, parser: ArgumentParser) -> None:
parser.add_argument("output_file", help="gif file to output the recording to")
parser.add_argument(
"--fps", help="fps at which you want to record the gif", type=int, default=1
)
super().add_parser_arguments(parser)

async def run_with_client(self, args: Namespace, client: IdbClient) -> None:
final_gif_path = await client.record_gif(
stop=signal_handler_event("gif record"),
output_file=args.output_file,
fps=args.fps,
)
print(final_gif_path)
Empty file removed idb/cli/helper/__init__.py
Empty file.
82 changes: 0 additions & 82 deletions idb/cli/helper/gif_helper.py

This file was deleted.

5 changes: 2 additions & 3 deletions idb/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
from idb.cli.commands.list_targets import ListTargetsCommand
from idb.cli.commands.log import LogCommand
from idb.cli.commands.open_url import OpenUrlCommand
from idb.cli.commands.record import RecordGifCommand, RecordVideoCommand
from idb.cli.commands.record import RecordVideoCommand
from idb.cli.commands.screenshot import ScreenshotCommand
from idb.cli.commands.set_location import SetLocationCommand
from idb.cli.commands.terminate import TerminateCommand
Expand Down Expand Up @@ -128,9 +128,8 @@ async def gen_main(cmd_input: Optional[List[str]] = None,) -> int:
CommandGroup(
name="record",
description="Record what the screen is doing",
commands=[RecordGifCommand(), RecordVideoCommand()],
commands=[RecordVideoCommand()],
),
RecordGifCommand(),
RecordVideoCommand(),
DeprecatedPushCommand(),
DeprecatedPullCommand(),
Expand Down
3 changes: 0 additions & 3 deletions idb/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,6 @@ async def set_location(self, latitude: float, longitude: float) -> None:
async def approve(self, bundle_id: str, permissions: Set[str]) -> None:
pass

async def record_gif(self, stop: asyncio.Event, output_file: str, fps: int) -> str:
pass

async def record_video(self, stop: asyncio.Event, output_file: str) -> None:
pass

Expand Down
30 changes: 0 additions & 30 deletions idb/ipc/record_gif.py

This file was deleted.

0 comments on commit d90fc1a

Please sign in to comment.