Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020_21 J-25
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2020_21 J-25
2020_21 J-25
Commits
ca25e84a
Commit
ca25e84a
authored
Jul 09, 2021
by
Ramachandran Rajeevaletshanth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 2.CV_Uploader.py
parent
c0684ebe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
3 deletions
+47
-3
IT17163682/2.CV_Uploader.py
IT17163682/2.CV_Uploader.py
+47
-3
No files found.
IT17163682/2.CV_Uploader.py
View file @
ca25e84a
#Text to String (utf-8)
import
re
import
os
from
chardet
import
detect
import
docx2txt
import
docx2txt
#Upload Resume
CV
=
docx2txt
.
process
(
"se resume.docx"
)
CV
=
docx2txt
.
process
(
"C:/Users/User/Desktop/New folder (12)/Applicant_Ranker - Copy/UploadedCV/Mahela.docx"
)
with
open
(
"Resume.txt"
,
"w"
)
as
text_file
:
with
open
(
"Resume.txt"
,
"w"
)
as
text_file
:
print
(
CV
,
file
=
text_file
)
print
(
CV
,
file
=
text_file
)
\ No newline at end of file
# get file encoding type
def
get_encoding_type
(
file
):
with
open
(
file
,
'rb'
)
as
f
:
rawdata
=
f
.
read
()
return
detect
(
rawdata
)[
'encoding'
]
from_codec
=
get_encoding_type
(
'Resume.txt'
)
#Resume convertion
try
:
with
open
(
'Resume.txt'
,
'r'
,
encoding
=
from_codec
)
as
f
,
open
(
'ResumeStr.txt'
,
'w'
,
encoding
=
'utf-8'
)
as
e
:
text
=
f
.
read
()
# for small files, for big use chunks
e
.
write
(
text
)
except
UnicodeDecodeError
:
print
(
'Decode Error'
)
except
UnicodeEncodeError
:
print
(
'Encode Error'
)
f
=
open
(
"ResumeStr.txt"
,
"r"
)
content
=
f
.
read
()
def
check
(
string
):
regex
=
re
.
compile
(
"twitter.+
\
w*"
)
match_object
=
regex
.
findall
(
string
)
if
len
(
match_object
)
!=
0
:
for
word
in
match_object
:
return
word
else
:
print
(
"No Twitter Details"
)
Twitter_link
=
str
(
check
(
content
))
Twitter_ID
=
Twitter_link
[
Twitter_link
.
find
(
"/"
)
+
1
:]
with
open
(
'TwitterID.txt'
,
'w'
)
as
the_file
:
the_file
.
write
(
Twitter_ID
)
#print(Twitter_ID)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment