Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Dec 22, 2024. It is now read-only.
/omitmePublic archive

OmitMe - Your Privacy-Centric, Easily Extendable Data Deletion Solution.

License

NotificationsYou must be signed in to change notification settings

WardPearce/omitme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Your Privacy-Centric, Easily Extendable Data Deletion Solution.

gif of cli

Install

pip install omitme

May need to have chrome installed to function.

Usage

omitme-cli --help

Example

omitme-cli discord loginomitme-cli discord accountsomitme-cli discord target messages-delete-all --account account_name

Tested on

  • Linux ✅
  • Windows ❌
  • MacOS ❌

Supported platforms

Working

  • Discord
  • Reddit

Planned

  • Matrix
  • Twitter

In-progress

  • Work in progress GUI for Linux, MacOS & Windows.GUI

Contributing

Omitme is built to be expandable to other platforms.

See an examplehere

ThePlatform class

Each new platform, show inherit fromPlatform.

classDiscord(Platform):

Each platform class requires some metadata.icon should be stored inomitme/resources/platforms

classDiscord(Platform):api_url="https://discord.com/api/v9"login_url="https://discord.com/login"alias="discord"icon="discord.png"description="Manage your discord data"

Login

Each platform requires a login handler like so.

driver is a instance ofseleniumwire's webdriver

@loginasyncdefhandle_login(self,driver:webdriver.Chrome,accounts:Accounts)->httpx.AsyncClient:pass

Once login is successful, the account should be stored safely usingaccounts.add & your custom HTTPX session should be returned.

@loginasyncdefhandle_login(self,driver:webdriver.Chrome,accounts:Accounts)->httpx.AsyncClient:driver.get(self.login_url)    ...awaitaccounts.add(resp.json()["username"],session={"headers":headers})returnsession

Targets

Targets are the methods called when a user wants to omit something, e.g.omitme-cli reddit target posts-delete-all,posts-delete-all would be our target.

Events

  • CheckingEvent, API call in progress.
  • OmittedEvent, data has been omitted.
  • CompletedEvent, the omitting process is complete.
@target("posts delete all",description="Delete all reddit posts")asyncdefhandle_delete_posts(self,session:httpx.AsyncClient)->AsyncIterator[OmittedEvent|CheckingEvent|FailEvent|CompletedEvent]:resp=awaitsession.get(f"/user/{awaitself._get_username(session)}/submitted",params={"timeframe":"all","limit":"100"},    )forpostinresp.json()["data"]["children"]:awaitself._delete_post(session,post["kind"],post["data"]["id"])yieldOmittedEvent(channel=post["data"]["subreddit"],content=post["data"]["selftext"]        )yieldCompletedEvent()

[8]ページ先頭

©2009-2025 Movatter.jp