anonymous No title
Python
import clipboard
import keyboard
import datetime
import sched
import tweepy
import json
import time
import sys
import re

# ルーム番号 
roomid ="0000"
# 時間
passtime = "00"

username = clipboard.get()
password  = ""
consumerkey = "jCaOKgiyPYyToOkrLX2nIN0no"
consumersecret = "dkpNhenKhbwPRbte7EEiiWXaev6gutBX2ztKLtF5XnuyC8HJNh"
accesstoken = "739121353945538561-JcKN59xjs12pIfYFe9dcJmReh20CSr5"
accesstokensecret = "4xhvxpllulowZQRCglCyQbQEGRxUSq9kqJ4Fsr5fw41bJ"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = datetime.datetime.now()
minute = now.minute

if("/" in str(username)):
	username = username.split("/")
	username = username[3].split("?")
	username = username[0]
else:
	print("リンクをコピーしてください")
	sys.exit()
for a in range(20):  
  for i in range(20) :
    for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
    	tweettime = re.findall(r"\d+",str(status.created_at))
    	if( '@' in status.full_text ):
    	  moto = status.full_text
    	  co = moto.index('@')
    	  kore = list(moto)
    	  del kore[co:]
    	  status.full_ta = ''.join(kore)
    	  tweet = re.findall(r"\d+",status.full_ta)
    	else:
  	    tweet = re.findall(r"\d+",status.full_text)

    tweet0 = ''.join(tweet)
    tweet1 = re.findall(r"\d",tweet0) 
  
    if(passtime in tweettime):
    	print("パスワード!")
    else:
    	print("更新速度 爆速!")
    	time.sleep(0.005)
    	break
  	
    if( roomid in tweet0 ):
      keyboard.insert_text(tweet[1])
      keyboard.insert_text("\n")
      print("password:"+tweet[1])
      sys.exit()
    else:
       keyboard.insert_text(tweet[0])
       keyboard.insert_text("\n")
       print("password:"+tweet[0])
       sys.exit()   
anonymous No title
Python
import notification
import clipboard
import keyboard
import datetime
import calendar
import tweepy
import base64
import json
import time
import glob
import os
import sys
import re
import random
import console
import sound
"""
              ---初期設定---
   
 ①本体コードの貼り付けができたら、29行目の@の後のXXXXを消して(""は消さない)自身のTwitterIDを入れてください。(例 "@twitter_jp")
 ②33行目のDMでもらったコード=""のところに0を消して送られてきたコードを入力してください
 
 
 
"""
"""
   ---使用設定部分---
  
   パスツイ  21:30
   ルーム番号 567
   
      の場合
     ↓↓↓↓↓↓↓↓
     
 pass_tweet_time = "30"      ← 21:00 の場合は"00"  ※分だけを記入します。
 room_id         = "567" 
----- このように下を書き換えます。------
 
"""
pass_tweet_time = "34"
room_id         = "0000" 
"""
     ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     ⚠️以下書き換えると動作しなくなります
   ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
"""
flag     = 0
flag_S   = 0
password = ""
CK = b'dXJkUzNkS0tRMEFWcFZmNGdzVHBTazRYMQ=='
CKS = b'UnRmWFlwYk12Mk44YlpvTGJJeWJ5NGd4a1R1U3NzbnA0ZlJqNU1oUkp5ckpweWxGOXI='
AT = "1121220499621597184-Y0rP3q83f6JnzKBlrggiF0iLZOaE37"
ATS = "7DweypmlnnXIL5dKjGRnZned137n2uHnClYSXyXUL0AcG"
basenumber = "0123456789"
font_item = ["⓪①②③④⑤⑥⑦⑧⑨",
             "⓿❶❷❸❹❺❻❼❽❾",
             "0123456789",
             "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡",]
            
itemlist1 = ["@[a-zA-Z0-9_]+",
             "[0-9]{1,2}:[0-5][0-9]",
             "[0-9]{1,2}時[0-59]分",
             "([0-9]|[0-2][0-9])時",
             "[0-5][0-9]分",
             "[1-9]{1,2}/[0-9]{1,2}",
             "[0-9]{1,2}月([1-3][0-9]|[0-9])日",]
             
             
