Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #130

Merged
merged 2 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions fix_mass/fix_sets/bots/has_url.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
from fix_mass.fix_sets.bots.has_url import has_url_append
MrIbrahem marked this conversation as resolved.
Show resolved Hide resolved
"""
from pathlib import Path

Dir = Path(__file__).parent.parent

studies_done_dir = Dir / "has_url"
if not studies_done_dir.exists():
studies_done_dir.mkdir()

def has_url_append(study_id):
file = studies_done_dir / f"{study_id}.h"
if not file.exists():
file.touch()
2 changes: 1 addition & 1 deletion fix_mass/fix_sets/bots/study_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def filter_members(cat_members):
if not se:
printe.output(f"!{x}")
not_match += 1
# continue
continue
# ---
study_id = se.group(1)
# ---
Expand Down
10 changes: 8 additions & 2 deletions fix_mass/fix_sets/fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import json
MrIbrahem marked this conversation as resolved.
Show resolved Hide resolved
import sys
from pathlib import Path
import xxlimited
# import xxlimited
from newapi import printe

from fix_mass.fix_sets.bots.get_img_info import one_img_info
Expand All @@ -17,6 +17,7 @@
from fix_mass.fix_sets.bots.mv_files import to_move_work
from fix_mass.fix_sets.jsons.files import studies_titles, studies_titles2
from fix_mass.fix_sets.bots.done import studies_done_append, find_done #find_done(study_id)
from fix_mass.fix_sets.bots.has_url import has_url_append

from newapi.ncc_page import MainPage as ncc_MainPage

Expand Down Expand Up @@ -93,7 +94,12 @@ def work_one_study(study_id):
# ---
if text.find("|http") != -1:
printe.output(f"<<red>> text has http links... study_id: {study_id}")
printe.output(text)
has_url_append(study_id)
# printe.output(text)
return
# ---
if not text:
printe.output(f"<<red>> text is empty... study_id: {study_id}")
return
# ---
text = to_move_work(text, to_move)
Expand Down
Loading