Module: Bookflow::AppleBooks::Paths

Defined in:
lib/bookflow/apple_books/paths.rb

Constant Summary collapse

ANNOTATION_DB_RELATIVE_PATH =
"Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation/AEAnnotation_v10312011_1727_local.sqlite".freeze
LIBRARY_DB_RELATIVE_PATH =
"Library/Containers/com.apple.iBooksX/Data/Documents/BKLibrary/BKLibrary-1-091020131601.sqlite".freeze

Class Method Summary collapse

Class Method Details

.annotation_db_path(home: Dir.home) ⇒ Object



11
12
13
# File 'lib/bookflow/apple_books/paths.rb', line 11

def annotation_db_path(home: Dir.home)
  Pathname.new(File.join(home, ANNOTATION_DB_RELATIVE_PATH))
end

.library_db_path(home: Dir.home) ⇒ Object



15
16
17
# File 'lib/bookflow/apple_books/paths.rb', line 15

def library_db_path(home: Dir.home)
  Pathname.new(File.join(home, LIBRARY_DB_RELATIVE_PATH))
end

.output_dir(value, pwd: Dir.pwd) ⇒ Object



19
20
21
# File 'lib/bookflow/apple_books/paths.rb', line 19

def output_dir(value, pwd: Dir.pwd)
  Pathname.new(File.expand_path(value, pwd))
end