itemlist2 = [" "," ",]
message  = {
	"no_update":"パスツイ取得中",
	"code_notification":"この数字をDMで伝えてください:",
	"copy_error":"Twitterリンクのコピー又はフルアクセスの許可をしてください",
	"pass_notfound":"パスワードが取得できませんでした",
	"waiting_passtweet":"からのパスツイ待機中...",
	"stop":"動作可能時間内にパスツイが見つかりませんでした。",
	"success":b'SUToqo3oqLzmiJDlip8=',
	"fail":b'SUToqo3oqLzlpLHmlZc=',
	"repush":"パスツイ予定時間の数秒前にもう一度ボタンを押して下さい",
}
"""
  関数
"""
	
def login(CK,CKS,AT,ATS):
	CK = base64.b64decode(CK.decode())
	CKS = base64.b64decode(CKS.decode())
	auth = tweepy.OAuthHandler(str(CK).split("'")[1],str(CKS).split("'")[1])
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API
	
def exit():
	sys.exit()
	
def get_username():
	user_name = clipboard.get()
	if("https" in user_name):
		user_name = user_name.split("/")
		user_name = user_name[3].split("?")
		user_name = user_name[0]
		return user_name
	else:
		print(message["copy_error"])
		sys.exit()
def ACencrtrpt(a):
	c = str(a)
	c = base64.b64encode(c.encode())
	return c
	
def Test(c,d):
	if c == d:
		return True
	else:
		key = glob.glob("*.pwd")
		key = key[0].split(".")[0]
		print(message["code_notification"]+key)
		sys.exit()
		
def check():
	file = glob.glob("*.pwd")
	i = 0
	if not file:
		key = int(random.uniform(1,99))*int(random.uniform(99,999))*int(random.uniform(1,9))
		key = str(key)
		with open(key+".pwd" , mode="w") as f:
			f.write("")
		notification.schedule(message["code_notification"]+key)
		print(message["code_notification"]+key)
		sys.exit()
	else:
		code = file[0].split(".")[0]
		return code,i
							
def tweet_filter(Tweettext):
	for i in range(10):
		if(font_item[0][i] in Tweettext):
			Tweettext = Tweettext.replace(font_item[0][i],basenumber[i])
		for j in range(10):
			if(font_item[1][j] in Tweettext):
				Tweettext = Tweettext.replace(font_item[1][j],basenumber[j])
			for k in range(10):
				if(font_item[2][k] in Tweettext):
					Tweettext = Tweettext.replace(font_item[2][k],basenumber[k])
				for l in range(10):
					if(font_item[3][l] in Tweettext):
						Tweettext = Tweettext.replace(font_item[3][l],basenumber[l])
	return Tweettext
def tweet_trim(tweet):
	tweet = tweet_filter(tweet)
	for i in itemlist1:
		tweet = re.sub(i,"",tweet)
		for j in itemlist2:
			tweet = tweet.replace(j,"")
	tweet = re.findall(r"\d+",tweet)
	return tweet
	
def get_time_now():
	now_time = datetime.datetime.now()
	now_time = str(now_time).split(" ")[1]
	now_time = now_time.split(":")
	now_time_minute = now_time[1]
	now_time_seconds = now_time[2].split(".")[0]
	return now_time_minute,now_time_seconds
	
	
API  = login(CK,CKS,AT,ATS) 
Check , Check2 = check()
Check          = ACencrtrpt(Check)
order = API.user_timeline("auto_test_",count=1)
for i in order:
	order = i.text
	
if("del" in order):
	order = order.split(",")[1]
	order = order+".pwd"
	if(os.path.isfile(order)):
		os.remove(order)
		sys.exit()
elif("mes" in order):
	order_ = order.split(",")[1]
	order_mes = order.split(",")[2]
	order_ = order_+".pwd"
	if(os.path.isfile(order_)):
		print(order_mes)
		sys.exit()
if not Check2 == 0:
	exit()
num = glob.glob("*.pwd")
num = num[0].split(".")[0]
print(num)	
user_name = get_username()
j,k = get_time_now()
if(pass_tweet_time == "00"):
	times = "59"
else:
	times = str(int(pass_tweet_time)-1)
if(j == pass_tweet_time):
	s = 0
elif(j == times and int(k) < 40):
	print(message["repush"])
	sys.exit()
elif not j == times and not j == pass_tweet_time:
	print(message["repush"])
	sys.exit()
print("@"+user_name+message["waiting_passtweet"])
if(pass_tweet_time == "00"):
	passTb = "59"
else:
	passTb = str(int(pass_tweet_time)-1)	
	
