File tree Expand file tree Collapse file tree
src/main/kotlin/dev/aa55h/gtfs/processor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 cd gtfs-branch
4040 chmod +x gradlew
4141 ./gradlew updateGtfs --args="../input.zip ./files/$(date +'%Y-%m-%d').zip ../cache.tsv ${{ secrets.MAPYCZ_API_KEY }}"
42- cp ./files/$(date +'%Y-%m-%d').zip .. /files/latest.zip
42+ cp ./files/$(date +'%Y-%m-%d').zip ./files/latest.zip
4343 git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git gtfs
Original file line number Diff line number Diff line change @@ -9,9 +9,11 @@ import java.nio.file.Path
99
1010class StripLinesProcessor (val toRemove : Set <String >) : Processor {
1111 override fun process (input : Path ) {
12- val lines = Files .lines(input).parallel()
13- .filter { line -> toRemove.none { line.contains(it) } }
14- .toList()
12+ val lines = Files .lines(input).use { stream ->
13+ stream.parallel()
14+ .filter { line -> toRemove.none { line.contains(it) } }
15+ .toList()
16+ }
1517
1618 val totalLines = Files .lines(input).count()
1719 val removed = totalLines - lines.size
You can’t perform that action at this time.
0 commit comments