Skip to main content

Text Blind Watermark in Python

Project description

text_blind_watermark

Put blind watermark into a text.

PyPI Build Status codecov License Python Platform stars fork Downloads

Can be used in

  • Wechat
  • dingding
  • pages
  • zhihu.com
  • ...

How to Use

install

>pip install text_blind_watermark

Alice Put her text watermark into a text:

from text_blind_watermark import embed, extract

wm = "绝密:两点老地方见!"
sentence = "这句话中有盲水印,你能提取出来吗?" * 16

twm = TextBlindWatermark(password='20190808')
twm.read_wm(watermark=watermark)
twm.read_text(text=text)
text_embed = twm.embed()

print("打上盲水印之后:")
print(text_embed)

Then, you can paste this text to where you need.

Bob Extract the invisible watermark

from text_blind_watermark import embed, extract

twm_new = TextBlindWatermark(password='20190808')
wm_extract = twm_new.extract(text_embed)
print("解出的盲水印:")
print(wm_extract)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text_blind_watermark-0.1.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

text_blind_watermark-0.1.2-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page