while True:
	now_time_minute , now_time_seconds = get_time_now()
	if(now_time_minute == passTb and now_time_seconds == "58"):
		break
	elif(now_time_minute == passTb and now_time_seconds == "59"):
		break
	elif(now_time_minute == pass_tweet_time):	
		c , d = get_time_now()
		flag_S = 0
		break
	time.sleep(0.01)
		
while True:
	
	a , b = get_time_now()
	
	if(flag_S == 0):
		if(b == "12"):
			print(message["stop"])
			sys.exit()
	else:
		if(int(d) >= 50):
			if(b == "59"):
				print(message["stop"])
				sys.exit()
		else:
			if(int(b) == int(d)+12):
				print(message["stop"])
				sys.exit()
				
	tweet = API.user_timeline(user_name,count = 1)
	for i in tweet:
		tweet = i.text
		tweet_time = i.created_at
	
	tweet_time = re.findall(r"\d+",str(tweet_time))
	tweet_time_minute = tweet_time[4]
	tweet_time_second = tweet_time[5]
		
	if(pass_tweet_time == "00"):
		pass_tweet_time_ = "59"
	else:
		pass_tweet_time_ = str(int(pass_tweet_time)-1)
		if(len(pass_tweet_time_) == 1):
			pass_tweet_time_ = "0" + pass_tweet_time_
	for i in range(57,60):
		if(pass_tweet_time_ == tweet_time_minute and str(i) == tweet_time_second):
			flag = 1	
	if(pass_tweet_time == tweet_time_minute):
		flag = 1
		
	if(flag == 1):
		break
	else:
		console.clear()
		print(message["no_update"]+" ["+str(datetime.datetime.now()).split(" ")[1]+"]")
	time.sleep(0.02)
tweet = tweet_trim(tweet)
if(room_id in tweet):
	room_id_index = tweet.index(room_id)
	if(room_id_index == 0):
		password = tweet[1]
	elif(room_id_index == 1):
		password = tweet[0]
	elif(len(tweet) >= 1):
		password = tweet[0]
else:
	password = tweet[0]
sound.play_effect(name="arcade:Explosion_4",volume=1)
keyboard.insert_text(password)
keyboard.insert_text("\n")
notification.schedule(password)
print(password)
sys.exit()
anonymous No title
Python
anonymous No title
Python
import notification
import clipboard
import keyboard
import datetime
import calendar
import tweepy
import base64
import json
import time
import glob
import os
import sys
import re
import random
import console
import sound

"""
              
 貼り付け後タスクを切りTwitterのリンクをコピーします。
     コピー後Python起動⇨右上の▶︎6桁の数字が出るが
     無視でok 設定 
 
 

"""

Twitter_ID = "記入なしでok"

""

"""

DMでもらったコード=""

   ---使用設定部分---
  
   パスツイ  21:30
   ルーム番号 567
   
      の場合
     ↓↓↓↓↓↓↓↓
     
 pass_tweet_time = "30"      ← 21:00 の場合は"00"  ※分だけを記入します。
 room_id         = "567" 

----- このように下を書き換えます。------
 
"""

pass_tweet_time = "00"
room_id         = "0000" 


"""
     ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     ⚠️以下書き換えると動作しなくなります
   ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
"""

flag     = 0
flag_S   = 0
password = ""

CK = b'dXJkUzNkS0tRMEFWcFZmNGdzVHBTazRYMQ=='
CKS = b'UnRmWFlwYk12Mk44YlpvTGJJeWJ5NGd4a1R1U3NzbnA0ZlJqNU1oUkp5ckpweWxGOXI='
AT = "1121220499621597184-Y0rP3q83f6JnzKBlrggiF0iLZOaE37"
ATS = "7DweypmlnnXIL5dKjGRnZned137n2uHnClYSXyXUL0AcG"

basenumber = "0123456789"

font_item = ["⓪①②③④⑤⑥⑦⑧⑨",
             "⓿❶❷❸❹❺❻❼❽❾",
             "0123456789",
             "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡",]
            
itemlist1 = ["@[a-zA-Z0-9_]+",
             "[0-9]{1,2}:[0-5][0-9]",
             "[0-9]{1,2}時[0-59]分",
             "([0-9]|[0-2][0-9])時",
             "[0-5][0-9]分",
             "[1-9]{1,2}/[0-9]{1,2}",
             "[0-9]{1,2}月([1-3][0-9]|[0-9])日",]
             
             
itemlist2 = [" "," ",]

