Skip to content

Instantly share code, notes, and snippets.

@avinash
Created March 25, 2020 08:54
Show Gist options
  • Select an option

  • Save avinash/e6ceb715f4eb4efee269975edbbb902f to your computer and use it in GitHub Desktop.

Select an option

Save avinash/e6ceb715f4eb4efee269975edbbb902f to your computer and use it in GitHub Desktop.

Revisions

  1. avinash created this gist Mar 25, 2020.
    13 changes: 13 additions & 0 deletions rename_images.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/usr/bin/env python

    import datetime

    base = datetime.datetime(year=2019, month=5, day=11, hour=3, minute=0, second=0)
    delta = datetime.timedelta(hours=3)

    start = 1
    end = 76

    for n in range(start, end + 1):
    print "mv img_{}.jpg {}.jpg".format(n, base.strftime("%Y-%m-%d-%H%MZ"))
    base += delta