telegram-export icon indicating copy to clipboard operation
telegram-export copied to clipboard

Improve whitelist and blacklist generality

Open expectocode opened this issue 6 years ago • 4 comments

Like telegram-history-dump allows, it would be nice to say "dump all channels" or "dump everything except supergroups"

expectocode avatar May 29 '18 22:05 expectocode

@expectocode any suggested syntax or that's yet to be decided?

Lonami avatar May 29 '18 22:05 Lonami

yet to be decided. I also quite like the idea of history-dump's whitelist sections by dialog type, which would also provide a handy way of adding this syntax

expectocode avatar May 29 '18 22:05 expectocode

Let's replicate the one used by history-dump, unless someone has any issues with that:

  ## Backup targets ##
  #
  # Array of strings for each category
  # Strings can be either a (partial) name or a telegram-cli "peer_id" value
  # An empty array means "everything in this category"
  # An array containing only null means "nothing in this category"

  # Array of user dialogs to backup
  backup_users: [

  ]

  # Array of group dialogs to backup
  backup_groups: [

  ]

  # Array of supergroup dialogs to backup
  backup_supergroups: [
    null
  ]

  # Array of broadcast channels to backup
  # WARNING: using this can cause a crash when a channel has too many messages
  # to fit in a single chunk (see https://github.com/vysheng/tg/issues/947)
  backup_channels: [
    null
  ]

  # Array of (partial) names / peer IDs *not* to backup even if they match
  # any of the above target selectors
  blacklist: [

  ]

mkellerman avatar Jun 08 '18 19:06 mkellerman

@mkellerman That uses some YAML specific stuff, so we would do something similar but slightly different since we're using INI

expectocode avatar Jun 08 '18 19:06 expectocode