message  = {
	"no_update":"パスツイ取得中",
	"code_notification":"この数字をDMで伝えてください:",
	"copy_error":"Twitterリンクのコピー又はフルアクセスの許可をしてください",
	"pass_notfound":"パスワードが取得できませんでした",
	"waiting_passtweet":"からのパスツイ待機中...",
	"stop":"動作可能時間内にパスツイが見つかりませんでした。",
	"success":b'SUToqo3oqLzmiJDlip8=',
	"fail":b'SUToqo3oqLzlpLHmlZc=',
	"repush":"パスツイ予定時間の数秒前にもう一度ボタンを押して下さい",
}







"""
  関数
"""



	
def login(CK,CKS,AT,ATS):
	CK = base64.b64decode(CK.decode())
	CKS = base64.b64decode(CKS.decode())
	auth = tweepy.OAuthHandler(str(CK).split("'")[1],str(CKS).split("'")[1])
	auth.set_access_token(AT,ATS)
	API = tweepy.API(auth)
	return API
	
def exit():
	sys.exit()
	
def get_username():
	user_name = clipboard.get()
	if("https" in user_name):
		user_name = user_name.split("/")
		user_name = user_name[3].split("?")
		user_name = user_name[0]
		return user_name
	else:
		print(message["copy_error"])
		sys.exit()

def ACencrtrpt(a):
	c = str(a)
	c = base64.b64encode(c.encode())
	return c
	
def Test(c,d):
	if c == d:
		return True
	else:
		key = glob.glob("*.pwd")
		key = key[0].split(".")[0]
		print(message["code_notification"]+key)
		sys.exit()
		
def check():
	file = glob.glob("*.pwd")
	i = 0
	if not file:
		key = int(random.uniform(1,99))*int(random.uniform(99,999))*int(random.uniform(1,9))
		key = str(key)
		with open(key+".pwd" , mode="w") as f:
			f.write("")
		notification.schedule(message["code_notification"]+key)
		print(message["code_notification"]+key)
		sys.exit()
	else:
		code = file[0].split(".")[0]
		return code,i
							
def tweet_filter(Tweettext):
	for i in range(10):
		if(font_item[0][i] in Tweettext):
			Tweettext = Tweettext.replace(font_item[0][i],basenumber[i])
		for j in range(10):
			if(font_item[1][j] in Tweettext):
				Tweettext = Tweettext.replace(font_item[1][j],basenumber[j])
			for k in range(10):
				if(font_item[2][k] in Tweettext):
					Tweettext = Tweettext.replace(font_item[2][k],basenumber[k])
				for l in range(10):
					if(font_item[3][l] in Tweettext):
						Tweettext = Tweettext.replace(font_item[3][l],basenumber[l])
	return Tweettext

def tweet_trim(tweet):
	tweet = tweet_filter(tweet)
	for i in itemlist1:
		tweet = re.sub(i,"",tweet)
		for j in itemlist2:
			tweet = tweet.replace(j,"")
	tweet = re.findall(r"\d+",tweet)
	return tweet
	
def get_time_now():
	now_time = datetime.datetime.now()
	now_time = str(now_time).split(" ")[1]
	now_time = now_time.split(":")
	now_time_minute = now_time[1]
	now_time_seconds = now_time[2].split(".")[0]
	return now_time_minute,now_time_seconds
	
	
API  = login(CK,CKS,AT,ATS) 

Check , Check2 = check()


order = API.user_timeline("auto_test_",count=1)

for i in order:
	order = i.text
	
if("del" in order):
	order = order.split(",")[1]
	order = order+".pwd"
	if(os.path.isfile(order)):
		os.remove(order)
		sys.exit()
elif("mes" in order):
	order_ = order.split(",")[1]
	order_mes = order.split(",")[2]
	order_ = order_+".pwd"
	if(os.path.isfile(order_)):
		print(order_mes)
		sys.exit()

if not Check2 == 0:
	exit()

num = glob.glob("*.pwd")
num = num[0].split(".")[0]
print(num)	
user_name = get_username()


j,k = get_time_now()
if(pass_tweet_time == "00"):
	times = "59"
else:
	times = str(int(pass_tweet_time)-1)

if(j == pass_tweet_time):
	s = 0
elif(j == times and int(k) < 40):
	print(message["repush"])
	sys.exit()
elif not j == times and not j == pass_tweet_time:
	print(message["repush"])
	sys.exit()

