2019-05-02 17:17:27 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-01-09 06:10:19 -06:00
|
|
|
desc "Export all the categories"
|
|
|
|
task "export:categories", [:category_ids] => [:environment] do |_, args|
|
2019-10-23 01:27:14 -05:00
|
|
|
require "import_export"
|
2018-05-28 08:49:26 -05:00
|
|
|
ids = args[:category_ids].split(" ")
|
2017-10-26 15:29:36 -05:00
|
|
|
|
2018-05-28 08:51:06 -05:00
|
|
|
ImportExport.export_categories(ids)
|
2017-11-11 07:22:22 -06:00
|
|
|
puts "", "Done", ""
|
|
|
|
end
|
|
|
|
|
2023-01-09 06:10:19 -06:00
|
|
|
desc "Export only the structure of all categories"
|
|
|
|
task "export:category_structure", %i[include_group_users file_name] => [:environment] do |_, args|
|
2019-10-23 01:27:14 -05:00
|
|
|
require "import_export"
|
2017-11-11 07:22:22 -06:00
|
|
|
|
|
|
|
ImportExport.export_category_structure(args[:include_group_users], args[:file_name])
|
2017-10-26 15:29:36 -05:00
|
|
|
puts "", "Done", ""
|
|
|
|
end
|
2020-04-17 16:59:54 -05:00
|
|
|
|
2023-01-09 06:10:19 -06:00
|
|
|
desc "Export all user groups"
|
|
|
|
task "export:groups", %i[include_group_users file_name] => [:environment] do |_, args|
|
2020-04-17 16:59:54 -05:00
|
|
|
require "import_export"
|
|
|
|
|
|
|
|
ImportExport.export_groups(args[:include_group_users], args[:file_name])
|
|
|
|
puts "", "Done", ""
|
|
|
|
end
|
2022-10-05 14:22:16 -05:00
|
|
|
|
2023-01-09 06:10:19 -06:00
|
|
|
desc "Export all translation overrides"
|
|
|
|
task "export:translation_overrides" => [:environment] do |_, args|
|
2022-10-05 14:22:16 -05:00
|
|
|
require "import_export"
|
|
|
|
|
|
|
|
ImportExport.export_translation_overrides
|
|
|
|
puts "", "Done", ""
|
|
|
|
end
|