Opened 4 years ago

Closed 17 months ago

#4116 closed change (fixed)

Make infile and outfile parameters of flrender script from python-abp optional

Reported by: kvas Assignee:
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: matze, sebastian, atudor Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29824555/

Description

Background

flrender, the script that renders filter lists, requires two parameters: input file and output file. In some cases, however, it's more convenient to give the input on stdin and receive the output from stdout instead. The two parameters should be made non-mandatory with default output being stdout and default input being stdin to allow this way of using the script.

What to change

  1. Make the parameters non-mandatory with a default value of '-'.
  2. If the output is '-', write to stdout instead of opening a file.
  3. Override get method in TopSource in abp/filters/sources.py to read stdin if the file name is '-'.
  4. Update the documentation accordingly.

Change History (4)

comment:1 Changed 18 months ago by kvas

  • Priority changed from Unknown to P3
  • Ready set

comment:2 Changed 17 months ago by atudor

  • Cc atudor added
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 17 months ago by atudor

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.