print("@"+user_name+message["waiting_passtweet"])

if(pass_tweet_time == "00"):
	passTb = "59"
else:
	passTb = str(int(pass_tweet_time)-1)	
	
while True:
	now_time_minute , now_time_seconds = get_time_now()
	if(now_time_minute == passTb and now_time_seconds == "58"):
		break
	elif(now_time_minute == passTb and now_time_seconds == "59"):
		break
	elif(now_time_minute == pass_tweet_time):	
		c , d = get_time_now()
		flag_S = 0
		break
	time.sleep(0.01)
		
while True:
	
	a , b = get_time_now()
	
	if(flag_S == 0):
		if(b == "12"):
			print(message["stop"])
			sys.exit()
	else:
		if(int(d) >= 50):
			if(b == "59"):
				print(message["stop"])
				sys.exit()
		else:
			if(int(b) == int(d)+12):
				print(message["stop"])
				sys.exit()
				
	tweet = API.user_timeline(user_name,count = 1)
	for i in tweet:
		tweet = i.text
		tweet_time = i.created_at
	
	tweet_time = re.findall(r"\d+",str(tweet_time))
	tweet_time_minute = tweet_time[4]
	tweet_time_second = tweet_time[5]
		
	if(pass_tweet_time == "00"):
		pass_tweet_time_ = "59"
	else:
		pass_tweet_time_ = str(int(pass_tweet_time)-1)
		if(len(pass_tweet_time_) == 1):
			pass_tweet_time_ = "0" + pass_tweet_time_
	for i in range(57,60):
		if(pass_tweet_time_ == tweet_time_minute and str(i) == tweet_time_second):
			flag = 1	
	if(pass_tweet_time == tweet_time_minute):
		flag = 1
		
	if(flag == 1):
		break
	else:
		console.clear()
		print(message["no_update"]+" ["+str(datetime.datetime.now()).split(" ")[1]+"]")
	time.sleep(0.02)

tweet = tweet_trim(tweet)

if(room_id in tweet):
	room_id_index = tweet.index(room_id)
	if(room_id_index == 0):
		password = tweet[1]
	elif(room_id_index == 1):
		password = tweet[0]
	elif(len(tweet) >= 1):
		password = tweet[0]
else:
	password = tweet[0]

sound.play_effect(name="arcade:Coin_3",volume=0.025)
keyboard.insert_text(password)
keyboard.insert_text("\n")
notification.schedule(password)
print(password)
sys.exit()
anonymous No title
Python
import clipboard
import keyboard
import datetime
import sched
import tweepy
import json
import time
import sys
import re

# ルーム番号 
roomid ="0000"
# 時間
passtime = "00"

username = clipboard.get()
password  = ""
consumerkey = "7RlU5czZoXea8c1ZQ1fVCpiol"
consumersecret = "4RNWU0wyQmUxK5LGBv3dpibCJH3c26to3ykAdAX2Uhdlq9LOYt"
accesstoken = "946344237943078912-IMOxe0dDoiZ2gobNnB5nx0oK86c85F9"
accesstokensecret = "VrrQT6iQSMIFkMKAfPJYGElcw7u6lrgrc5puZxrNRw0hl"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = datetime.datetime.now()
minute = now.minute

if("/" in str(username)):
	username = username.split("/")
	username = username[3].split("?")
	username = username[0]
else:
	print("リンクをコピーしてください")
	sys.exit()
for a in range(20):  
  for i in range(20) :
    for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
    	tweettime = re.findall(r"\d+",str(status.created_at))
    	if( '@' in status.full_text ):
    	  moto = status.full_text
    	  co = moto.index('@')
    	  kore = list(moto)
    	  del kore[co:]
    	  status.full_ta = ''.join(kore)
    	  tweet = re.findall(r"\d+",status.full_ta)
    	else:
  	    tweet = re.findall(r"\d+",status.full_text)

    tweet0 = ''.join(tweet)
    tweet1 = re.findall(r"\d",tweet0) 
  
    if(passtime in tweettime):
    	print("パスワード!")
    else:
    	print("更新中")
    	time.sleep(0.000000001)
    	break
  	
    if( roomid in tweet0 ):
      keyboard.insert_text(tweet[1])
      keyboard.insert_text("\n")
      print("password:"+tweet[1])
      sys.exit()
    else:
       keyboard.insert_text(tweet[0])
       keyboard.insert_text("\n")
       print("password:"+tweet[0])
       sys.exit()   
