-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from codingpot/feat/169/add-pr-332-339
feat: add PR videos
- Loading branch information
Showing
5 changed files
with
10,059 additions
and
8,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,25 @@ | ||
# Metadata manager | ||
|
||
## 1. Generate a metadata from the mapping table | ||
|
||
MappingTable(database.proto) | ||
|
||
```proto | ||
message MappingTable { | ||
repeated MappingTableRow rows = 1; | ||
} | ||
message MappingTableRow { | ||
int32 pr_id = 1; | ||
repeated string paper_arxiv_id = 2; | ||
string youtube_video_id = 3; | ||
} | ||
``` | ||
|
||
Database(database.proto) | ||
|
||
```proto | ||
message Database { | ||
map<int32, PrVideo> pr_id_to_video = 1; | ||
} | ||
// PR영상의 하나의 레코드 | ||
message PrVideo { | ||
int32 pr_id = 1; | ||
// 관련도에 따라 정렬 | ||
repeated Paper papers = 2; | ||
YouTubeVideo video = 3; | ||
} | ||
// 유튜브 1편에 대한 정보 | ||
// `pkg.pr12er.Video` 생성하기 위해 사용됩니다. | ||
message YouTubeVideo { | ||
string video_id = 1; | ||
string video_title = 2; | ||
int64 number_of_likes = 3; | ||
int64 number_of_views = 4; | ||
google.protobuf.Timestamp published_date = 5; | ||
string uploader = 6; | ||
} | ||
``` | ||
|
||
2. | ||
# dbctl | ||
|
||
`dbctl` 은 데이터베이스 파일을 업데이트 하는데 사용됩니다. | ||
|
||
## 새로운 PR 영상을 추가하기 | ||
|
||
1. PR 영상의 유튜브 주소를 획득합니다. | ||
2. 아래 스크립트를 실행합니다 (bash 기준). | ||
|
||
```bash | ||
youtube_links=( | ||
https://youtu.be/-5fFL68d7Gg | ||
https://youtu.be/I9kQwMbpxuE | ||
https://youtu.be/HWf8CmTAIR4 | ||
https://youtu.be/FFXAm2uTmeI | ||
https://youtu.be/20kxrS2yglg | ||
https://youtu.be/BZwUR9hvBPE | ||
https://youtu.be/hptinxZIXT4 | ||
) | ||
|
||
for youtube in ${youtube_links[@]} | ||
do | ||
go run main.go youtube --youtube-link $youtube >> ../server/internal/data/mapping_table.pbtxt | ||
done | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.