Welcome, Guest
Python Scripts for ComicRack
  • Page:
  • 1
  • 2

TOPIC: Rename comics automatically - alternate version

Re:Rename comics automatically - alternate version 9 years 11 months ago #307

  • thavinci
  • thavinci's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Just rewrote the script a little more .. indeed there more characters not allowed in filenames so it should be like this :

[code:1]
newseries = series.replace(':',' -')
newseries = newseries.replace('?','!')
newseries = newseries.replace('/',' & ')
name = newseries + volume + numeral + count + year
[/code:1]

And it can be continued. But then again i'm not a python programmer.
Maybe there is a way to do this with a array ?
The administrator has disabled public write access.

Re:Rename comics automatically - alternate version 9 years 11 months ago #308

  • thavinci
  • thavinci's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Just rewrote the script a little more .. indeed there more characters not allowed in filenames so it should be like this :

[code:1]
newseries = series.replace(':',' -')
newseries = newseries.replace('?','!')
newseries = newseries.replace('/',' & ')
name = newseries + volume + numeral + count + year
[/code:1]

And it can be continued. But then again i'm not a python programmer.
Maybe there is a way to do this with a array ?
The administrator has disabled public write access.

Re:Rename comics automatically - alternate version 9 years 11 months ago #309

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
You can implement a mapping, but that requires much more code than it's worth in this case.
The administrator has disabled public write access.

Re:Rename comics automatically - alternate version 9 years 10 months ago #718

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
Just to clean up thavinci's previous code post, here's what he added to the script. The board update hosed up the code tags.

newseries = series.replace( ':',' -' )
newseries = newseries.replace( '?','!' )
newseries = newseries.replace( '/',' & ' )
name = newseries + volume + numeral + count + year
Last Edit: 9 years 10 months ago by wadegiles.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.158 seconds

Who's Online

We have 259 guests and 3 members online