anonymous No title
Python
import clipboard
import keyboard
import datetime
import sched
import tweepy
import json
import time
import sys
import re

# ルーム番号 
roomid ="0000"
# 時間
passtime = "00"

username = clipboard.get()
password  = ""
consumerkey = "7RlU5czZoXea8c1ZQ1fVCpiol"
consumersecret = "4RNWU0wyQmUxK5LGBv3dpibCJH3c26to3ykAdAX2Uhdlq9LOYt"
accesstoken = "946344237943078912-IMOxe0dDoiZ2gobNnB5nx0oK86c85F9"
accesstokensecret = "VrrQT6iQSMIFkMKAfPJYGElcw7u6lrgrc5puZxrNRw0hl"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = datetime.datetime.now()
minute = now.minute

if("/" in str(username)):
	username = username.split("/")
	username = username[3].split("?")
	username = username[0]
else:
	print("リンクをコピーしてください")
	sys.exit()
for a in range(20):  
  for i in range(20) :
    for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
    	tweettime = re.findall(r"\d+",str(status.created_at))
    	if( '@' in status.full_text ):
    	  moto = status.full_text
    	  co = moto.index('@')
    	  kore = list(moto)
    	  del kore[co:]
    	  status.full_ta = ''.join(kore)
    	  tweet = re.findall(r"\d+",status.full_ta)
    	else:
  	    tweet = re.findall(r"\d+",status.full_text)

    tweet0 = ''.join(tweet)
    tweet1 = re.findall(r"\d",tweet0) 
  
    if(passtime in tweettime):
    	print("パスワード!")
    else:
    	print("更新中")
    	time.sleep(0.000000001)
    	break
  	
    if( roomid in tweet0 ):
      keyboard.insert_text(tweet[1])
      keyboard.insert_text("\n")
      print("password:"+tweet[1])
      sys.exit()
    else:
       keyboard.insert_text(tweet[0])
       keyboard.insert_text("\n")
       print("password:"+tweet[0])
       sys.exit()   
anonymous No title
Python
#インストール
#pip install python-docx
#pip install python-pptx

from docx import Document
from pptx import Presentation
from pptx.util import Inches
from pptx.enum.text import PP_ALIGN
from pptx.util import Cm, Pt
import glob

def add_text(slide, msg, left, top, width, height, font_size, is_bold):
    """
    パワーポイントにおける、テキストボックスの挿入とテキストの記入の関数
    args:
        slide[slide]: Slide object
        msg[str]: Text box message
        left[int]: Position from the left end (cm)
        top[int] : Position from top (cm)
        width[int]: Width of object(cm)
        height[int]: Height of object (cm)
        font_size[int]: Font size
        is_bold[str]: Whether to make the text bold (Write True or None)
    return:
        None
    """
    txtbox = slide.shapes.add_textbox(Cm(left), Cm(top), Cm(width), Cm(height))
    p = txtbox.text_frame.add_paragraph()
    p.text = msg
    p.font.size = Pt(font_size)
    p.font.bold = is_bold

ppt = Presentation() #スライドオブジェクトの定義

#スライドのサイズをA4サイズに変更
ppt.slide_width = 7560000
ppt.slide_height = 10692000

blank_slide_layout = ppt.slide_layouts[6] #白紙スライドの定義

ppt.save('test.pptx') #パワーポイントの保存

import docx
files = glob.glob("*.docx") #ipynbと同じフォルダに保存されたDocxファイルをすべて読み込む
new_files = sorted(files) #昇順に並び替え

#白紙ページの追加
if len(new_files)%2 == 0:
    for p in range(len(new_files)//2):
        ppt.slides.add_slide(blank_slide_layout) #白紙スライドの追加
else:
    for q in range(len(new_files)//2+1):
        ppt.slides.add_slide(blank_slide_layout) #白紙スライドの追加

#のちに登場するテキストボックスの座標
title_position_left = 1
text_position_left = 4

#Wordからパワーポイントへ
for i in range(1, len(new_files)+1):
    doc = docx.Document(new_files[i-1]) #Word文書の読み込み
    
    #読み込んだWord文章の中の1つ目の表からテキストのみを抽出し、リスト化
    tbl = doc.tables[0]
    texts = []
    for row in tbl.rows:
        row_text = []
        for cell in row.cells:
            row_text.append(cell.text)
        texts.append(row_text)
    
    #リストから特定のテキストを抽出
    subject = texts[1][1] #演題
    speaker = texts[2][1] #演者
    office = texts[3][1] #配属先
    teacher = texts[4][1] #指導教員
    abstract = texts[5][1] #発表概要
    keywords = texts[6][1] #キーワード
    #発表番号はファイル名から抽出
    number = new_files[i-1][:-5]
    
    #1ページに2人分の抄録を載せるので条件分岐
    if i%2 == 1:
        add_text(ppt.slides[(i+1)//2-1], "発表番号:", title_position_left, 2, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "演題:", title_position_left, 2.7, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "日時・場所:", title_position_left, 3.4, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "演者:", title_position_left, 4, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "配属先:", title_position_left, 4.6, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "指導教員:", title_position_left, 5.2, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "発表概要:", title_position_left, 5.8, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "キーワード:", title_position_left, 11.8, 5, 0.76, 12, None)

        add_text(ppt.slides[(i+1)//2-1], number, text_position_left, 2, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], subject, text_position_left, 2.6, 5, 0.76, 16, True)
        add_text(ppt.slides[(i+1)//2-1], " ", text_position_left, 3.4, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], speaker, text_position_left, 4, 5, 0.76, 12, True)
        add_text(ppt.slides[(i+1)//2-1], office, text_position_left, 4.6, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], teacher, text_position_left, 5.2, 5, 0.76, 12, None)
        #発表概要のみ33文字で分けて改行している風にしている。実際には33(34)文字ごとに文字列を抽出している。英語には対応してません(泣)
        #句読点が各行の先頭に来ないようにしています。
        text_ab = 0
        while text_ab+34 < len(abstract):
            text_ab += 33
            if abstract[text_ab] == "、":
                text_ab += 1
                add_text(ppt.slides[(i+1)//2-1], abstract[text_ab-34:text_ab], text_position_left, 5.8+(text_ab//33-1)*0.6, 5, 0.76, 13, None)
            elif abstract[text_ab] == "。":
                text_ab += 1
                add_text(ppt.slides[(i+1)//2-1], abstract[text_ab-34:text_ab], text_position_left, 5.8+(text_ab//33-1)*0.6, 5, 0.76, 13, None)
            else:
                add_text(ppt.slides[(i+1)//2-1], abstract[text_ab-33:text_ab], text_position_left, 5.8+(text_ab//33-1)*0.6, 5, 0.76, 13, None)
        add_text(ppt.slides[(i+1)//2-1], abstract[text_ab:], text_position_left, 5.8+(text_ab//33)*0.6, 5, 0.76, 13, None)
        add_text(ppt.slides[(i+1)//2-1], keywords, text_position_left, 11.8, 5, 0.76, 12, None)
        
    else:
        add_text(ppt.slides[(i+1)//2-1], "発表番号:", title_position_left, 2 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "演題:", title_position_left, 2.7 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "日時・場所:", title_position_left, 3.4 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "演者:", title_position_left, 4 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "配属先:", title_position_left, 4.6 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "指導教員:", title_position_left, 5.2 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "発表概要:", title_position_left, 5.8 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], "キーワード:", title_position_left, 11.8 + 13, 5, 0.76, 12, None)
        
        add_text(ppt.slides[(i+1)//2-1], number, text_position_left, 2 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], subject, text_position_left, 2.6 + 13, 5, 0.76, 16, True)
        add_text(ppt.slides[(i+1)//2-1], " ", text_position_left, 3.4 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], speaker, text_position_left, 4 + 13, 5, 0.76, 12, True)
        add_text(ppt.slides[(i+1)//2-1], office, text_position_left, 4.6 + 13, 5, 0.76, 12, None)
        add_text(ppt.slides[(i+1)//2-1], teacher, text_position_left, 5.2 + 13, 5, 0.76, 12, None)
        #発表概要のみ33文字で次の行に行っている風にしている。実際には33(34)文字ごとに文字列を抽出している。英語には対応してません(泣)
        #句読点が各行の先頭に来ないようにしています。
        text_ab = 0
        while text_ab+34 < len(abstract):
            text_ab += 33
            if abstract[text_ab] == "、":
                text_ab += 1
                add_text(ppt.slides[(i+1)//2-1], abstract[text_ab-34:text_ab], text_position_left, 5.8+(text_ab//33-1)*0.6+13, 5, 0.76, 13, None)
            elif abstract[text_ab] == "。":
                text_ab += 1
                add_text(ppt.slides[(i+1)//2-1], abstract[text_ab-34:text_ab], text_position_left, 5.8+(text_ab//33-1)*0.6+13, 5, 0.76, 13, None)
            else:
                add_text(ppt.slides[(i+1)//2-1], abstract[text_ab-33:text_ab], text_position_left, 5.8+(text_ab//33-1)*0.6+13, 5, 0.76, 13, None)
        add_text(ppt.slides[(i+1)//2-1], abstract[text_ab:], text_position_left, 5.8+(text_ab//33)*0.6+13, 5, 0.76, 13, None)
        add_text(ppt.slides[(i+1)//2-1], keywords, text_position_left, 11.8 + 13, 5, 0.76, 12, None)
    
    ppt.save('test.pptx') #パワーポイントの保存
anonymous No title
Python
print(uhfuhs)
anonymous No title
Python
anonymous No title
Python
import notification
import clipboard
import keyboard
import datetime
import tweepy
import json
import time
import glob
import calendar
import os
import sys
import re


# ""はけさないでね☺︎

# ルーム番号
roomid = "0000" 
# パスツイ分
passtime = "00"



username = clipboard.get()
password  = ""
path1 = "/"
path2 = ".pa"
times = str(datetime.datetime.now())
file = glob.glob("*.pa")
	
text1 = "⓪①②③④⑤⑥⑦⑧⑨"
text2 = "⓿❶❷❸❹❺❻❼❽❾"
text3 = "0123456789"
text4 = "0123456789"
text5 = "𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡"

b6ck = b'V09yaVdwZFRmSHh2OWVpWVZ0NDFIYktFRg=='
b6cks = b'RVFNNmpvRDZyTThXRnlBTm5qUTlDMHIyVERIZnlsSGd3emVUTmpoMXJCRGZReUZoWlU='


consumerkey = "jCaOKgiyPYyToOkrLX2nIN0no"
consumersecret = "dkpNhenKhbwPRbte7EEiiWXaev6gutBX2ztKLtF5XnuyC8HJNh"
accesstoken = "739121353945538561-JcKN59xjs12pIfYFe9dcJmReh20CSr5"
accesstokensecret = "4xhvxpllulowZQRCglCyQbQEGRxUSq9kqJ4Fsr5fw41bJ"

Auth = tweepy.OAuthHandler(consumerkey,consumersecret)
Auth.set_access_token(accesstoken,accesstokensecret)
Api = tweepy.API(Auth)

now   = datetime.datetime.now()
minute = now.minute

if("/" in str(username)):
	username = username.split("/")
	username = username[3].split("?")
	username = username[0]
else:
	print("パスツイ主のリンクをコピーしてください")
	sys.exit()

for i, status in enumerate(tweepy.Cursor(Api.user_timeline,id=username,tweet_mode="extended").items(1)):
	tweet = status.full_text
	tweettime = status.created_at
	
a = 0
for i in text1:
	if(i in tweet):
		tweet = tweet.replace(i,text3[a])
	a = a + 1
a = 0
for i in text2:
	if(i in tweet):
		tweet = tweet.replace(i,text3[a])
	a = a + 1
a = 0
for i in text4: 
	if(i in tweet):
		tweet = tweet.replace(i,text3[a])
	a = a + 1	
a = 0
for i in text5:
	if(i in tweet):
		tweet = tweet.replace(i,text3[a])
	a = a + 1	
	
	
tweet = re.findall(r"\d+",tweet)
tweettime = re.findall(r"\d+",str(tweettime))

count = len(tweet)

# Just パスツイ
if(passtime in tweettime):
	print("loading...")
else:
    	
    	print("パスツイ待機中")
    	print(datetime.datetime.now())
    	max_iter = 10
    	time.sleep(0.0000001)
    

if(len(tweet) == 0):
   print("パスワードが見つかりませんでした。")
   sys.exit()
elif(roomid in tweet and count >= 2):
	roomidindex = tweet.index(roomid)
	password = tweet[roomidindex+1]
elif(count == 1):
	password = tweet[0]
elif(count >= 2):
	if(int(len(tweet[0])) == 2 and int(len(tweet[1]) == 2)):
		password = tweet[2]


if(password == ""):
	print("対応していない形式です。")
else:
	notification.schedule(password)
	keyboard.insert_text(password)
	keyboard.insert_text("\n")
	print("Password:"+password)
Don't you submit code?
Submit