CBR - CBZ conversion

View previous topic View next topic Go down

CBR - CBZ conversion

Post  DP812 on Fri Dec 14, 2012 9:25 pm

I recently discovered Jomic, a free comic reader that can also convert CBR files to CBZ. It works pretty well and can be found at jomic[DOT]sourceforge[DOT]net (board restrictions won't let me post links yet, sorry).

Also, for Mac users, I discovered an AppleScript that will zip multiple folders into separate archives. What I do is select all the CBR files and open with StuffIt Expander, then select them all and run this service and it compresses all the folders into individual ZIP files, then converts them to CBZ. Here's the AppleScript:

on run {input, parameters}
-- create a PKZip archive of the selected Finder item(s)
-- if no destination folder is specified, the archive will be placed in the same location
-- input: a list of Finder items to archive
-- output: a list of Finder items archived

set output to {}
set SkippedItems to {} -- this will be a list of skipped items
set DestinationFolder to missing value -- a Finder path to a destination folder if different

repeat with SomeItem in the input -- step through each item in the input
try
set SomeItem to SomeItem as text
if the last character of SomeItem is in {":", "/"} then set SomeItem to text 1 thru -2 of SomeItem
set ArchiveSource to POSIX path of SomeItem
if DestinationFolder is missing value then -- save the archive to the same location
set ArchiveName to ArchiveSource & ".zip"
else -- save the archive to the specified folder
set TheName to name of (info for SomeItem as alias)
set ArchiveName to (POSIX path of DestinationFolder) & TheName & ".zip"
end if
do shell script "ditto -ck " & (quoted form of ArchiveSource) & space & (quoted form of ArchiveName)
set the end of the output to (POSIX file ArchiveName) as alias -- success
on error ErrorMessage number ErrorNumber
log ErrorMessage
set the end of SkippedItems to SomeItem
end try
end repeat

if SkippedItems is not {} then -- handle skipped items
set TheCount to (count SkippedItems) as text
display alert "Error with Archive action" message TheCount & " items(s) were skipped - workflow will continue"
(*
choose from list SkippedItems with title "Error with Archive action" with prompt "The following items were skipped:" with empty selection allowed
if result is false then error number -128 -- user cancelled
*)
end if

return the output -- pass the result(s) to the next action
end run

I set this up in a Service workflow and after Run AppleScript, I added Rename Finder Items, set it to Replace Text to "Find zip in extension only" and then entered cbz in the "Replace" field.

I'm sure there's a way to also add something to this workflow that will open the CBR archives, but just selecting them all, Open With StuffIt, and then selecting the folders and running the service works fine for me.

Thought some people who have issues with CBR files might find this stuff useful.

DP812

Posts : 74
Join date : 2012-12-08

View user profile

Back to top Go down

Re: CBR - CBZ conversion

Post  Phunetik on Sat Dec 15, 2012 7:28 pm

Just my two cents... mac users have a really easy way to do this conversion: JOMIC.

Works almost flawlessly. PDF, not so much.
avatar
Phunetik

Posts : 70
Join date : 2012-12-02

View user profile

Back to top Go down

Re: CBR - CBZ conversion

Post  DP812 on Sat Dec 15, 2012 9:41 pm

Yeah, I mentioned Jomic at the start of my post. But I thought I'd provide both options just for information's sake.

DP812

Posts : 74
Join date : 2012-12-08

View user profile

Back to top Go down

Re: CBR - CBZ conversion

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum